Skip to content

Arbitrary Order Trotter#389

Merged
wavefunction91 merged 48 commits intomainfrom
feature/agamshayit/any_order_trotter
Mar 24, 2026
Merged

Arbitrary Order Trotter#389
wavefunction91 merged 48 commits intomainfrom
feature/agamshayit/any_order_trotter

Conversation

@v-agamshayit
Copy link
Copy Markdown
Contributor

@v-agamshayit v-agamshayit commented Mar 4, 2026

This pull requests adds support for arbitrary order Trotter decompositions using the usual recursive definition. The computation of the terms and angles is done bottom-up using dynamic programming, which circumvents the exponential runtime complexity associated with recursion.

The implemented naive and commutator-based error bounds are extended to accommodate arbitrary p-order Trotter formulae. We use the asymptotic error estimate of Childs et.al 2021 (Theorem 6 and Corollary 7). New tests were added to ensure that the computed high-order formulae and their error bounds are correct.

Copilot AI review requested due to automatic review settings March 4, 2026 21:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for even (arbitrary) order Trotter–Suzuki decompositions and extends step-count/error-bound estimation beyond first order, with expanded unit tests for the new orders.

Changes:

  • Extend Trotter builder to generate order-2 and higher even-order product formulas (bottom-up construction).
  • Extend naive and commutator-based step estimators to support order 2 and higher even orders (with a “largest Taylor coefficient” constant).
  • Add/adjust tests for step estimation, decomposition correctness, and error-bound comparisons across orders.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
python/tests/test_trotter_error.py Updates step-estimator tests to pass order and adds new order-2 / higher-order cases.
python/tests/test_time_evolution_trotter.py Adds decomposition/correctness tests for order 2 and 4; updates unsupported-order behavior expectations.
python/src/qdk_chemistry/utils/pauli_commutation.py Adds nested-commutator vanishing check and commutator bounds for order 2 and higher.
python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter_error.py Generalizes trotter_steps_* APIs and formulas to support order 2 and higher even orders.
python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Implements general _trotter flow for even orders and computes a “largest error coefficient” for bounds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter_error.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter_error.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter_error.py Outdated
Comment thread python/src/qdk_chemistry/utils/pauli_commutation.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
Comment thread python/tests/test_time_evolution_trotter.py Outdated
Comment thread python/tests/test_trotter_error.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 4, 2026 21:40
Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 4, 2026

@v-agamshayit I've opened a new pull request, #390, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter_error.py Outdated
Comment thread python/src/qdk_chemistry/utils/pauli_commutation.py
Comment thread python/tests/test_time_evolution_trotter.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter_error.py Outdated
Comment thread python/tests/test_time_evolution_trotter.py Outdated
Comment thread python/tests/test_trotter_error.py Outdated
@v-agamshayit v-agamshayit reopened this Mar 4, 2026
@v-agamshayit v-agamshayit marked this pull request as draft March 4, 2026 23:08
@v-agamshayit v-agamshayit requested a review from Copilot March 4, 2026 23:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/tests/test_time_evolution_trotter.py Outdated
Comment thread python/tests/test_time_evolution_trotter.py Outdated
@wavefunction91 wavefunction91 added this to the Release 1.1 milestone Mar 10, 2026
Copilot AI review requested due to automatic review settings March 11, 2026 18:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread python/src/qdk_chemistry/utils/pauli_commutation.py
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter_error.py Outdated
Comment thread python/tests/test_time_evolution_trotter.py Outdated
Copilot AI review requested due to automatic review settings March 19, 2026 16:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
Copilot AI review requested due to automatic review settings March 19, 2026 21:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/src/qdk_chemistry/algorithms/time_evolution/builder/trotter.py Outdated
@wavefunction91 wavefunction91 added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit c49d6ea Mar 24, 2026
18 of 22 checks passed
@wavefunction91 wavefunction91 deleted the feature/agamshayit/any_order_trotter branch March 24, 2026 19:56
@wavefunction91 wavefunction91 linked an issue Mar 27, 2026 that may be closed by this pull request
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.

Implement higher-order Trotter for time-evolution

5 participants