Skip to main content

quantlop

High-performance quantum simulator for matrix-free Hamiltonian evolution

quantlop quantlop

Build and test Documentation PyPI version Python 3.11+ License

Introduction

quantlop is a Python package, backed by a native C++ core, for simulating the evolution of quantum states under Hamiltonians expressed as weighted sums of Pauli words $P_k$. For an $n$-qubit Hamiltonian

quantlop quantlop

quantlop computes the action

quantlop quantlop

without constructing either the full Hamiltonian matrix or its exponential. Each Pauli word is applied directly to the dense state vector, while either an adaptively scaled Taylor series or a Lanczos-Krylov subspace projection evaluates the matrix-exponential action.

A dense Hamiltonian for $n$ qubits requires $O(4^n)$ storage, whereas the matrix-free evolution works only with its compact Pauli representation. The dense state vector still grows exponentially with the number of qubits, but avoiding the dense operator substantially lowers the memory requirement for Hamiltonians with Pauli decompositions.

Installation

Install the latest release of the package directly from PyPI with:

pip install quantlop

Quick example

Here is a simple code example using quantlop native data structures:

import numpy as np
import quantlop as ql

num_qubits = 3

# define Hamiltonian in Pauli basis
pwords = [
    ql.PauliWord(coeff=0.5, string="ZZI"),
    ql.PauliWord(coeff=0.2, string="YIX"),
]
ham = ql.Hamiltonian(pwords=pwords)

# set initial state vector
psi = np.zeros(2**num_qubits, dtype=complex)
psi[0] = 1.0

# evolve state vector
evolved_psi = ql.evolve_higham(ham, psi)
# or
evolved_psi = ql.evolve_krylov(ham, psi)

Both algorithms select their Taylor truncation or Krylov dimension automatically. The default relative tolerance is 1e-9. Smaller values generally improve accuracy at the cost of more computation. The tolerance guides the internal approximation rather than measuring the final error directly.

The library also provides class methods to import Hamiltonians directly from other quantum computing frameworks:

  • ql.Hamiltonian.from_pennylane to build from PennyLane Hamiltonian objects
  • ql.Hamiltonian.from_qiskit to build from Qiskit SparsePauliOp objects

Multi-threading

By default, evolution is serial. To enable multi-threading, pass a non-zero positive integer as num_threads to request that many OpenMP threads. Passing "auto" selects the thread count reported by the operating system.

evolved_psi = ql.evolve_higham(ham, psi, num_threads=4)

Development

The Python package is built with scikit-build-core, while the numerical C++ code is kept in the standalone quantlop_core CMake target. See the Development section in the documentation for more details.

Build the project from source in editable mode and run Python tests with:

pip install -e .[dev,docs]
pytest -v

Release files for quantlop 0.1.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 quantlop 0.1.1
File Size Uploaded
quantlop-0.1.1.tar.gz 315.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for quantlop 0.1.1
File
quantlop-0.1.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
quantlop-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
quantlop-0.1.1-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details
quantlop-0.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
quantlop-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
quantlop-0.1.1-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details
quantlop-0.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
quantlop-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
quantlop-0.1.1-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details
quantlop-0.1.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
quantlop-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
quantlop-0.1.1-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details

Total release size: 2.8 MB

Release files / quantlop-0.1.1.tar.gz

Download URL quantlop-0.1.1.tar.gz
Size 315.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cdf1dea59c61b17960a5225844b782b38a082c5ca679dc1f87a57e690a8963f3
BLAKE2b-256 checksum
How to use checksums
3acddfe4ffb3d7dfc146ed5603e3e13436562402d877168a29060724889a01a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp314-cp314-win_amd64.whl

Download URL quantlop-0.1.1-cp314-cp314-win_amd64.whl
Size 86.5 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
786fcca6cc98691cf2f775d58c3c42fd15984792228dadf492f3d71f754451b7
BLAKE2b-256 checksum
How to use checksums
5b6f25612e82c10427a612d8a4adc875a5a6e9e1b3ccdbfa372184e4401b29e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 205.5 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
88d2671b5c52e25df41d81021a1996be9c8d75db32ec50905d1571fbdf851d98
BLAKE2b-256 checksum
How to use checksums
62331fadfb8ef2991bf6f07310cbc3423e8f5c972a7b55c0c69d416f5fd094ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp314-cp314-macosx_15_0_arm64.whl

