This issue is part of unitaryHACK 2026. You have to be registered to participate. Please read carefully the unitaryHack rules before submitting a PR for this issue.
A note about AI Slop: while we are open to collaboration with LLMs for unitaryHACK, fully AI-generated PRs are not acceptable. It is at the maintainers' discretion whether or not LLM-generated PRs are the right fit for the issues, and those that appear fully AI-generated may be immediately rejected. Please read carefully the AI policy if you are using LLMs for your work.
Context
Theorems 1, 2 and 4 in Ref. 1 prescribe how to recover an $XZ$-correction strategy (and therefore, an MBQC pattern) from a causal, g- or Pauli flow. The class XZCorrections has methods to_causal_flow and to_gflow which reverse this prescription to construct, respectively, CausalFlow and GFlow objects from a given set of $XZ$ corrections. However, the method to_pauli_flow is missing.
Extracting a Pauli flow from a deterministic $XZ$ correction strategy does not seem trivial, since the anachronical corrections do not appear in the pattern (compare Eq. in Theorem 2 vs Eq. in Theorem 4 in 1).
Task
Implement a method XZCorrections.to_pauli_flow, and define a method extract_pauli_flow in Pattern that calls it for convenience (analogous to Pattern.extract_causal_flow and Pattern.extract_gflow).
Acceptance criteria
For the PR to be considered for review:
-
It should pass the CI, including linting and type-checking.
-
New functions should be tested and documented appropriately following numpy style.
-
Unitary Hack AI use guidelines should be respected.
-
Author should be ready to engage in a feedback loop.
-
PR description should explicitly explain how the difficulty of dealing with anachronical corrections in the Pauli flow was tackled.
For the PR to be accepted:
- All provided feedback should have been implemented.
This issue is part of unitaryHACK 2026. You have to be registered to participate. Please read carefully the unitaryHack rules before submitting a PR for this issue.
A note about AI Slop: while we are open to collaboration with LLMs for unitaryHACK, fully AI-generated PRs are not acceptable. It is at the maintainers' discretion whether or not LLM-generated PRs are the right fit for the issues, and those that appear fully AI-generated may be immediately rejected. Please read carefully the AI policy if you are using LLMs for your work.
Context
Theorems 1, 2 and 4 in Ref. 1 prescribe how to recover an$XZ$ -correction strategy (and therefore, an MBQC pattern) from a causal, g- or Pauli flow. The class $XZ$ corrections. However, the method
XZCorrectionshas methodsto_causal_flowandto_gflowwhich reverse this prescription to construct, respectively,CausalFlowandGFlowobjects from a given set ofto_pauli_flowis missing.Extracting a Pauli flow from a deterministic$XZ$ correction strategy does not seem trivial, since the anachronical corrections do not appear in the pattern (compare Eq. in Theorem 2 vs Eq. in Theorem 4 in 1).
Task
Implement a method
XZCorrections.to_pauli_flow, and define a methodextract_pauli_flowinPatternthat calls it for convenience (analogous toPattern.extract_causal_flowandPattern.extract_gflow).Acceptance criteria
For the PR to be considered for review:
It should pass the CI, including linting and type-checking.
New functions should be tested and documented appropriately following numpy style.
Unitary Hack AI use guidelines should be respected.
Author should be ready to engage in a feedback loop.
PR description should explicitly explain how the difficulty of dealing with anachronical corrections in the Pauli flow was tackled.
For the PR to be accepted:
Footnotes
Browne, Kashefi, Mhalla and Perdrix, 2007 (arXiv:quant-ph/0702212). ↩ ↩2