Skip to content

Add exact Clifford-to-Pauli-exponent decomposition - #6

Closed
marcusps wants to merge 4 commits into
masilv/phased-outcome-complete-simfrom
masilv/clifford-pauli-exp-decomp
Closed

marcusps wants to merge 4 commits into
masilv/phased-outcome-complete-simfrom
masilv/clifford-pauli-exp-decomp

Conversation

@marcusps

Copy link
Copy Markdown
Owner

Summary

  • Adds an exact, sign-preserving O(n²) decomposition of a Clifford into π/4 Pauli exponents.
  • Replaying the factors reconstructs the full signed tableau, not only its symplectic action.
  • Adds Rust/Python APIs, round-trip tests, and documentation.

Reference

This is the decomposition primitive used by the §4.3 auxiliary-qubit separation in arXiv:2603.24717 to replay Clifford factors with exact ζ₈ phase tracking.

Stack

Stack A, PR 2 of 3. Base: masilv/phased-outcome-complete-sim. Its diff is intentionally limited to this decomposition; review after Stack A PR 1. masilv/phased-aux-separation is stacked next.

marcusps and others added 4 commits July 7, 2026 21:27
Introduce `clifford_to_pauli_exponents` in `paulimer::clifford`: an exact
decomposition of a `CliffordUnitary` into an ordered product of pi/4 Pauli
exponents `exp(i pi/4 P)`. The reconstruction reproduces the full tableau,
including Pauli-image signs, so replaying the factors on a phased operator
(`PhasedCliffordUnitary::left_mul_pauli_exp`) yields a well-defined global
phase. This is the primitive needed to recover the absolute global phase in
the auxiliary-qubit separation of arXiv:2603.24717 (Sec 4.5).

The algorithm reduces a working copy of the Clifford to the identity by
left-multiplying pi/4 exponents (per-qubit column reduction of the X and Z
images), then returns the inverse exponents in reverse order.

- New module `paulimer/src/clifford/decomposition.rs`, re-exported from
  `clifford.rs`.
- Rust tests in `clifford_test.rs`: identity-is-empty, fixed examples, and a
  proptest roundtrip over random Cliffords (n in 0..6).
- Python binding `CliffordUnitary.to_pauli_exponents()` with `.pyi` stub and
  tests; stubtest clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Surface clifford_to_pauli_exponents / CliffordUnitary.to_pauli_exponents in the
user-facing docs:

- paulimer/README.md: add a Clifford feature bullet, a Quick-Start snippet that
  decomposes a Clifford and rebuilds it via left_mul_pauli_exp, and a
  documentation entry pointing at src/clifford/decomposition.rs.
- Python bindings README: add a "Decomposing a Clifford into pi/4 Pauli
  exponents" quick-start and mention to_pauli_exponents in the CliffordUnitary
  feature bullet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Restore the standalone dense-Pauli controlled-operation test header so pytest collects it independently from the Pauli-exponent round-trip test.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: GPT-5.6 Sol <noreply@openai.com>
Cite section 4.3, where auxiliary-qubit separation is defined, rather than section 4.5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: GPT-5.6 Sol <noreply@openai.com>
@marcusps

Copy link
Copy Markdown
Owner Author

Superseded by microsoft#116, targeting the upstream repository.

@marcusps marcusps closed this Jul 17, 2026
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