Skip to main content

qutrunk is an open source library for quantum computing.

Project description

qutrunk

qutrunk is an quantum programming framework developed by QuDoor corporation, provide the required APIs for quantum programming, it works as follow:

Export quantum programs based on quantum circuit, qubit and quantum gate, etc. Then you can run the quantum circuit by the following two ways:

  1. Use PC for quantum computing(work as the default way).
  2. Connect with QuBox(a quantum device developed by qudoor), to run quantum programs, it provide more powerful quantum computing.

Install

  1. Install from whl package, run the following command directly:
pip install qutrunk
  1. Install from source code, run the following command to install qutrunk by source code:
python3 setup.py install

Example:

bell-pair quantum algorithm:

from qutrunk.circuit import QCircuit
from qutrunk.circuit.gates import H, CNOT, Measure

qc = QCircuit()
qr = qc.allocate(2) # allocate

H | qr[0]   # apply gate
CNOT | (qr[0], qr[1])
Measure | qr[0]
Measure | qr[1]

qc.print(qc)   # print circuit
res = qc.run(shots=1024) # run circuit
print(res.get_counts()) # print result

License

Apache Licence 2.0

Copyright (c) 2022-2025 By QUDOOR Technolgies Inc. All Right Reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qutrunk-0.1.9.tar.gz (1.1 MB view hashes)

Uploaded Source

Built Distribution

qutrunk-0.1.9-py3-none-any.whl (1.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page