Skip to main content

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.

PyPI version PyPI Downloads License: MIT Python 3.9+


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:

🇷🇺 Русская версия: 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

ariquantum-0.2.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ariquantum-0.2.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

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

Hashes for ariquantum-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c7187f69cf62baa8abc53f63185ffe26af78b839d8674af8251ccf9c5f4cb6d0
MD5 99465383498e35de31f7aeee9bd6c94d
BLAKE2b-256 4034c4b7730acaa203a5404c063dc330a490b15ec9b9ce12e24dba16d4d342b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ariquantum-0.2.0.tar.gz:

Publisher: python-publish.yml on AriQuantum/ariquantum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for ariquantum-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a697266e8f77d14ab64491ca5dd53959e86c1147e0d856b4c86dbdd781cc9d0
MD5 37f3a7ae74c4586a4a14b99925bf951c
BLAKE2b-256 56c7e2f5aca56677febb4b37d8a64d0bb03d9b8aa5bef56947c5b15e5214682a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ariquantum-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on AriQuantum/ariquantum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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