Kickmix
Kickmix is a library for building and simulating quantum circuits that contain classically reversible operations (like the CCX gate), phasing operations (like the Z gate), and X basis demolition measurement (the Hadamard+Measure+Reset gate sequence). See the kickmix circuit file format (v2) and the kickmix instruction set for more information.
Also see the kickmix api reference.
Example usage:
import random
import tempfile
import kickmix as km
# Build a circuit.
builder = km.CircuitBuilder()
target = builder.create_quantum_register(10, "target")
offset = builder.create_quantum_register(10, "offset")
extra = builder.create_quantum_register(1, "extra")[0]
builder.ccx(target[0], offset[0], extra)
builder.iadd(target=target, offset=offset)
circuit = builder.finish_circuit()
# Simulate the circuit on 100 randomly chosen cases.
sim = km.Simulator(batch_size=100)
sim.use_same_registers_as(circuit)
sim.clear_for_shot()
offsets = [random.randrange(2**10) for _ in range(100)]
targets = [random.randrange(2**10) for _ in range(100)]
for k in range(100):
sim.write_within_shot("offset", k, offsets[k])
sim.write_within_shot("target", k, targets[k])
sim.write_within_shot("extra", k, 0)
sim.do(circuit)
# Check that the registers ended with the correct values.
for k in range(100):
assert sim.read_within_shot("offset", k, out=int) == offsets[k]
assert sim.read_within_shot("target", k, out=int) == (offsets[k] + targets[k]) % 2**10
assert sim.read_within_shot("extra", k, out=int) == offsets[k] & targets[k] & 1
# Check that there's no phase errors.
assert sim.read_phase_flipped_across_shots(out=int) == 0
# Output the circuit.
with tempfile.NamedTemporaryFile() as path:
circuit.to_file(path, format="kmx")
print(circuit.text_diagram())
which prints:
q0: -target[0]-@-----@----------------------------------------------------------------------@-----X-
| | | |
q1: -target[1]-|-----|-X---@-----------------------------------------------@-----X-X--------|-----|-
| | | | | | | | |
q2: -target[2]-|-----|-|---|---X---@--------------------@-----X-X----------|-----|-|--------|-----|-
| | | | | | | | | | | | | |
q3: -target[3]-|-----|-|---|---|---|---X-@-X-X----------|-----|-|----------|-----|-|--------|-----|-
| | | | | | | | | | | | | | | | | |
q4: -target[4]-|-X---|-|---|---|---|---X-X-|-|----------|-----|-|----------|-----|-|--------|-----|-
| | | | | | | | | | | | | | | | | | |
q5: -offset[0]-@-|---@-|---|---|---|---|-|-|-|----------|-----|-|----------|-----|-|--------Z**b0-@-
| | | | | | | | | | | | | | | | |
q6: -offset[1]-|-|---|-X---@---|---|---|-|-|-|----------|-----|-|----------Z**b0-@-X----------------
| | | | | | | | | | | | | | |
q7: -offset[2]-|-|---|-|---|---X---@---|-|-|-|----------Z**b0-@-X------------------|----------------
| | | | | | | | | | | | |
q8: -offset[3]-|-|---|-|---|---|---|---X-@-@-X------------------|------------------|----------------
| | | | | | | | | | |
q9: -offset[4]-|-@---|-|---|---|---|---|-----|------------------|------------------|----------------
| | | | | | | | | |
q10: -extra[0]--X-----|-|---|---|---|---|-----|------------------|------------------|----------------
| | | | | | | | |
q11: |0>-X-@---|-X-@---|-X-@-----@-X----------------@-X----------------@-HMR=b0
| | | | | |
q12: |0>-X-@-----|-|---------|------------------@-HMR=b0
| | |
q13: |0>-X-@---------@-HMR=b0
Metadata
Release files for kickmix 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kickmix-1.0.0.tar.gz | 226.4 kB | Without provenance | Details for kickmix-1.0.0.tar.gz |
Built distributions (wheels)
Total release size: 16.8 MB
Release files / kickmix-1.0.0.tar.gz
| Download URL | kickmix-1.0.0.tar.gz |
|---|---|
| Size | 226.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8d5006e52b80222eee20e9e79e45fa99c1f3595bacdd4156638ce1e1dc69461
|
|
BLAKE2b-256 checksum How to use checksums |
522e0767045af37d74ca768ff110dc1118c40f36391f1fab8909540c42f33a58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp314-cp314-win_amd64.whl
| Download URL | kickmix-1.0.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 729.0 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
34d6c25b92aa668c020303a9af54f58799847c6e0c3b49983e7d8c12c51a7fe8
|
|
BLAKE2b-256 checksum How to use checksums |
2c48c2e33b4987cd6756aad7b8cb7c650f0d7efe344caeb37d9ce8c171c647bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | kickmix-1.0.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4c684f55fd304cfd361b0ddc337b16a788222fc5d2e9f5f17aab360d619546b0
|
|
BLAKE2b-256 checksum How to use checksums |
8aef3f47d224e4af3b31d51dffc5d99ea7a161e3f10e997ba557062a5af3689d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | kickmix-1.0.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 732.1 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f2d5180cfc2b9748cb9a733f876213d5103ab89f36c8c902edce58c6f9188b9e
|
|
BLAKE2b-256 checksum How to use checksums |
1106e2f5fbe93ad878cf1c1d2733813cc3890f77c877c28403670b3be136419e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp314-cp314-macosx_10_15_x86_64.whl
| Download URL | kickmix-1.0.0-cp314-cp314-macosx_10_15_x86_64.whl |
|---|---|
| Size | 776.0 kB |
| Tags | CPython 3.14 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
69a8c808ddc47ec7ac6e2e87cfbd34c80d261e7b6f7f26fde9b40dc51201e7c8
|
|
BLAKE2b-256 checksum How to use checksums |
40dc2914b8bfea37f579e8ff3428feae289ac1af765b55c711c33f2ea02524ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp313-cp313-win_amd64.whl
| Download URL | kickmix-1.0.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 714.9 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d5ac9b393f1227011c08307063962221f0fa6b4165f9ecf09d0d2d7c39db73b2
|
|
BLAKE2b-256 checksum How to use checksums |
a763f52ef617a04a064e82e16dec72b21dc7ce38a62f6bcb26092c5a6757b453
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | kickmix-1.0.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
54f9272f792de4c37104212e331febc865dba66ac929eeb23bf2c48839354c5e
|
|
BLAKE2b-256 checksum How to use checksums |
a4d1a0d8957f5576a5a349c30576d36d320aa9cd05a336cd0850286c45d024d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | kickmix-1.0.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 730.8 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ec34e4d10e5ee1adfb21542df72db4359965c1b540a7a273e99125d054556176
|
|
BLAKE2b-256 checksum How to use checksums |
46c7ea759c40408c471a4277c5b25478a4c76f50f619955d7333bb9f2e563999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | kickmix-1.0.0-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 775.6 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
f370ebfa5298a774cea271c1f3c64707ad5900bbb9e99e0f09ce75cac6e08894
|
|
BLAKE2b-256 checksum How to use checksums |
a00c0e2ef68b02aa8d2f69c320af53f41cec36f3388f30f3d8f1fcc81d976e91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp312-cp312-win_amd64.whl
| Download URL | kickmix-1.0.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 714.8 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
16c01444215ec25563110b29fa1883291ddfdf6ea98bb5f6e2851a087d7f4007
|
|
BLAKE2b-256 checksum How to use checksums |
0343f424a96d6bb021b61e2e3c6620cba7ad1df087e583efdd8580a4cb7fd4a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | kickmix-1.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
cc26abcd5efa5e72f373148d5cca2ffa43e158a724e94c213b97622f23c6241a
|
|
BLAKE2b-256 checksum How to use checksums |
33ace079cb1914fcb333a62c85559912e59de558f3362547fbeb30d7d75fe63a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | kickmix-1.0.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 730.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
aedba8f9fc31f88d3a96e6f668d5cfd7a9fa9964e721c44246c54484e98518f0
|
|
BLAKE2b-256 checksum How to use checksums |
2b8260f294a277b58fff271c19f6c8d8a709acb9f6d1188c057150225ae7a9f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | kickmix-1.0.0-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 775.5 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
799d3576ca173b65f59e3cf26f8c05bb47542151988896371753c2da6a10e194
|
|
BLAKE2b-256 checksum How to use checksums |
c7282851b73c521fb34fc06140dcb8c576fd12b3f9004044647e6d9467588472
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp311-cp311-win_amd64.whl
| Download URL | kickmix-1.0.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 713.4 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6407d25ea1452dfd022b62572dddef666f23e97751b0449cc6b058d0699291cd
|
|
BLAKE2b-256 checksum How to use checksums |
a4dd4bc0423d4d1bdb61e1626d327afc42b8d5a85b87617f57601580930d3f83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | kickmix-1.0.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7c027d98fdfd96935138f483d1d46740992791dce477633dc5c85f6fa943a367
|
|
BLAKE2b-256 checksum How to use checksums |
153a0e6f1288b6af2ea2b08688f3112d126852088219b6693a3f0edf40a5b553
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | kickmix-1.0.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 730.3 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
334cd9ed3f673eaf2e6598289f648afdd3709d6a61e461c6617106683ed5947e
|
|
BLAKE2b-256 checksum How to use checksums |
fe244c261d7da71ca5829fd6137db64fcd93b063413ad1bdef5df24cbb2d33ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | kickmix-1.0.0-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 770.5 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
d587d71ff7249061f8fdb2a8e273e07b0477b8d4322fc53e78b48b2dac4d7d74
|
|
BLAKE2b-256 checksum How to use checksums |
cdc2ee1a0ce4ec4b087db0507540deae91f617117ec180548356b20b2c2b96a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp310-cp310-win_amd64.whl
| Download URL | kickmix-1.0.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 712.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
add54f596518fa9075aee5c407305e6a41e85ed08232da19b717b9c8f00c3a45
|
|
BLAKE2b-256 checksum How to use checksums |
c89a169d463fe8230536e262a298153439cf02fec4d915cd096e061f77da03c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | kickmix-1.0.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
26f213492694a6e500b9912ae875027d453e9b7ca0f9b0923838e4affef22e36
|
|
BLAKE2b-256 checksum How to use checksums |
9631cde8851438cf045405459298fcf65fae051f93ecf79130c5f93402762d6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | kickmix-1.0.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 729.5 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6f76480a109fcb2c410a16a24baf7b21351212185c9091c4d7cc065bbe658451
|
|
BLAKE2b-256 checksum How to use checksums |
b241b2422d346b40d81849bf57d49eade931af9cf3a27d19542494c4ff40c4c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kickmix-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | kickmix-1.0.0-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 769.0 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
8ed2c351d317b9e0d108b4d3098de72f8c68e3e635f7c85b3c68ebcbd1b8ad79
|
|
BLAKE2b-256 checksum How to use checksums |
a5ad323c14d1ecd04b797e59a548215a5cd1e14da0957b92cbf242e63b292fbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for kickmix 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.