quantlop
High-performance quantum simulator for matrix-free Hamiltonian evolution
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 computes the 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_pennylaneto build from PennyLaneHamiltonianobjectsql.Hamiltonian.from_qiskitto build from QiskitSparsePauliOpobjects
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.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| quantlop-0.0.6.tar.gz | 315.1 kB | Details |
Built distributions (wheels)
Total release size: 2.8 MB
Release files / quantlop-0.0.6.tar.gz
| Download URL | quantlop-0.0.6.tar.gz |
|---|---|
| Size | 315.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fbaa8b3e002b2519cede6ca6ee54dd8306936a60ca2c498935ac3b5689c41fd
|
|
BLAKE2b-256 checksum How to use checksums |
6090efb4e0cf0c73ee11c3d9eced54e699593a54f27172a7a0bd1608c6681c87
|
| 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 logRelease files / quantlop-0.0.6-cp314-cp314-win_amd64.whl
| Download URL | quantlop-0.0.6-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 86.5 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fa8d24d56ce8f185114d0e2572ec72d173ad5cea9ae7b2f89da46c5ec216d8f6
|
|
BLAKE2b-256 checksum How to use checksums |
45c9f5769fd63e3b63f0f96530a59537a8ab6970fa7236e03a569316a1c68fa2
|
| 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 logRelease files / quantlop-0.0.6-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | quantlop-0.0.6-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 |
ad9c4b58f29b94dad06df47600d8dbef9c0456621bfeb3d0b32fc19cf623f514
|
|
BLAKE2b-256 checksum How to use checksums |
7ab70fb70a9b10015f5bb51507f6493a6a26291f3ca7f1a46ff447d1c87f3be3
|
| 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 logRelease files / quantlop-0.0.6-cp314-cp314-macosx_26_0_arm64.whl
| Download URL | quantlop-0.0.6-cp314-cp314-macosx_26_0_arm64.whl |
|---|---|
| Size | 319.8 kB |
| Tags | CPython 3.14 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
92c3a90032180f9c6b968aa770de0efc21cac60ab1d675865a8261b44fae6c59
|
|
BLAKE2b-256 checksum How to use checksums |
524631a2e6b263be759152dc0b00e9718492fbdcb4831908e520671ae6ac1c16
|
| 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 logRelease files / quantlop-0.0.6-cp313-cp313-win_amd64.whl
| Download URL | quantlop-0.0.6-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 84.4 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
eb2be4f638f649bdacda8363c0730caf430ff565036e61463d67d8cc8b88decf
|
|
BLAKE2b-256 checksum How to use checksums |
d1412e0396345ae39990afdea5061db443161b929bbceb9719f2eed00cc24002
|
| 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 logRelease files / quantlop-0.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | quantlop-0.0.6-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 |
4b5b0736d2cb0ef792d46927254d82f0ef6c0b4d7c56a24bf7b1abbe05670d5f
|
|
BLAKE2b-256 checksum How to use checksums |
0e66091a7f507d4b2eaf905962bc22bacf3aca6443663ba9c7fadd0aef5dbfb5
|
| 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 logRelease files / quantlop-0.0.6-cp313-cp313-macosx_26_0_arm64.whl
| Download URL | quantlop-0.0.6-cp313-cp313-macosx_26_0_arm64.whl |
|---|---|
| Size | 319.7 kB |
| Tags | CPython 3.13 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
13d3f851da9004aa030da7ab910ce7b6f812ccd1a06de0de778ae58f4b067ccd
|
|
BLAKE2b-256 checksum How to use checksums |
2a8087a6abb7e9ab2bf353033b3084350f2acacde6e5b83f0346629be83347b9
|
| 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 logRelease files / quantlop-0.0.6-cp312-cp312-win_amd64.whl
| Download URL | quantlop-0.0.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 84.5 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f8b2cb4d749ecd0e70449d22dc2c2755785e422804a8017e5ca3650639498759
|
|
BLAKE2b-256 checksum How to use checksums |
83162b8ff64d10be56667a14dd4aff525161e9dd4be5d249312bcb07eeff52d3
|
| 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 logRelease files / quantlop-0.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | quantlop-0.0.6-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 |
88d1632f889ce642f0ebf695a1983ae6ec1189c8eca76a5e5066a62d0f821789
|
|
BLAKE2b-256 checksum How to use checksums |
031e40ec61ba98b1aef0f99eac6bacad2a7b98709a97c49f13ac15f5a730b744
|
| 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 logRelease files / quantlop-0.0.6-cp312-cp312-macosx_26_0_arm64.whl
| Download URL | quantlop-0.0.6-cp312-cp312-macosx_26_0_arm64.whl |
|---|---|
| Size | 319.8 kB |
| Tags | CPython 3.12 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5df30171885d3a37e60bec5ec41e475bfe73608dc8fe23a8a757c20fcfb11353
|
|
BLAKE2b-256 checksum How to use checksums |
260448e00b20bd284d1024b6f85f3bfd4a85f792ed19f9783d17d8c9d60f7ffc
|
| 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 logRelease files / quantlop-0.0.6-cp311-cp311-win_amd64.whl
| Download URL | quantlop-0.0.6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 85.3 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
79ed4c2ca5cce2bec0d8b104e39271a2faefb16d049ed45b683736678e0bbba3
|
|
BLAKE2b-256 checksum How to use checksums |
469c3c507e7468a7713eec72952e89a5a9a4476b2d7ab13c28a4f8c13b74f4c9
|
| 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 logRelease files / quantlop-0.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | quantlop-0.0.6-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 |
547ad41bfa904e9472a082a8d9f7e26aea2934c13ef03d55f361cb4809a98472
|
|
BLAKE2b-256 checksum How to use checksums |
ad9ffb639144026879aa19e788cded4ab2f1953f562eb8728e2218648a31de64
|
| 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 logRelease files / quantlop-0.0.6-cp311-cp311-macosx_26_0_arm64.whl
| Download URL | quantlop-0.0.6-cp311-cp311-macosx_26_0_arm64.whl |
|---|---|
| Size | 320.9 kB |
| Tags | CPython 3.11 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
42b0cfaa84d8eae9bbc8cffa68ddaccba2a702ce2e509437d43c2f65663eb951
|
|
BLAKE2b-256 checksum How to use checksums |
5fd8012b896154f6994401aeb3929075919ea16b950c32773b29ad0303b22c30
|
| 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