Skip to main content

No project description provided

Project description

qulib

qulib is a Python library designed for working with quantum computing gates and registers. It provides basic operations to create, manipulate, and work with quantum states and gates using Python.

Features

  • Simple interface built using NumPy.
  • Handles application of gates.
  • Two qbit gates include: SWAP, CNOT.

Installation

You can install qulib using pip:

pip install qulib

Usage

Here’s a simple example of how to create a quantum register and apply a gate:

from qulib import QRegister
from qulib.Gates import X

# Create a quantum register with 2 qubits
qreg = QRegister(2)

# Apply an X gate (NOT gate) to all the qubits
qreg.apply_gate(X())

# Display the basis states of the quantum register
print(qreg)

# Mesure the sates by firing shots
print(qreg.mesure(shots=1000))

Requirements

  • Python 3.6+
  • NumPy

Running Tests

qulib uses pytest for testing. To run tests, install pytest and run:

pytest

Contributing

Feel free to submit issues, fork the repository, and make pull requests. Contributions are welcome!

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

qulib-0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

qulib-0.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file qulib-0.2.tar.gz.

File metadata

  • Download URL: qulib-0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for qulib-0.2.tar.gz
Algorithm Hash digest
SHA256 a1fcf3c5f4bdb3a201ac1ab8683bbdce36eb6fd7da560b82d8f813ee27136614
MD5 cc0b28046d8a707801c9c9ca73d311d7
BLAKE2b-256 24aa93823878212d12c01938397bd30cc407712acbef0d40fca8adb492ea9c43

See more details on using hashes here.

File details

Details for the file qulib-0.2-py3-none-any.whl.

File metadata

  • Download URL: qulib-0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for qulib-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c77199ed26e2c627a3f16d0e0421a6eafb8c0f5612ff71cf339438ef8d48a047
MD5 47e884e7e8baaf5f33d09842e40211e1
BLAKE2b-256 4dbf93717dc76b40698ab093166bd5d1203d7ab421f57e2713baf06607cc3d53

See more details on using hashes here.

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