Qublets
Qublets is an approachable Quantum Computing Library written in Python using Intel's intel-qs Quantum Computing Simulator. The goal of the library is to make introductory quantum computing approachable at the undergraduate (or lower) level.
Setup
If you are on Unix, the easiest way to start using qublets is by installing the pre-compiled pip module:
pip install qublets
If you don't have pip installed, it takes 30 seconds and it will make your life managing Python deps much easier:
cd ~
curl https://bootstrap.pypa.io/get-pip.py > get-pip.py
python3 get-pip.py
If you are not on Unix or don't want to install pip, you can always build from source
Getting Started
Qublets makes it easy to run simple quantum examples. Consider the classic "Superposition qubit" case:
from qublets import QUInt
result = QUInt.zeros(1).hadamard().measure()
print(result)
As you can see, Qublets aims to be as readable as possible (although you can customize quite a bit later). Running the code above will yield a 1 50% of the cases and a 0 the rest. That's it. You may also notice (most) Qublets operators are chainable and will return the object they operated on - this makes building circuits a breeze.
If you're familiar with quantum state names, you can make the above example even shorter by using a |+〉state:
from qublets import QUInt
result = QUInt.pluses(1).measure()
print(result)
You may have noticed Qublets supports integers natively - in fact, it supports both unsigned and signed integers of any given size (that your computer can work with without combusting in flames). The example above easily generalizes to a 4-bit QInt:
from qublets import QInt
result = QInt.pluses(4).measure()
print(result)
Now, you'd instead get a (mostly) uniformly random number between -8 and 7.
It wouldn't really be a quantum computing library if we didn't entangle some bits so let's do that quickly:
from qublets import QUInt
q1 = QUInt.zeros(2)
q1[0].hadamard()
q1[1].c_negate(on=q1[0])
print(q1.measure())
# Or, just like before, we can use a shortcut
print(QUInt.fully_entangled(2).measure())
If you're familiar with quantum computing's ABCs, you'd likely be happy to see only 0 and 3 as the possible values of the measurements. That's because the classic had/cnot combo will give us a perfect |Φ+〉state (a bell pair) to work with. fully_entangled, on the other hand, will always entangle all the bits in a QInt using a chain of cnots - which would be equivalent for only 2 bits.
Qublets also supports cross-q(u)int operations, built-in primitives, batch runs for your circuits, extracting probability amplitudes and more - you can find some inspirational samples in docs/examples/
Metadata
Release files for qublets 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qublets-0.1.3.tar.gz | 180.7 kB | Without provenance | Details for qublets-0.1.3.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| qublets-0.1.3-cp310-cp310-manylinux_2_24_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.24+ x86-64 | Details for qublets-0.1.3-cp310-cp310-manylinux_2_24_x86_64.whl |
| qublets-0.1.3-cp39-cp39-manylinux_2_24_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.24+ x86-64 | Details for qublets-0.1.3-cp39-cp39-manylinux_2_24_x86_64.whl |
| qublets-0.1.3-cp38-cp38-manylinux_2_24_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.24+ x86-64 | Details for qublets-0.1.3-cp38-cp38-manylinux_2_24_x86_64.whl |
| qublets-0.1.3-cp37-cp37m-manylinux_2_24_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.24+ x86-64 | Details for qublets-0.1.3-cp37-cp37m-manylinux_2_24_x86_64.whl |
| qublets-0.1.3-cp36-cp36m-manylinux_2_24_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.24+ x86-64 | Details for qublets-0.1.3-cp36-cp36m-manylinux_2_24_x86_64.whl |
Total release size: 5.5 MB
Release files / qublets-0.1.3.tar.gz
| Download URL | qublets-0.1.3.tar.gz |
|---|---|
| Size | 180.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b50299ed57c4c28cf63f9bfabe96bddd5e7ddc6fd7476bb86db3aa1a52309f03
|
|
BLAKE2b-256 checksum How to use checksums |
9b3baa667e4e13a8f52ec6366101678357a20506a3a80d25a667b39ece65d158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / qublets-0.1.3-cp310-cp310-manylinux_2_24_x86_64.whl
| Download URL | qublets-0.1.3-cp310-cp310-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
7fb00febb72604acae8bed88e3362f93c8e8331e3598f9e7e336b533166966ac
|
|
BLAKE2b-256 checksum How to use checksums |
3a80dfc550bd09d7ea53c5280c4910701bd57ad56e1e6cb2b5fb2df10f9ab8c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / qublets-0.1.3-cp39-cp39-manylinux_2_24_x86_64.whl
| Download URL | qublets-0.1.3-cp39-cp39-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.9 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
1db4d059a6d0016360ecca300e1ae9cf3b512a3246a0d10b60145aac21bbcc0e
|
|
BLAKE2b-256 checksum How to use checksums |
b0a1d17f5ea54424642a311a99cbb2d9689243d9b693bd785dcac3a1ee32ce02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / qublets-0.1.3-cp38-cp38-manylinux_2_24_x86_64.whl
| Download URL | qublets-0.1.3-cp38-cp38-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
ca3b6ee8f8d55e0e30ccb496162a12d8b6e88ff6fd2b5cf0256050c2e6786701
|
|
BLAKE2b-256 checksum How to use checksums |
b51920061575367d95d0dd0a847094756d03912ebac6f46a068c4dc678e39212
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / qublets-0.1.3-cp37-cp37m-manylinux_2_24_x86_64.whl
| Download URL | qublets-0.1.3-cp37-cp37m-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
15e0afc4cdfb43a6df41ae1bfd01ea48ff4e385c700ae4e909b2b454232af6f6
|
|
BLAKE2b-256 checksum How to use checksums |
7285e284a7bfaba6a837d15c5cbe75c70b8bad565021cfd7568da289508a7cf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / qublets-0.1.3-cp36-cp36m-manylinux_2_24_x86_64.whl
| Download URL | qublets-0.1.3-cp36-cp36m-manylinux_2_24_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.24+ x86-64 |
|
SHA-256 checksum How to use checksums |
7ae84a28574b9db2bcc5e912f9e74bbfe7b98283d238a72bd648121230708bd3
|
|
BLAKE2b-256 checksum How to use checksums |
dfa21732ba907f55114fb37dbed3074ec412fcf63a801f5d6a2e25ef9dd224d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Security for qublets 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.