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

Add bell-flagged circuits #10

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

oscarhiggott
Copy link

This PR adds bell-flagged ("standard color code") circuits (from [Bair+19]) into the clorco directory of chromobius.

This is the diagram of the circuit from Figure 2 of the chromobius paper:
Screenshot 2024-11-13 at 2 02 44 PM

For example, with this PR, to generate a bell-flagged circuit you could use:

from clorco._make_circuit import make_circuit

circuit = make_circuit(
    style=f"bell_flagged_color_code_X",
    noise_model=gen.NoiseModel.si1000(0.001),
    noise_strength=0.001,
    rounds=5,
    diameter=5,
    convert_to_cz=True,
    editable_extras={}
)

Within each cycle, and for each plaquette (red, green or blue), there is an "X stabilizer" detector, the "X stabilizer flag" detector that it's paired with (measured at the same time step), as well as the "Z stabilizer" detector and the "Z stabilizer flag" detector it's paired with. The fourth coordinate of the "X stabilizer" and "Z stabilizer" detectors have the same convention as the other color code circuits in this repository:

0 = Red X
1 = Green X
2 = Blue X
3 = Red Z
4 = Green Z
5 = Blue Z

The fourth coordinate of the detector for a flag detector has the value c+6 where c is the fourth coordinate of the detector it is "paired" with. i.e.:

6 = Red X flag
7 = Green X flag
8 = Blue X flag
9 = Red Z flag
10 = Green Z flag
11 = Blue Z flag

Note that the "Red X flag" detector is a Z measurement that flags potential hook errors in the "Red X" stabilizer measurement sub-circuit. Note also that the coordinates of the flags are not compatible with the chromobius decoder (which accepts coordinates in {-1, 0, 1, 2, 3, 4, 5}) but might be useful for other decoders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant