Add focused Trotter ordering benchmark#75
Draft
AlbertLee125 wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
The existing full-library comparison showed that graph size, edge count, and color count did not predict Trotter error. This focused benchmark asks why the fermionic and direct JW decompositions differ by comparing coefficient-weighted commutators, order sensitivity, and particle-sector preservation on three representative Hamiltonians.
During validation, the earlier tensor reconstruction was also found to count raw antisymmetric tensor permutations as separate fermionic vertices. The new runner canonicalizes and combines normal-ordered monomials before Hermitian pairing, matching the convention in
h2_fermionic.ipynbwithout importing OpenFermion. The legacy insight report now carries a correction notice for its structural graph counts.Main findings
Validation
ruff check run_trotter_benchmark.py summarize_trotter_results.py analysis/tests/test_trotter_benchmark.pyPYTHONPATH=.. pytest -q analysis/tests/test_trotter_benchmark.py— 5 passed1e-8Scope
This intentionally excludes fourth-order formulas, dense evolution across all eight-qubit cases, additional coloring algorithms, and gate-count/circuit-depth claims. Generated
.dat, tensor, state, HDF5, and pickle intermediates are not included.