Skip to content

Affine term disappers when applying cloud crosstalk model #483

@KangHaiYue

Description

@KangHaiYue

Describe the bug
When creating a crosstalk model by calling pygsti.models.create_cloud_crosstalk_model by passing an error dictionary into lindblad_error_coeffs which contains non-zero affine terms, e.g. error_dict = {('Gi', 1): {'SZ:1': 0.1, 'SZ:2': 0.1, 'SZZ:1,2': 0.1, 'AZ:1': 0.1, 'AZ:2': 0.1, 'AZZ:1,2': 0.01, 'HZZ:1,2': 0}}, it disappers when calling operation_blks["cloudnoise"][("Gi", 1)]

To Reproduce
`import pygsti
import numpy as np
labels = [1,2]
pspec = pygsti.processors.QubitProcessorSpec(
num_qubits=len(labels),
qubit_labels=labels,
gate_names=[
"Gxpi",
"Gypi",
"Gzpi",
"Gx",
"Gy",
"Gz",
"Gh",
"Gp",
"Gt",
"Gzr",
"Gcnot",
"Gcphase",
"Gswap",
"Gi"
],
availability={
"Gcnot": "all-permutations",
"Gcphase": "all-permutations",
"Gswap": "all-permutations",
},
)

error_dict = {('Gi', 1): {'SZ:1': 0.1, 'SZ:2': 0.1, 'SZZ:1,2': 0.1, 'AZ:1': 0.1, 'AZ:2': 0.1, 'AZZ:1,2': 0.01, 'HZZ:1,2': 0}}
mdl = pygsti.models.create_cloud_crosstalk_model(pspec, lindblad_error_coeffs=error_dict)

mdl.operation_blks["cloudnoise"][("Gi", 1)].errorgen_coefficients()`

The printed dictionary doesn't contain the affine term.
I also tried to apply mdl.operation_blks["cloudnoise"][("Gi", 1)].acton(rho) to a rho that is a density operator in Pauli product basis with just Affine term (setting all other parameters to 0 except the affine term), but nothing is changed. This indeed means the affine term is not added into the model.

Environment

  • pyGSTi version 0.9.12.3
  • python version 3.11.9

Metadata

Metadata

Assignees

Labels

bugA bug or regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions