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

Distance of color_code:memory_xyz #756

Open
peter-janderks opened this issue Apr 17, 2024 · 1 comment
Open

Distance of color_code:memory_xyz #756

peter-janderks opened this issue Apr 17, 2024 · 1 comment

Comments

@peter-janderks
Copy link

peter-janderks commented Apr 17, 2024

@lucasberent and I are trying to benchmark a decoder using the circuit "color_code:memory_xyz"

If I run

d = 3
p = 0.01
circuit = stim.Circuit.generated(
    rounds=10*d,
    distance=d,
    after_clifford_depolarization=p,
    after_reset_flip_probability=p,
    before_measure_flip_probability=p,
    before_round_data_depolarization=p,
    code_task=f'color_code:memory_xyz',
)
error_mechanisms = circuit.search_for_undetectable_logical_errors(
    dont_explore_edges_increasing_symptom_degree=False,
    dont_explore_detection_event_sets_with_size_above=9999,
    dont_explore_edges_with_degree_above=9999,
    canonicalize_circuit_errors=True,
)
print(len(error_mechanisms))

The output is 2
For distance 5 I get len(error_mechanisms)=3

Is this expected behaviour?
For the built-in surface code circuits I do get len(error_mechanisms) = d

@Strilanc
Copy link
Collaborator

It's very plausible that the ordering chosen by the circuit is reducing the distance. I wrote that circuit before I really understood the details of making these circuits, and before I'd worked on color codes, so it's weird in several ways. I'm open to fixing the code distance, but in general I'm not open to making the circuit generation "perfect".

In general, stim's circuit generation is not intended to make amazing circuits that people will want to use forever. That's impossible, because realistically everyone wants something slightly different in their circuits. The circuit generation is designed to make getting-started circuits that can be used as examples, before people move on to making their own thing.

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

No branches or pull requests

2 participants