Skip to main content

No project description provided

Project description

qulib

Qlib 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

Qlib 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.0.tar.gz (3.9 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.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for qulib-0.0.tar.gz
Algorithm Hash digest
SHA256 7559be081589cb3468b348d96bb26e2506fa0253a14595a7171539be24e0986b
MD5 7d6deaf9f50ce81279973c6777c83b1a
BLAKE2b-256 abb576edfc36ff08db86339341ed8c9c56cc6ae4283e4be548751993501cf4e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qulib-0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39f75b3355cc1071f96cad810d81cf047ed9ca912a00fb54a511de7329c8ce4e
MD5 1c57f74b40a71ec39c14f3be7b4ee957
BLAKE2b-256 5a37ad57d2cd8604c50288bd6c6dd743f3fe12adcae94e966863f23c554d2f7a

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