Skip to content

Feat/fermion jordan wigner - #57

Merged
jianjian01 merged 6 commits into
cq-lib:release/2.0from
jianjian01:feat/fermion-jordan-wigner
Oct 13, 2026
Merged

jianjian01 merged 6 commits into
cq-lib:release/2.0from
jianjian01:feat/fermion-jordan-wigner

Conversation

@jianjian01

Copy link
Copy Markdown
Collaborator

Adds reusable fermionic algebra and Jordan–Wigner mapping in Rust and Python, enabling excitation generators to feed directly into existing Pauli evolution components.

  1. Adds validated sparse Pauli algebra, tensor products and qubit embedding while preserving legacy Hamiltonian behavior.
  2. Preserves small parameter coefficients and numeric phase residuals, and applies circuit global phase during statevector simulation.
  3. Adds algebraic and numerical regression tests, Python type declarations, and English/Chinese API documentation.

Preserve nonzero affine coefficients, near-unit scales and cancellation
residues in Parameter arithmetic and simplification. Divide coefficients
directly to retain representable quotients with subnormal divisors.

Evaluate constant expressions before approximate symbolic simplification
and retain small numeric phase and rotation residues in canonicalization.
Add regression tests for scaling, substitution, cancellation, division and
canonicalization idempotence.
Construct ordered, unit-weight i(T - T†) generators with index validation.
Verify fermionic signs, particle-number conservation, Jordan-Wigner mapping
and independent evolution blocks against Fock-space calculations.

Project accepted imaginary roundoff residuals during Hermitian normalization
while retaining every nonzero real coefficient. Add regression coverage for
zero projection and small-coefficient symbolic evolution.
Move the P1/P2 regression suites into their QIS, noise, and ZNE test modules. Preserve all assertions and split channel completeness from noisy simulation coverage. Remove Modified declarations only from files involved in this work.

Validation: 3337 core tests and 259 doctests passed; 8 existing tests ignored. Clippy with warnings denied and diff checks passed.
Expose structured fermionic operators, excitation generators, Jordan-Wigner
mapping and structural mapper protocols through the Python API.

Add checked sparse Pauli algebra while preserving legacy Hamiltonian
behavior. Align integer conversion, reflected arithmetic, runtime
signatures and type declarations with Python conventions.

Apply circuit global phase during statevector simulation and preserve
nonzero phase residuals. Add numeric and algebraic regression tests and
update Chinese and English API documentation.
@jianjian01
jianjian01 merged commit fa40c8d into cq-lib:release/2.0 Oct 13, 2026
4 checks passed
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.

2 participants