Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Affine term disappers when applying cloud crosstalk model #483

Open
KangHaiYue opened this issue Sep 8, 2024 · 2 comments
Open

Affine term disappers when applying cloud crosstalk model #483

KangHaiYue opened this issue Sep 8, 2024 · 2 comments
Assignees
Labels
bug A bug or regression
Milestone

Comments

@KangHaiYue
Copy link

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
@KangHaiYue KangHaiYue added the bug A bug or regression label Sep 8, 2024
@sserita sserita self-assigned this Sep 9, 2024
@sserita
Copy link
Contributor

sserita commented Sep 9, 2024

Hi @KangHaiYue, thanks for the bug report! We will look into this and get back to you shortly.

Just for complete clarity, I'll mention when Lindblad generators in pyGSTi were parameterized with just H/S/A, the A generators were indeed called affine. However, a while ago we swapped to using the H/S/C/A generators from the taxonomy of small error generators paper. These A generators are different than the old affine generators, and are more commonly called active or antisymmetric nowadays. Terminology differences aside, these are different from the old affine generators, so if you do indeed mean affine and are expecting them to have the old behavior, then this code will likely not give you what you want - you'll have to figure out what your map is with the new error generator definitions.

@sserita sserita added this to the 0.9.13 milestone Sep 9, 2024
@KangHaiYue
Copy link
Author

Hi @sserita , thank you for your reply, especially for providing the paper that gives a lot of insight. From that paper, it seems that the asymmetric noise in the Z-direction is controlled by the coefficient of the A_{X,Y} generator (Section V.F. or Fig 7). So how should I implement this in the error_dict ? E.g. something like error_dict = {('Gi', 1): {'AX:1': 0.1, 'AY:1': 0.1}}? I tried to replace this with the codes above, however, the coefficients for A are still 0 (although this time they do at least show up after calling mdl.operation_blks["cloudnoise"][("Gi", 1)].errorgen_coefficients() instead of nothing . Also, how should the parameters look like in the case of many qubits?

@KangHaiYue KangHaiYue reopened this Sep 10, 2024
@sserita sserita modified the milestones: 0.9.13, 0.9.13.1 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants