Skip to main content

Qitker

Qitker explores quantum computation with Fibonacci anyons. It connects a simple circuit interface circuit, qubit, and qRegister to a backend that represents states in fusion spaces and performs braiding through F- and R-moves. Circuits can also be exported to Qiskit.

For the complete circuit-building API, see the API reference (D5).

Current status

  • The version 1 frontend and Qiskit export are implemented and tested.
  • The anyonic backend models computational and leakage states and supports physical cross-qubit braiding.
  • Normal backend execution includes stored braid sequences for CX, CY, CZ, CS, CT, CCX, CCY, CCZ, CCS, and CCT.
  • The circuit API and Qiskit export impose no fixed limit on the number of controls per gate. Version 1 anyonic execution supports up to two controls per gate; this does not limit the total number of qubits in a circuit.
  • The physical backend represents Fibonacci anyons in a fusion-tree basis and tracks both computational and leakage states.
  • It applies physical braids through F and R moves, including braids across qubit boundaries, and reports fidelity and leakage relative to the ideal logical result.

Installation

Qitker requires Python 3.11 or newer. Run the installation commands with the same Python interpreter that you use to run your programs. Installation is needed once per Python environment.

Install from PyPI

Install Qitker version 1.0.0 and its NumPy dependency from PyPI:

python -m pip install "qitker==1.0.0"
python -m pip check

For Qiskit export support, install the optional dependency:

python -m pip install "qitker[qiskit]==1.0.0"

Install from source

From a checkout of this repository, install Qitker and its NumPy dependency with:

python -m pip install .

For Qiskit export support, use this command instead:

python -m pip install ".[qiskit]"

Install dependencies for examples and plots

After installing Qitker by either method above, run the following from the repository root:

python -m pip install -r requirements.txt
python -m pip check

requirements.txt installs Qiskit with its visualization dependencies, Qiskit Aer for simulation, SciPy for optimization, and Matplotlib for plots. The qiskit[visualization] extra also installs pylatexenc, which is required by draw("mpl"). In Python, plt is an alias for matplotlib.pyplot, not a separate package.

The qitker[qiskit] extra provides circuit export; use requirements.txt for the simulation and plotting examples below. This requirements file installs dependencies only. Qitker itself must be installed separately using one of the commands above.

The example scripts and requirements.txt are available in this repository and are not included in the installed Qitker wheel. Download them or clone the repository to run the examples. For testing the published release on another computer, use the PyPI installation commands above rather than installing from source.

Quick start: anyonic execution

from qitker import circuit, qubit

party = circuit()
aliza = qubit(party)
baruch = qubit(party)

aliza.mix()
baruch.flipIf(aliza)

result = party.measure(shots=1024)
print(result)

measure() executes the circuit through Qitker's anyonic backend and returns a report containing measurements, fidelity, and leakage.

Export to Qiskit

With the Qiskit dependency installed, export a circuit as a Qiskit QuantumCircuit:

from qitker import circuit, qubit

sample = circuit()
qubit(sample).mix()

qiskit_circuit = sample.exportCircuit("qiskit")
print(qiskit_circuit)

Qiskit export also preserves rotation angles and controlled rotations, which are not supported by the current anyonic execution path.

Export converts the circuit's gates; it does not run the anyonic backend or add Qiskit measurement instructions. Add those instructions explicitly before sampling with Qiskit Aer.

Simulate and plot with Qiskit Aer

Install requirements.txt before running this example. It exports a Bell circuit, draws it with Matplotlib, samples it in Aer, and displays a histogram:

from qitker import circuit, qubit
from qiskit import transpile
from qiskit_aer import Aer
from qiskit.visualization import plot_histogram
import matplotlib.pyplot as plt

party = circuit()
aliza = qubit(party)
baruch = qubit(party)
aliza.mix()
baruch.flipIf(aliza)

qc = party.exportCircuit("qiskit")
qc.measure(*party.getMeasuredLists())
qc.draw("mpl")

simulator = Aer.get_backend("qasm_simulator")
compiled = transpile(qc, simulator)
counts = simulator.run(compiled, shots=1024).result().get_counts()

# Display the first Qitker qubit on the left of each bitstring.
qitker_counts = {bits[::-1]: count for bits, count in counts.items()}
print(qitker_counts)
plot_histogram(qitker_counts)
plt.show()

Aer simulates the exported logical gates. Its results do not include Qitker's physical braiding fidelity or leakage. Use party.measure() for those quantities. plt.show() displays figures in a desktop environment with a graphical Matplotlib backend.

Examples and tests

Start with the project overview (D0) for the motivation, execution paths, and current limitations. The guides below explain each example.

After installing the example dependencies, run an example from the repository root:

python -B Examples/EX3_advanced_grover.py
Example Guide Execution and output
Bell and GHZ states D1 Qitker anyonic execution, text circuit drawings, and measurement reports
Simple Grover search D2 Qitker anyonic execution and text output
Advanced Grover search D3 Qiskit Aer simulation, circuit drawing, and a Matplotlib histogram
Sudoku with QAOA D4 Qiskit Aer simulation and SciPy optimization

Licensed under the MIT License.

Metadata

Release files for qitker 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 qitker 1.0.0
File Size Uploaded Provenance Actions
qitker-1.0.0.tar.gz 71.7 kB Without provenance Details for qitker-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qitker 1.0.0
File Interpreter ABI Platform Actions
qitker-1.0.0-py3-none-any.whl Python 3 none any Details for qitker-1.0.0-py3-none-any.whl

Total release size: 161.2 kB

Release files / qitker-1.0.0.tar.gz

Download URL qitker-1.0.0.tar.gz
Size 71.7 kB
Tags Source
SHA-256 checksum
How to use checksums
56979f88c462c3fc9f92ff1c64eb69ac0b1376a268b48fa92efd00cbf9c0bbfd
BLAKE2b-256 checksum
How to use checksums
406a63c898facd52233182fba42a8a2620b03ed9452829a58985e107d507d4be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release files / qitker-1.0.0-py3-none-any.whl

Download URL qitker-1.0.0-py3-none-any.whl
Size 89.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8379f21061e0de190fb91dd18b5e9bdb644238a4a67960e6c521d8c424a3b98
BLAKE2b-256 checksum
How to use checksums
5ee580bfa4ad05057873dae611502a136f28b34b98068d8cd00f06950bb56e88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Security for qitker 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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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