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 backward-propagating flows to crumble #665

Open
ghost opened this issue Nov 20, 2023 · 3 comments
Open

Add backward-propagating flows to crumble #665

ghost opened this issue Nov 20, 2023 · 3 comments
Assignees

Comments

@ghost
Copy link

ghost commented Nov 20, 2023

A good starting option might just be a global control to choose whether flows propagate forwards or backwards in time.

A more general version might involve having two or more marker states, such that each marker can choose whether to propagate forwards or backwards, and gives purple bar errors when those states are violated.

@ghost ghost assigned Strilanc and ghost Nov 20, 2023
@Strilanc
Copy link
Collaborator

Strilanc commented Nov 20, 2023

I think what I want to do is to have some kind of notation, like:

# propagate reset forwards
RX(1,2,t=3) -> ?

# propagate measurement backwards
? -> MX(1,2,t=5)

# propagate free-standing flip forwards (note half integer time)
Y(1,2,t=3.5) -> ?

# try to form a detector, show error otherwise
RX(1,2,t=3) -> MX(1,2,t=5)

# try form a detector; infer the resets
auto -> MX(1,2,t=5) MX(1,2,t=10)

# try form a detector; infer the measurements [somehow]
RX(1,2,t=3) RX(1,2,t=8) -> auto

and once I have a notation for it, I can make a UI for that notation. Like you could pick which ones to show.

@ghost
Copy link
Author

ghost commented Nov 20, 2023

That sounds great to me, esp if we can hook in detectors in the circuit for debugging what we're actually making,
esp inferring the resets from the measurements. For inferring the measurements from the resets, we could provide a heuristic like trying to minimize the overall size of the resulting region?

In the meantime, I would appreciate a global flip the propagation direction button, as I'm doing that a reasonable amount by hand by reversing the circuit; how hard would it be to just toggle the direction of the flow mechanics? Any pointers?

@Strilanc
Copy link
Collaborator

I think the key method is PropagatedPauliFrames.fromCircuit. If you add a boolean go_backwards to that method, and feed that boolean in from where the method is called from, it should be enough? You'll probably find yourself being dragged into inverting gate flows in order to compute the layer by layer result.

There is, separately, a more performant class in-the-works which is https://github.com/quantumlib/Stim/blob/main/glue/crumble/circuit/pauli_frame.js but it's not integrated yet. Don't get distracted by it.

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

1 participant