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.0

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.0
File Size Uploaded
quantlop-0.1.0.tar.gz 315.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for quantlop 0.1.0
File
quantlop-0.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
quantlop-0.1.0-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.0-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details
quantlop-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
quantlop-0.1.0-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.0-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details
quantlop-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
quantlop-0.1.0-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.0-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details
quantlop-0.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
quantlop-0.1.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
quantlop-0.1.0-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.0.tar.gz

Download URL quantlop-0.1.0.tar.gz
Size 315.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dda49ed02582d5986e417021870276c02f07a27fdc8848d5d557b46a67650508
BLAKE2b-256 checksum
How to use checksums
080cc0ed53bd3b55a6a3cb4668e85f226a9ee311ea004001996273146aa00eb3
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-cp314-cp314-win_amd64.whl
Size 86.5 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
418f2149a00cc91584a0784bcd69cc6cd29fdf6f2a399776242f81b065e257b9
BLAKE2b-256 checksum
How to use checksums
7b800dc9a2f9720a6a842ca523fb141f64a26a45034cbde5d690b312012894cc
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
466bc99dc99ec4c843525efc5bc2d20431ec313902bf95c81581c333f6df0738
BLAKE2b-256 checksum
How to use checksums
613f1167d59aa72964b865f48dacf8b8adbef15e3c4611977c1f096a4bb6f23c
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
29c0bca972b15b3feae50ebbf7fc2c0562bd121923909bbde4ab2631f96654d2
BLAKE2b-256 checksum
How to use checksums
d8575f388ca2ff241a3b5f85e386070b2e1c3038922964008d81e8ce366921b6
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-cp313-cp313-win_amd64.whl
Size 84.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a818a5c60153a9288a9a1a34d536533b9fa66f31cb3d3b92764ec0c33939d00c
BLAKE2b-256 checksum
How to use checksums
24605a184fe3be607c25a5622edf0baad0ca3a561c21fa9808322df91a3fdc12
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
11c5cdb3b55372de8251befad51fb54bcc21352281af422e5c7f5a0ab9f42e6c
BLAKE2b-256 checksum
How to use checksums
2c13eaf79d930681174b47ae90d18f581950fc164ed8b03eb542755d83f3c70b
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
1e8f31acff8aeed1194f8348472ae9836ba9ab2dccc2d78339377f6a8fc925ec
BLAKE2b-256 checksum
How to use checksums
45397d71de16aa0db27bf17bed76dca52527a291868ddc783c41e8b663c0333f
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-cp312-cp312-win_amd64.whl
Size 84.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6cd89a8fa7e72ed9e774ec8fb2d3be2f7103c59d90309c4387c2ca074305cdc4
BLAKE2b-256 checksum
How to use checksums
c0a10109de75e6fd9629084bb919e84ad6457c0fac0b4a158fd15dd9deb5aab4
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
9ea4d50feff146afbdf515a39577db0b414f4a5d84d213bd2a711363962f5e08
BLAKE2b-256 checksum
How to use checksums
1df2ac01da769338d921f7e3fb186c00aa1a9084218402f7aab187be377e98bd
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
f5bc4f3cfdef39b618e688aa7e6e6cc035eb0211d980a82a7b8d126e69aa29c8
BLAKE2b-256 checksum
How to use checksums
1986e8bbbbcc6b14c0e2e22d39d63db16ff9e6a8a5c8160d343530f56cb7769b
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-cp311-cp311-win_amd64.whl
Size 85.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
a3fec64e6e43afe908b6299815fb5b629f3bea4b9ca45e0b98b44bcd71574da6
BLAKE2b-256 checksum
How to use checksums
c1132e8c501599684a8634cbd31d59da2ffa7f7da560ab1338232c94ef9f6a3d
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
8d6a5e9e4462216ecf16dc24716f9d9aa13f4d3af1e9c1b251900c16803ac9f4
BLAKE2b-256 checksum
How to use checksums
9e760598e353b8d16c89ff37f488c6d8ff8b0568187ab6045298680a5dd432f3
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 3, 2026.

Transparency log

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

Download URL quantlop-0.1.0-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
f307353f4dae96c831d321c59a26b35802e9b1093925450c951619e58d396c90
BLAKE2b-256 checksum
How to use checksums
08d6146247e52a42286f8dad34fa46c3a2eeed45543e344438a436863adbfac4
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 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 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