Skip to main content

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:

  • SparsePauliOp for representing Hamiltonians
  • PauliEvolutionGate for defining time evolution
  • ProductFormula-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)

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

Collection of schemes

All top most efficient schemes at orders $n = 2, 4, 6$ are collected in the repository: https://github.com/MarkoMalezic/efficient-trotterizations. These are based on the paper by Malezic & Ostmeyer (arXiv: 2601.18756)

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

Prepare a small spin chain Hamiltonian (as SparsePauliOp) and construct the PauliEvolutionGate for some time $t$:

from qiskit.circuit.library import PauliEvolutionGate
from qiskit.quantum_info import SparsePauliOp

H = SparsePauliOp.from_list([
    ("ZI", 1.0),
    ("IZ", 1.0),
    ("XX", 0.5),
])

t = 1.0
evolution = PauliEvolutionGate(H, time=t)

To construct the evolution circuit either a HighLevelSynthesis plugin can be used to transpile it:

from qiskit import QuantumCircuit
from qiskit.transpiler import generate_preset_pass_manager
from qiskit.transpiler.passes.synthesis import HLSConfig

# Generate the circuit to be transpiled
qc = QuantumCircuit(2)
qc.append(evolution, [0, 1])

# Option 1: use a named scheme
options = {"name": "omelyan2",
           "reps": 50}

# Option 2: construct a custom OmelyanTrotter scheme
options = {"order": 2,
           "cycles": 2,
           "c_vec": [0.19318332, 0.30681667],
           "reps": 50}

hls_config = HLSConfig(PauliEvolution=[("omelyan_trotter", options)])
pass_manager = generate_preset_pass_manager(optimization_level=0, hls_config=hls_config)

circuit = pass_manager.run(qc)

print(circuit)

or it can be constructed natively by importing the necessary objects:

from qiskit_omelyan import OmelyanTrotter, Omelyan2

# Option 1: use a named scheme
scheme = Omelyan2(reps=50)
circuit = scheme.synthesize(evolution)

# Option 2: construct a custom OmelyanTrotter
scheme = OmelyanTrotter(order=2, cycles=2, c_vec=[0.19318332, 0.30681667], reps=50)
circuit = scheme.synthesize(evolution)

print(circuit)

Examples

Scripts for more examples can be found in examples/ for both plugin usage and native support. See examples/README.md for more information.

Typical usage:

cd examples
python native/leapfrog2_circuit.py
python native/omelyan2.py
python plugin/named_scheme.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.

Metadata

Release files for qiskit-omelyan 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qiskit-omelyan 0.2.1
File Size Uploaded Provenance Actions
qiskit_omelyan-0.2.1.tar.gz 20.5 kB Without provenance Details for qiskit_omelyan-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qiskit-omelyan 0.2.1
File Interpreter ABI Platform Actions
qiskit_omelyan-0.2.1-py3-none-any.whl Python 3 none any Details for qiskit_omelyan-0.2.1-py3-none-any.whl

Total release size: 40.4 kB

Release files / qiskit_omelyan-0.2.1.tar.gz

Download URL qiskit_omelyan-0.2.1.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1f149173e34113088c4aba9ad44e378ccc1a06e33ba36c4f6f3b81d28ea40575
BLAKE2b-256 checksum
How to use checksums
9c68478d487bc32ea5178592bde4bb2095c40d6bb03e8ff2fc1bfdb2d2f5aafd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / qiskit_omelyan-0.2.1-py3-none-any.whl

Download URL qiskit_omelyan-0.2.1-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab02bbccc1cfe7e920ea27aa2ac344fe955d51347933b441dd3e070d851d01ac
BLAKE2b-256 checksum
How to use checksums
7396b3ab62a65fbf0ba2ab56fddf8893e7b50ed628c410f04a971ec2ca3e2cfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for qiskit-omelyan 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page