Download URL quantlop-0.1.1-cp314-cp314-macosx_15_0_arm64.whl
Size 319.8 kB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
3aa241acc22d5d4f34dfbc055126997e8a81170cc52fd831f07119054d1b5926
BLAKE2b-256 checksum
How to use checksums
c61a61bd6965ca93e98f15a7202fd5ff241ff38f2db216db2a70832fcd3b8ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp313-cp313-win_amd64.whl

Download URL quantlop-0.1.1-cp313-cp313-win_amd64.whl
Size 84.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
691e22dd589a4e6a85703786b60630327fd0fe541fa4734ea9d4c96cf410f404
BLAKE2b-256 checksum
How to use checksums
816574bfdd54d6775d954322873d374f9acbcc7912f5d3d603908ee5e2439e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 205.5 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
379ef7aeffd6247d490ab101c29d942b830877bf99715d6d916bd873a5fdd272
BLAKE2b-256 checksum
How to use checksums
53788a492769c11c8c4ec7ef18a17651805e0ec117bd81f569a76824ae8cbeef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp313-cp313-macosx_15_0_arm64.whl

Download URL quantlop-0.1.1-cp313-cp313-macosx_15_0_arm64.whl
Size 319.7 kB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
05d4c7d59b95a86dab1c7c897d32e7f5811c13376019887b94d9d17eecabc3a4
BLAKE2b-256 checksum
How to use checksums
9b87314ae217d24d77e707045cf7da5e1131310c2c211e76f9eb817af017dbd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp312-cp312-win_amd64.whl

Download URL quantlop-0.1.1-cp312-cp312-win_amd64.whl
Size 84.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
bcbdd22806aa62d0667395ac4fe37f502b909f61ed5508392ca813454312ffd9
BLAKE2b-256 checksum
How to use checksums
d0da4265f9ff7070a44d2f2f81b0356cbe172311132d404a01dde5932ec0e834
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 205.6 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
41303180a3d2189edbcc8f3fee57f961ba1cebd3399cef98825873ed3f98e81a
BLAKE2b-256 checksum
How to use checksums
d708794ba65f258beb511b2faf6683570fd9fb1f345ae71a48f8f157fb4e5770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp312-cp312-macosx_15_0_arm64.whl

Download URL quantlop-0.1.1-cp312-cp312-macosx_15_0_arm64.whl
Size 319.8 kB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
c136d0fc527e3a4e0df23874ce18aa1ff38699bba023a5dc2d1fedfb6532a29f
BLAKE2b-256 checksum
How to use checksums
c19f68ef3bad7b6ce8daf58f049048bdf657f611c20ecff72d4ecd2874d7468f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp311-cp311-win_amd64.whl

Download URL quantlop-0.1.1-cp311-cp311-win_amd64.whl
Size 85.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9cc951f050c3f3be165b343baf3e40d17427a28135177a300f29bd6c71f85772
BLAKE2b-256 checksum
How to use checksums
419b964dda55bdb0052a0fdf64780f8873ba6526c61aec2ecad6b3971c8ec4c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 206.6 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f8e5508f928a80ba36ce549117451b5517f3143b63eb87446cecd20ffe3a6675
BLAKE2b-256 checksum
How to use checksums
b05e5aff8f1cc61eb0fc92faff31334c86f12b56d3125c005afaba8f07856a41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release files / quantlop-0.1.1-cp311-cp311-macosx_15_0_arm64.whl

Download URL quantlop-0.1.1-cp311-cp311-macosx_15_0_arm64.whl
Size 320.7 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
733f997df43c24c77b6cc3e54caad58b5fba2421ceef59e90108de71a6157696
BLAKE2b-256 checksum
How to use checksums
fc67b342e3a89acc8ee7def81522579920b273def035c802154b8b8901a6172f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

13 release files

0.0.5

13 release files

0.0.4

13 release files

0.0.3

13 release files

0.0.2

13 release files

0.0.1

2 release files

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