Add global rotations tutorial reproducing ideal Fig. 4a (issue #119).#159
Add global rotations tutorial reproducing ideal Fig. 4a (issue #119).#159rosspeili wants to merge 2 commits into
Conversation
…omputing#119). Introduces a docs demo with hypercube [[7,1,3]] flow verification, [[15,1,3]] stabilizer prep, and smoke tests for qualitative curve shapes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cbefd72a1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| allow_redundant=False, | ||
| ).to_circuit(method="graph_state") | ||
| prep_circuit = tsim.Circuit.from_stim_program(prep_stim) | ||
| base_state = normalized_state(prep_circuit) |
There was a problem hiding this comment.
Prepare the RM state vector before flattening
When build_systems() reaches the [[15,1,3]] Reed–Muller case, prep_stim is a Clifford circuit synthesized from a tableau, not a reset-based state-preparation circuit like the Steane/product paths. Passing it to normalized_state() makes Circuit.to_matrix() build the full 15-qubit unitary and then flatten it, which can require tens of GiB and, if it ever succeeds, produces a length-2^30 vector that cannot be multiplied by the length-2^15 rotation phases. This makes the new notebook and smoke test fail for the 3D curves; apply the synthesized circuit to |0...0> (or include explicit resets/use a state-vector path) instead of normalizing the whole unitary matrix.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid concern in general, but Stim's graph_state synthesis already prepends RX on all qubits, so to_matrix() returns a length-2^15 state vector here and the 3D curves pass. I only added guards in normalized_state() so a clifford-only circuit fails fast instead of building the full unitary.
Introduces a docs demo with hypercube [[7,1,3]] flow verification, [[15,1,3]] stabilizer prep, and smoke tests for qualitative curve shapes. Solves #119