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

H = \sum_k c_k P_k

quantlop computes the action

|\psi(\theta)\rangle = e^{-i \theta H}|\psi\rangle

without constructing either the full Hamiltonian matrix or its exponential. Each Pauli word is applied directly to the dense state vector, while an adaptively scaled Taylor series evaluates the matrix-exponential action to double-precision accuracy.

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(ham, psi)

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

Evolution is serial by default. Set num_threads to a positive integer to use that many OpenMP threads, or to "auto" to use the CPU count reported by the operating system:

evolved_psi = ql.evolve(ham, psi, num_threads="auto")

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 dev mode and run Python tests with:

pip install -e .[dev]
pytest -v

Release files for quantlop 0.0.5

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.0.5
File Size Uploaded
quantlop-0.0.5.tar.gz 275.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for quantlop 0.0.5
File
quantlop-0.0.5-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
quantlop-0.0.5-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.0.5-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details
quantlop-0.0.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
quantlop-0.0.5-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.0.5-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details
quantlop-0.0.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
quantlop-0.0.5-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.0.5-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details
quantlop-0.0.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
quantlop-0.0.5-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.0.5-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details

Total release size: 2.6 MB

Release files / quantlop-0.0.5.tar.gz

Download URL quantlop-0.0.5.tar.gz
Size 275.9 kB
Tags Source
SHA-256 checksum
How to use checksums
10758a989101fe261e27ed3d4c32f91528fa906e853a95b8979eb47af1675bdd
BLAKE2b-256 checksum
How to use checksums
5f9a900e4660f0e6295e21fca1ed4b83e46213c9ad6870b40ab4c39b9f588f90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp314-cp314-win_amd64.whl
Size 76.6 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
4fb715e9f3a2f1feca84bdfebdce6ea5c5baf5485d19c2fbb157b34a4632cb69
BLAKE2b-256 checksum
How to use checksums
f1918c9d52f7afc3f49efc8847e6f60206f296e705d95c82bf489d1eedf6be16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 198.3 kB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6ee8bd734bdbb5df356733d17d2ee78ee7dea9b329a05677fd456b9fb0157e27
BLAKE2b-256 checksum
How to use checksums
fbd8420a98279646c6d4e71ae968e4d26df659cc27ac5792f6ae58e9134e1313
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp314-cp314-macosx_15_0_arm64.whl
Size 310.9 kB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
4ffec745145b5859159b5b2aa58190f58b5d3708fe521f3f788773201d2937ff
BLAKE2b-256 checksum
How to use checksums
0e4c2ba49aaf9d4622210d50ac2c023271e4a46f9671a0236337c48b8abdb0a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp313-cp313-win_amd64.whl
Size 74.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
8d67dc887f05ba442c1a085c90c50ec3a091f4027480410f021fc4d06f8e6038
BLAKE2b-256 checksum
How to use checksums
f7c6515515a50859627fa74ec9649f1c1afab8a1db0446255c6a7b7239274509
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 198.2 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2bd80175587ccf59b1318e2cffaa5490513f42bd1f2cf3a39b770ade2877487a
BLAKE2b-256 checksum
How to use checksums
a8915922934890fd42174c0a851024254a8b93baaa75555f826e8558e71f4213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp313-cp313-macosx_15_0_arm64.whl
Size 310.9 kB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
34bb4c63cd59784d9b4a0a20cb984d28e9bd3f195b2ea18fbc6203510e11bbbe
BLAKE2b-256 checksum
How to use checksums
b551254e6d92064f97bc6bcef593e6934c163752ac8c933a97d84a18b3bbb0b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp312-cp312-win_amd64.whl
Size 74.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
cd5558f5c9478afd1262e7be77dbb7f8941d84e1891ce59ea1ca50a226d2a658
BLAKE2b-256 checksum
How to use checksums
8ee2ebb1cf8b6dd024f23a9e2c90da8c69c941b0185b119a50bff67eb70c6dd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 198.3 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
372f760ea316627f7708bf610572e9aab11d21d00e9c8b5677b7f6b9c0e4ed68
BLAKE2b-256 checksum
How to use checksums
617b502ef0fdcf3a203ef4599e59f1440b9961fc67f41058fb45c7994edf8334
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp312-cp312-macosx_15_0_arm64.whl
Size 310.9 kB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
c004c703652a611b17644a3498245e77a595b319ea45b88e9de58310dd6d11e3
BLAKE2b-256 checksum
How to use checksums
bb6d825076b3498e63652faf17a92f9bb75538d3f8c7a4d40843373c9fbb7038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp311-cp311-win_amd64.whl
Size 75.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b033f93f2815c0ca18eb6f4f29c987a779b42bd63102b6bbe3c98c951c294d7f
BLAKE2b-256 checksum
How to use checksums
0d4fe942b0a2c95a4abde9462ba08b7f5d6b1574ce2e7fe070cd6f15f543c7ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 199.4 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1e045128d580798c5523a2f22f2be400bbbade421d689bc7a8ec5313f4b30a7b
BLAKE2b-256 checksum
How to use checksums
bba31e999875319dcc51ca907cc39f49c918e852c437bfa601a0e52cadcc5c05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

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

Download URL quantlop-0.0.5-cp311-cp311-macosx_15_0_arm64.whl
Size 312.1 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
2f64477afec6e8a97b74c30836deb10ef66f8f15c4e1779b3931710a2a884b0f
BLAKE2b-256 checksum
How to use checksums
686cca868496d1f30a67f134fbb76c7ee8a1c0bfef62d3b1ac8ddf9b2534f843
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.5 This release

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