Omelyan-based product formulas for time evolution in Qiskit
Project description
qiskit-omelyan
Omelyan-type (and related) symmetric product formulas for Hamiltonian time evolution in Qiskit.
This project provides a general ramp-based construction, OmelyanTrotter, along with a collection of well-known optimized schemes from the literature. The goal is to give you more control over time-evolution circuit synthesis—especially when you want lower Trotter error at fixed (or comparable) gate depth than standard Suzuki–Trotter constructions.
The implementation integrates with Qiskit’s existing operator and synthesis stack:
SparsePauliOpfor representing HamiltoniansPauliEvolutionGatefor defining time evolutionProductFormula-style synthesis to generate circuits
Features
OmelyanTrotter (general framework)
OmelyanTrotter is a symmetric product-formula constructor (subclassing Qiskit’s ProductFormula) based on ramp notation. It supports:
- even orders (
order) - cycles (
cycles) - symmetric parameter vectors (
c_vec) - multiple steps (
reps) - optional circuit optimizations:
- merging consecutive identical single-qubit rotations (
merge_single) - merging boundaries between consecutive steps (
merge_steps)
- merging consecutive identical single-qubit rotations (
This makes it possible to implement a broad family of symmetric product formulas in a uniform way and to reproduce known optimized schemes from the literature.
Built-in schemes
This repository includes ready-to-use schemes implemented as subclasses/instances of OmelyanTrotter, including:
- 2nd order:
Leapfrog2,Omelyan2 - 4th order:
Forest_Ruth4,Omelyan4,Malezic_Ostmeyer4 - 6th order:
Yoshida6,Blanes_Moan6,Malezic_Ostmeyer6 - 8th / 10th order:
Morales8,Morales10
Installation
From PyPI
pip install "qiskit-omelyan"
With example dependencies
pip install "qiskit-omelyan[examples]"
From GitHub (latest main)
pip install "qiskit-omelyan @ git+https://github.com/MarkoMalezic/qiskit-omelyan.git"
With example dependencies:
pip install "qiskit-omelyan[examples] @ git+https://github.com/MarkoMalezic/qiskit-omelyan.git"
Quick start
Minimal example (Hamiltonian as SparsePauliOp):
from qiskit.circuit.library import PauliEvolutionGate
from qiskit.quantum_info import SparsePauliOp
from qiskit_omelyan import OmelyanTrotter, Omelyan2 # or any other scheme
t = 1.0
H = SparsePauliOp.from_list([
("ZI", 1.0),
("IZ", 1.0),
("XX", 0.5),
])
evolution = PauliEvolutionGate(H, time=t)
# Option 1: use a ready-to-use scheme
synth = Omelyan2(reps=50, merge_single=True, merge_steps=True)
qc = synth.synthesize(evolution)
# Option 2: construct a custom OmelyanTrotter
# qc = OmelyanTrotter(order=2, cycles=1, c_vec=[...], reps=50).synthesize(evolution)
print(qc)
Examples
See examples/ and examples/README.md.
Typical usage:
cd examples
python leapfrog2_circuit.py
python omelyan2.py
Some examples compare against exact statevector evolution for small systems using scipy.linalg.expm, so keep the number of qubits small.
Validation / comparison
The schemes in this repository are designed to be comparable to existing Qiskit synthesis methods such as SuzukiTrotter (and, in a different regime, QDrift). For small systems, you can validate correctness by comparing against exact matrix exponentiation and evaluating fidelity/error.
References
- I. Omelyan, I. Mryglod and R. Folk, Optimized Forest–Ruth- and Suzuki-like Algorithms for Integration of Motion in Many-body Systems (2002)
- N. Hatano and M. Suzuki, Finding Exponential Product Formulas of Higher Orders (2005)
- H. Yoshida, Construction of higher order symplectic integrators (1990)
- L. Verlet, Computer "Experiments" on Classical Fluids (1967)
- E. Forest and R. D. Ruth, Fourth-order Symplectic Integration (1990)
- S. Blanes and P. Moan, Practical Symplectic Partitioned Runge–Kutta and Runge–Kutta–Nyström Methods (2002)
- M. E. S. Morales, P. C. S. Costa, D. K. Burgarth, Y. R. Sanders, Greatly improved higher-order product formulae for quantum simulation (2022)
- J. Ostmeyer, Optimised Trotter decompositions for Classical and Quantum Computing (2023)
- M. Maležič and J. Ostmeyer, Efficient Trotter–Suzuki Schemes for Long-Time Quantum Dynamics (2026)
License
Apache License 2.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qiskit_omelyan-0.1.0.tar.gz.
File metadata
- Download URL: qiskit_omelyan-0.1.0.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e25eb872003c95ba96a70a4e7e5092ed284ab1013f018344412e89c7d6e0ad6
|
|
| MD5 |
21afb7316a40bc9408ed4cc2235b4659
|
|
| BLAKE2b-256 |
1e90890b3c707eea8e57229af4041e279959d6bd7ce02dfc716672cbf29e5541
|
File details
Details for the file qiskit_omelyan-0.1.0-py3-none-any.whl.
File metadata
- Download URL: qiskit_omelyan-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14daefe4b77473e3fb1daabdff0e2bc23fb9ff2be72308fdaa351512be946ab3
|
|
| MD5 |
6e77b191727a18196421885497d91a12
|
|
| BLAKE2b-256 |
e7423e0e7f57ab111b19dbee10c7376f0d16fc6a01e13ac1f157371dc0d897ba
|