Simple quantum computing simulation library
Project description
AriQuantum 🌌
A simple quantum computing simulation library with an intuitive interface.
Perfect for students and beginners in quantum computing — no complex dependencies or noise models, just core operations and visualization.
Installation
Requires Python 3.9+ and numpy:
pip install ariquantum
Quick Start
1. Working with individual qubits
from ariquantum.qubit import Qubit
# Create qubits in different initial states
q0 = Qubit('0')
q_plus = Qubit('+')
# Display states in Dirac bra-ket notation
print(q0.as_bracket_string()) # |0⟩
print(q_plus.as_bracket_string()) # 0.70711|0⟩ + 0.70711|1⟩
2. Quantum circuits and visualization
from ariquantum.quantum_register import QuantumRegister
qr = QuantumRegister(2) # 2-qubit register
# Apply gates: H on qubit 0, CX between 0 and 1
qr.h(0)
qr.cx(0, 1)
# Display state and circuit diagram
print(qr.as_bracket_string())
# 0.7071|00⟩ + 0.7071|11⟩
qr.draw_circuit()
# ┌───┐
# q0 : ─│ H │───●─── :
# └───┘ │
# ┌─┴─┐
# q1 : ───────│ X │─ :
# └───┘
3. Measurements
qr.measure(qubits=[0, 1]) # Deferred measurement
print(qr.get_counts(shots=100))
# Example output: {'11': 53, '00': 47}
Key Features
- Flexible control: Manage individual qubits or full quantum registers.
- Circuit visualization: Auto-generated ASCII diagrams of quantum circuits.
- Bra-ket notation: Human-readable state representation (e.g.,
0.7|00⟩ + 0.7|11⟩). - Measurements: Support for deferred execution with customizable shot counts.
Project Structure
ariquantum/
├── __init__.py
├── build_operator.py # Building operators for multi-qubit systems
├── exceptions.py # Quantum-specific error handling
├── helpers.py # Utility functions
├── quantum_register.py # Core: QuantumRegister class for state management
├── qubit.py # Single-qubit operations and state handling
└── visualization.py # State/circuit visualization tools
License
Distributed under the MIT License.
Support
For questions or feedback:
- GitHub Issues
- Email: arimshcherbakov@gmail.com
- Telegram: @ArimShcherbakov
🇷🇺 Русская версия: README_RU.md
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ariquantum-0.2.0.tar.gz.
File metadata
- Download URL: ariquantum-0.2.0.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7187f69cf62baa8abc53f63185ffe26af78b839d8674af8251ccf9c5f4cb6d0
|
|
| MD5 |
99465383498e35de31f7aeee9bd6c94d
|
|
| BLAKE2b-256 |
4034c4b7730acaa203a5404c063dc330a490b15ec9b9ce12e24dba16d4d342b2
|
Provenance
The following attestation bundles were made for ariquantum-0.2.0.tar.gz:
Publisher:
python-publish.yml on AriQuantum/ariquantum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ariquantum-0.2.0.tar.gz -
Subject digest:
c7187f69cf62baa8abc53f63185ffe26af78b839d8674af8251ccf9c5f4cb6d0 - Sigstore transparency entry: 1394291676
- Sigstore integration time:
-
Permalink:
AriQuantum/ariquantum@ba2d250b6f21102573516252ed2c0e7c3114b009 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/AriQuantum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ba2d250b6f21102573516252ed2c0e7c3114b009 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ariquantum-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ariquantum-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a697266e8f77d14ab64491ca5dd53959e86c1147e0d856b4c86dbdd781cc9d0
|
|
| MD5 |
37f3a7ae74c4586a4a14b99925bf951c
|
|
| BLAKE2b-256 |
56c7e2f5aca56677febb4b37d8a64d0bb03d9b8aa5bef56947c5b15e5214682a
|
Provenance
The following attestation bundles were made for ariquantum-0.2.0-py3-none-any.whl:
Publisher:
python-publish.yml on AriQuantum/ariquantum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ariquantum-0.2.0-py3-none-any.whl -
Subject digest:
1a697266e8f77d14ab64491ca5dd53959e86c1147e0d856b4c86dbdd781cc9d0 - Sigstore transparency entry: 1394291680
- Sigstore integration time:
-
Permalink:
AriQuantum/ariquantum@ba2d250b6f21102573516252ed2c0e7c3114b009 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/AriQuantum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ba2d250b6f21102573516252ed2c0e7c3114b009 -
Trigger Event:
release
-
Statement type: