Skip to main content

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:

  • 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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qiskit_omelyan-0.2.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qiskit_omelyan-0.2.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file qiskit_omelyan-0.2.0.tar.gz.

File metadata

  • Download URL: qiskit_omelyan-0.2.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for qiskit_omelyan-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3a554b8dec14a6782b10317b2212d9e0eb2ad0717291870d7247f9bff7366c21
MD5 fa22b79b2d884328b6cb68ef8b3b34b6
BLAKE2b-256 60792027e89fa7bd01a0b06216b869cfed1ff518877ea83090e444179f4405eb

See more details on using hashes here.

File details

Details for the file qiskit_omelyan-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: qiskit_omelyan-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for qiskit_omelyan-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 679267db367ad47aba8dfc198221d59fe091b4d3b402f727422227732f22dec5
MD5 c9e77d9fb6bdcaff7a69560bb2a71f2c
BLAKE2b-256 4ac814aeed9bf988e7a1eea885708f0aa94c2ee1505f2d193f20ef36d823865c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page