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

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

Built distributions (wheels)

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

Download URL quantlop-0.0.7.tar.gz
Size 315.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3f90e853e255df65a84adab8195b633a95d06db9885d82a545eed408d6a054ed
BLAKE2b-256 checksum
How to use checksums
b0c27b3cfa04b8e0768c8b70ff883ac647aa4905f599624e54011d547c313162
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.0.7-cp314-cp314-win_amd64.whl

Download URL quantlop-0.0.7-cp314-cp314-win_amd64.whl
Size 86.5 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c0c6e77bd190d5f11a314ab49f686661168e3343cb3ba5cb56a73ebd1ad753f7
BLAKE2b-256 checksum
How to use checksums
e5ead7d9f4410845a1a16f0d3895cbc1cea67a705c61ee750da134902b88abd1
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.0.7-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.0.7-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
1ea7a16165a3b3c408c13b005ffc7f8b10ad831a1a856321ffe08384eec0fa79
BLAKE2b-256 checksum
How to use checksums
bb1aaf4a2b552ea044ee5d1773e833b0887a46816ace815dcd94858c1530c303
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.0.7-cp314-cp314-macosx_15_0_arm64.whl

Download URL quantlop-0.0.7-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
b2618c300c056c45e414c5502168a82e3f2fa4d6c1fba9eb58426cf030a6b8a8
BLAKE2b-256 checksum
How to use checksums
857579ba0b1e846d43edd8cbc24da8c4a5cbaed65ff0de69a29799ae4140a1d0
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.0.7-cp313-cp313-win_amd64.whl

Download URL quantlop-0.0.7-cp313-cp313-win_amd64.whl
Size 84.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
221ed09926cb4d376084431faade3f450ca65f15d33f9d511f6c1abc6daf2386
BLAKE2b-256 checksum
How to use checksums
63924c3b0ca118958f930348ef1f2a3a2a754433dba35b85bf3ac3c5c7d54238
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.0.7-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.0.7-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
7073d77431be5751d567778c62c82682ee453dc6c715459c4794e676a72c416f
BLAKE2b-256 checksum
How to use checksums
932184191a29d3f0cdd6664152a9c3286b0a6e99f18b2d664be3b26010521587
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.0.7-cp313-cp313-macosx_15_0_arm64.whl

Download URL quantlop-0.0.7-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
44df57c40a1ba90b03540edad23ebf82c469babd7937a23601420e300c231f80
BLAKE2b-256 checksum
How to use checksums
d5ee1e16760ebfc6d3b8ce7a2e3e98fa800f2a14925c6dc5ab9c0bf03e0ffdd8
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.0.7-cp312-cp312-win_amd64.whl

Download URL quantlop-0.0.7-cp312-cp312-win_amd64.whl
Size 84.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c9c6d06053fe0042344b06f6fca7c9821bff6af503e57abd93e2b2dcac937a98
BLAKE2b-256 checksum
How to use checksums
e09f088287b3c65ae014a83747df18feca278667bc5dc594ce632965689818c7
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.0.7-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.0.7-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
2e15c0cae36a4cfe7e65127c999859982e0c5131ad227bdbd0de7190cf85deea
BLAKE2b-256 checksum
How to use checksums
29b25c3a62a5c58c400fe7976abfdc3709127a54593ab3e71376c3a690b81310
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.0.7-cp312-cp312-macosx_15_0_arm64.whl

Download URL quantlop-0.0.7-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
3b258935fa3aa2836e481253da803beaf3c429fa9bf8ff67abae7597b88ac5a0
BLAKE2b-256 checksum
How to use checksums
44e847f90fd1da3407e3a5f351553db0377040d6727be8569289b43c1e6cb6de
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.0.7-cp311-cp311-win_amd64.whl

Download URL quantlop-0.0.7-cp311-cp311-win_amd64.whl
Size 85.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
a49ceda846fa260c068ecea5aadcfee2694fe8805ec000354572ddb692df81d1
BLAKE2b-256 checksum
How to use checksums
d36f1e3cf8bdc4383003c09c9cb106468be2458a94abb98a6aff7947a184ffdd
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.0.7-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL quantlop-0.0.7-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
722522a2ef9ea5965ff877aa7264fea2ffa12fc08988ca677b42db31a82e0fb2
BLAKE2b-256 checksum
How to use checksums
b3dc710b8f63948ac5bbde8876faea5849b8011529bafde4339a09aa249c7c21
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.0.7-cp311-cp311-macosx_15_0_arm64.whl

Download URL quantlop-0.0.7-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
a511b92471717f9d9c234b7eb840bdd1a95c829de49263b348fc99ca20586cdd
BLAKE2b-256 checksum
How to use checksums
33f92ec74ca3fa839e40385328d2c6c368d175b85b0ef95a90701e4e62d0a3c3
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.0.7 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