Skip to main content

vqubit

A dependency-free quantum computing framework for Python, written in V.

PyPI Python versions CI License: MIT

vqubit lets you build quantum circuits and run them on local simulators with zero third-party dependencies. The numerically heavy work — linear algebra, gate matrices and simulation — is written in V and compiled into a native extension; the public API is dependency-free Python on top of it.

The API mirrors Cirq closely, so if you know Cirq you already know vqubit.

import vqubit as vq

q0, q1 = vq.LineQubit.range(2)
circuit = vq.Circuit(vq.H(q0), vq.CNOT(q0, q1), vq.measure(q0, q1, key="result"))
print(circuit)

result = vq.Simulator().run(circuit, repetitions=100)
print(result.histogram(key="result"))

Highlights

  • No dependencies. pip install vqubit installs nothing else. Everything runs offline, on your machine.
  • Native speed. Linear algebra, gate matrices and simulation are compiled from V, not interpreted.
  • One wheel, every Python. A single abi3 wheel covers CPython 3.11–3.15 per platform.
  • Cross-platform. Linux (x86-64 and ARM), macOS (ARM) and Windows (x86-64).
  • Cirq-compatible API. Build, transform and simulate circuits the way Cirq documents them.

Installation

$ pip install vqubit

Requires Python 3.11 or newer. No other packages are installed.

Documentation

The full documentation is published at https://rroblf01.github.io/vqubit/ in both Spanish (the default) and English. It starts from "what is a qubit?" and builds up to circuits and simulation.

Status

vqubit is 1.0.0, and from here the public API follows SemVer: nothing that works today is removed without a deprecation cycle first, and an incompatible change means a major version (the policy is written down in Stability and versions). It exports every one of cirq-core's top-level names except contrib, and the simulators, optimizers, transformers and devices are in place; the call conventions that still differ are listed in Differences from Cirq. See CHANGELOG.md for the full list and ROADMAP.md for what comes next.

It ships wheels for Linux (x86-64 and ARM), macOS (ARM) and Windows (x86-64), plus a source distribution, and is built with vcraft.

Development

vqubit is built with vcraft. You need the V compiler, a C compiler, and uv for the development tooling.

$ python -m venv .venv && source .venv/bin/activate
$ pip install vcraft
$ uv pip install --group dev   # pytest, coverage, hypothesis, ruff, ty, build
$ vcraft develop               # build and install into the active virtualenv
$ python main.py               # run the example
$ pytest                       # run the test suite
$ vcraft build --release       # write an abi3 wheel into dist/

The dev and docs tooling are [dependency-groups] in pyproject.toml; use uv pip install --group docs for the documentation toolchain. (uv pip install adds to the virtualenv without pruning it — uv sync would remove the editable extension that vcraft develop installs.)

The development setup is the only thing that needs the V toolchain — the published wheels need nothing.

Community

  • Contributing: CONTRIBUTING.md explains the setup and every check a pull request has to pass.
  • Code of conduct: CODE_OF_CONDUCT.md.
  • Security: SECURITY.md — please report vulnerabilities privately, not in a public issue.
  • Citing: CITATION.cff (GitHub's "Cite this repository" button reads it).

Acknowledgements

vqubit stands on the design of Cirq: its gate model, its protocols and the shape of its API are Cirq's, and the parity harness compares the two name by name. The stabilizer simulator follows Aaronson and Gottesman, Improved Simulation of Stabilizer Circuits; the two-qubit decompositions follow Shende, Bullock and Markov (quant-ph/0308033) and the fSim synthesis follows arXiv:1910.11333. The native core is written in V and built with vcraft.

License

MIT. See LICENSE. © Ricardo Robles Fernández.

Metadata

Release files for vqubit 1.0.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 vqubit 1.0.0
File Size Uploaded Provenance Actions
vqubit-1.0.0.tar.gz 420.0 kB With provenance Details for vqubit-1.0.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for vqubit 1.0.0
File Actions
vqubit-1.0.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for vqubit-1.0.0-cp311-abi3-win_amd64.whl
vqubit-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for vqubit-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl
vqubit-1.0.0-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for vqubit-1.0.0-cp311-abi3-musllinux_1_2_aarch64.whl
vqubit-1.0.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for vqubit-1.0.0-cp311-abi3-manylinux_2_28_x86_64.whl
vqubit-1.0.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for vqubit-1.0.0-cp311-abi3-manylinux_2_28_aarch64.whl
vqubit-1.0.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for vqubit-1.0.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 4.0 MB

Release files / vqubit-1.0.0.tar.gz

Download URL vqubit-1.0.0.tar.gz
Size 420.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3776c0cea927a1b6892b8911698411afa14d6f4cfdef55d60462eb6a00e100d8
BLAKE2b-256 checksum
How to use checksums
5a4b4fa22e80f8b9249996811ab19ac9d0804f6d5207385789fedf39565d45f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / vqubit-1.0.0-cp311-abi3-win_amd64.whl

Download URL vqubit-1.0.0-cp311-abi3-win_amd64.whl
Size 633.7 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f5975ecab218b03e14056e67e242962b72e783664009ab3abd294870049f8504
BLAKE2b-256 checksum
How to use checksums
cb32a023be9b5eec85f50570f7bd55f59eee28040c8eabce55044dec7402f77e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / vqubit-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL vqubit-1.0.0-cp311-abi3-musllinux_1_2_x86_64.whl
Size 603.8 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
95213c4d3800323408588a292c4d04b2edc545d94042fb819b98cb3c3f0d2ea3
BLAKE2b-256 checksum
How to use checksums
733fe47e582ad9668da2ecf335a5a38d47274b1011aa19acc7c9ea610a96c1bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / vqubit-1.0.0-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL vqubit-1.0.0-cp311-abi3-musllinux_1_2_aarch64.whl
Size 607.6 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
46addfe017fc7bd3a5afc3a26957dce7783ede624f6016b9b561e2d69a856c2b
BLAKE2b-256 checksum
How to use checksums
892f4330ee631197b3012ec4c89db560d3dceb68b53756113bed4fa16d64def2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / vqubit-1.0.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL vqubit-1.0.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 615.0 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
c791b9fd7bf98c07dda7398710356961f4a6fbbd8da27b664d8955a0267d2c06
BLAKE2b-256 checksum
How to use checksums
98d66fd8d834521b3b14430fcd67bf6aa5ee429b1c2eac3fa40a02cd43d943f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / vqubit-1.0.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL vqubit-1.0.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 607.5 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
a04c99a18d102c8c879690241395c3dc5a6f7a4439c9644bfd79c7064716600c
BLAKE2b-256 checksum
How to use checksums
a39d8587e5395034141e31bbfbde6af227191c70a2742baf88e925b8249f8cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Release files / vqubit-1.0.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL vqubit-1.0.0-cp311-abi3-macosx_11_0_arm64.whl
Size 522.9 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6d5e73d6ff753847a0d439adf181304f0511b19e3f3a40840737d7eff3d20b02
BLAKE2b-256 checksum
How to use checksums
a29f21291be3e391276f46afe8e77f3575ed935eea226e443097618f4913f690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 21, 2026.

Transparency log

Security for vqubit 1.0.0

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.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for vqubit-1.0.0.tar.gz

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 Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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