Add Suzuki-Trotter circuit primitive#603
Draft
wsttiger wants to merge 1 commit into
Draft
Conversation
aa9e50f to
225a9c3
Compare
Introduce Hamiltonian-simulation support for Suzuki-Trotter product formulas based on flattened Pauli terms. Add make_trotter_terms() for host-side spin_op decomposition and apply_trotter() as the QPU-facing primitive for first-, second-, and fourth-order formulas. Expose the primitive through Python bindings, including Python-side SpinOperator term extraction. Document identity-term/global-phase handling for interference-sensitive algorithms. Add C++ and Python tests covering term extraction, invalid inputs, identity handling, multi-order kernel validation against product-formula and exact-diagonalization references, and a 4-qubit Hamiltonian with more than eight Pauli terms. Signed-off-by: Scott Thornton <wsttiger@gmail.com>
225a9c3 to
5436a5b
Compare
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.
Summary
Add a Suzuki-Trotter product-formula circuit primitive to the solvers library.
cudaq::solvers::make_trotter_terms(...)for host-sidespin_opdecomposition into coefficients, Pauli words, identity coefficient, and qubit count.cudaq::solvers::apply_trotter(...)as a QPU-facing primitive supporting first-, second-, and fourth-order product formulas.SpinOperator/SpinOperatorTermhandling.Validation
./unittests/test_trotter --gtest_color=no-> 7 passedpytest -q libs/solvers/python/tests/test_trotter.py-> 8 passedgit diff --check-> clean