Skip to content

Add global rotations tutorial reproducing ideal Fig. 4a (issue #119).#159

Open
rosspeili wants to merge 2 commits into
QuEraComputing:mainfrom
rosspeili:issue-119-global-rotations-tutorial
Open

Add global rotations tutorial reproducing ideal Fig. 4a (issue #119).#159
rosspeili wants to merge 2 commits into
QuEraComputing:mainfrom
rosspeili:issue-119-global-rotations-tutorial

Conversation

@rosspeili

@rosspeili rosspeili commented Jun 9, 2026

Copy link
Copy Markdown

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

…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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docs/demos/utils/global_rotation.py Outdated
allow_redundant=False,
).to_circuit(method="graph_state")
prep_circuit = tsim.Circuit.from_stim_program(prep_stim)
base_state = normalized_state(prep_circuit)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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 this pull request may close these issues.

1 participant