Skip to content

Adding propagator and hamiltonian_simulation docs#551

Open
v-agamshayit wants to merge 4 commits into
mainfrom
agamshayit/magnus_docs
Open

Adding propagator and hamiltonian_simulation docs#551
v-agamshayit wants to merge 4 commits into
mainfrom
agamshayit/magnus_docs

Conversation

@v-agamshayit

Copy link
Copy Markdown
Contributor

No description provided.

@v-agamshayit v-agamshayit linked an issue Jun 26, 2026 that may be closed by this pull request
@v-agamshayit v-agamshayit marked this pull request as ready for review June 27, 2026 00:14
@v-agamshayit v-agamshayit requested a review from sobolevnrm as a code owner June 27, 2026 00:14
Copilot AI review requested due to automatic review settings June 27, 2026 00:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds end-user documentation for the time-dependent evolution pipeline by introducing dedicated pages for the Propagator and HamiltonianSimulation algorithms, and by expanding the Magnus propagator’s in-code docstrings to better explain the underlying formulas and current implementation limitations.

Changes:

  • Expanded MagnusPropagator module/class docstrings with Magnus-expansion background, implementation status, and usage notes.
  • Added new Sphinx docs pages for Propagator and HamiltonianSimulation with workflow-oriented guidance and settings tables.
  • Wired the new docs into the algorithms documentation index.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
python/src/qdk_chemistry/algorithms/propagator/magnus_propagator.py Adds richer theory/usage docstrings and clarifies current supported scope (order-1, driven container).
docs/source/user/comprehensive/algorithms/propagator.rst New user guide for propagators, including workflow context and Magnus (“magnus”) implementation details.
docs/source/user/comprehensive/algorithms/index.rst Adds propagator and hamiltonian_simulation to the algorithms docs index/toctree and summary table.
docs/source/user/comprehensive/algorithms/hamiltonian_simulation.rst New user guide for Hamiltonian simulation, focused on the Euler integrator pipeline and settings.

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

Comment on lines +47 to +49
Accuracy
--------
The order-1 propagator gives :math:`O(\Delta t^2)` accuracy.
:math:`H_\text{eff} = \Omega_1 / \delta t` (the time-averaged exponent
divided by :math:`\delta t = t_2 - t_1`) so that a time-stepping
integrator that multiplies by :math:`\delta t` recovers the full
exponent :math:`\Omega_1`. This gives :math:`O(\Delta t^2)` accuracy.
Comment on lines +193 to +194
Only the leading-order term is computed; this gives
:math:`O(\delta t^2)` accuracy.
Comment on lines +103 to +105
from qdk_chemistry.data import AlgorithmRef

euler.settings().set("propagator", AlgorithmRef("propagator", "magnus"))

where the drive integral is evaluated by numerical quadrature (``scipy.integrate.quad``).

This is the leading-order term of the Magnus expansion. This approximation gives :math:`O(\delta t^2)` accuracy.
- TimeDependentQubitHamiltonian → QubitHamiltonian
* - :doc:`HamiltonianSimulation <hamiltonian_simulation>`
- Time-dependent Hamiltonian simulation
- TimeDependentQubitHamiltonian + Observables → Energy
- Total evolution time :math:`T`. Default: ``1.0``.
* - ``dt``
- float
- Time step size. Must be positive and not exceed ``total_time``. Default: ``0.0`` (must be set by user).
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.

Complete documentation of Magnus propagator

2 participants