Skip to content

docs: compare fermion mappings on an interacting ring - #98

Open
wsttiger wants to merge 4 commits into
NVIDIA:mainfrom
wsttiger:codex/v02-07-fermion-mappings
Open

wsttiger wants to merge 4 commits into
NVIDIA:mainfrom
wsttiger:codex/v02-07-fermion-mappings

Conversation

@wsttiger

@wsttiger wsttiger commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

Adds a host-side lattice tutorial comparing JW, BK, standard superfast, and binary-tree generalized superfast mappings of one four-mode interacting spinless ring. An independent occupation-bit Hamiltonian verifies the tensor coefficients and fermionic signs. Each superfast parity sector is projected onto the public loop stabilizers’ joint +1 eigenspace before comparing all eight physical eigenvalues, including multiplicities. The example also checks stabilizer algebra and reports Pauli weights, code dimensions, and qubit counts without assuming an asymptotic winner.

Validation on CUDA-Q 0.16.0.post1, Python 3.12.3:

  • Standalone example passed in 0.01 s; four declared qubits, one independent stabilizer and code dimension eight for each superfast parity. Maximum spectral error was about 3.55e-15.
  • python3 -m pytest tests/python/test_examples.py -k fermion_mappings_lattice -q: 1 passed in 1.90 s.
  • Sphinx HTML build with -W --keep-going: passed independently.
  • YAPF 0.43.0 and whitespace checks passed.

Independent plan 07 PR against main; uses public mapping APIs with no library change or chemistry/phase-generation dependency.

Development is hosted in wsttiger/cudaq-algorithms. This replaces #86 after relocating its branch from upstream to the fork. Existing review discussion remains on that linked PR. The latest commit history is preserved unchanged; this relocation does not rerun scientific validation.

Signed-off-by: Scott Thornton <wsttiger@gmail.com>
Signed-off-by: Scott Thornton <wsttiger@gmail.com>
Signed-off-by: Scott Thornton <wsttiger@gmail.com>
Keep every validation active and always report failures. Preserve student-facing results, resource tables, and approximation errors in default output. Document --verbose in the scripts and example pages.

Signed-off-by: Scott Thornton <wsttiger@gmail.com>
@wsttiger
wsttiger marked this pull request as ready for review November 12, 2026 04:11
@wsttiger
wsttiger requested a review from amezzacapo1 November 12, 2026 04:11
@amezzacapo1

Copy link
Copy Markdown
Collaborator

I would add another example with high number of qubits (e.g. up to ~100 qubits) where one can appreciate the difference between the mappings more.

This branch has not been deployed

No deployments
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