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
The class Pattern have methods extract_causal_flow and extract_gflow, but extract_pauli_flow is missing. This causes, in particular, a regression in #181 where the visualization cannot display a flow on graphs with Pauli measurements. Before this PR, if graphs with Pauli measurements happened to have a gflow when their Pauli measurements were interpreted as planar, the visualization was able to show their gflow while displaying the Pauli nodes, but we no longer do that since we have eliminated implicit conversions.
Extracting Pauli flows does not seem trivial, since the anachronical corrections do not appear in the pattern.
Task
Implement a method extract_pauli_flow, preferably at level of the class XZCorrections, and define a method extract_pauli_flow in Pattern that calls it for convenience.
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.
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
The class
Patternhave methodsextract_causal_flowandextract_gflow, butextract_pauli_flowis missing. This causes, in particular, a regression in #181 where the visualization cannot display a flow on graphs with Pauli measurements. Before this PR, if graphs with Pauli measurements happened to have a gflow when their Pauli measurements were interpreted as planar, the visualization was able to show their gflow while displaying the Pauli nodes, but we no longer do that since we have eliminated implicit conversions.Extracting Pauli flows does not seem trivial, since the anachronical corrections do not appear in the pattern.
Task
Implement a method
extract_pauli_flow, preferably at level of the classXZCorrections, and define a methodextract_pauli_flowinPatternthat calls it for convenience.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.
For the PR to be accepted: