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 stim.Circuit.without_detectors() and shortest graphlike error crumble output #806

Closed
Dripto opened this issue Jul 30, 2024 · 5 comments · Fixed by #835
Closed

add stim.Circuit.without_detectors() and shortest graphlike error crumble output #806

Dripto opened this issue Jul 30, 2024 · 5 comments · Fixed by #835

Comments

@Dripto
Copy link

Dripto commented Jul 30, 2024

Two quick feature ideas from @mmcewen-g and I:

  1. stim.Circuit.without_detectors(), in case you want to strip them (for crumble or whatever else). Python snippet:
det_free_circuit = stim.Circuit()

for instruction in circuit:
    if instruction.name == 'DETECTOR':
        continue
    else:
        det_free_circuit.append(instruction)
  1. shortest graphlike error -> crumble
    It would be really cool if you could call shortest_graphlike_error(canonicalize_circuit_errors=True) and have it output a crumble link that would have that error marked.
@Strilanc
Copy link
Collaborator

Should without_detectors keep observables?

It's pretty fast to write a loop that strips the detectors out of a circuit, so I'm not sure it's a huge gain over "there's a python API for you to do stuff".

Having to_crumble_url take a list of explained errors or dem errors is interesting.

@ghost
Copy link

ghost commented Jul 30, 2024 via email

@Strilanc
Copy link
Collaborator

Why do you want to remove the detectors? What is it solving? I have good guesses but I want to know.

@Dripto
Copy link
Author

Dripto commented Jul 30, 2024

just because it makes crumble too slow

@Strilanc
Copy link
Collaborator

That was my first guess.

I think it might make more sense to solve it by making crumble fast. It is currently reparsing the circuit and recomputing all detecting regions everywhere in the circuit every time it draws a frame, and doing that in javascript instead of webassembly.

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 a pull request may close this issue.

2 participants