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.1.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.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qulib-0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 97e2afd3d0d29e1b68a14a8bf463567455ebe739a373c6412a9dab5cd5587588
MD5 f30832d8e67a8afd49de26f3cd1c869a
BLAKE2b-256 ebe0612139eb4a7e7f2a44265876a8edbf7ca42ed667a949abc9d7d0251fce30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qulib-0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f71f569c71f9003710f7eb6c12aa4848f5023bccf485449a1742ee7bc9172a2a
MD5 6e77cbba89aded489be2de139cf8eddb
BLAKE2b-256 526c9cfbfc318327f5b5904689c14be96c576fe1e797922d78837bcedf57214b

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