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

Serialization of PlaquetteGridCircuitStructure is incorrect if fiducial pair reduction is True #484

Open
eendebakpt opened this issue Sep 13, 2024 · 0 comments
Labels
bug A bug or regression
Milestone

Comments

@eendebakpt
Copy link
Contributor

Describe the bug

To perform the GST measurements and analysis independently I tried to serialize the relevant structures after measurment, and then load the same structures later for analysis. This fails for the PlaquetteGridCircuitStructure

To Reproduce

A minimal example:

import pygsti
from pygsti.modelpacks import smq1Q_XY, smq2Q_XYCPHASE
import tempfile
import os
from pygsti.circuits.circuitstructure import PlaquetteGridCircuitStructure
import tempfile

model_pack = smq2Q_XYCPHASE
exp_design = model_pack.create_gst_experiment_design( max_max_length=[1,2], fpr=True)
       
experiment_list = exp_design.all_circuits_needing_data
f = tempfile.mktemp(suffix='.json')
experiment_list.write(f)

with open(f,  'r') as fid:
        experiment_list2=PlaquetteGridCircuitStructure.load(fid)
        
print(experiment_list[0])
print(experiment_list2[0])

Has output

Qubit 0 -----
Qubit 1 -----

Qubit 0 ---|     |-|     |-|     |-|     |---
Qubit 1 ---|Gypi2|-|Gxpi2|-|Gxpi2|-|Gxpi2|---

The issue does not occur then fpr is set to False.

Expected behavior

The two printed circuits should be identical. In particular, the deserialized object should be identical to the original object (in all aspects that are relevant for running GST). The same problem occurs when using the PlaquetteGridCircuitStructure.to_nice_serialization.

Environment (please complete the following information):

  • pyGSTi version [e.g. v0.9.7.4]: 0.9.12.3
  • python version [e.g. 3.7, 2.7]: 3.10
  • OS [e.g. OSX 10.14, Ubuntu 16.04 LTS] Windows

Additional context
Add any other context about the problem here.

@eendebakpt eendebakpt added the bug A bug or regression label Sep 13, 2024
@sserita sserita added this to the 0.9.13 milestone Sep 19, 2024
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