Python SDK to BlueQubit app
Project description
BlueQubit Python SDK
Quick Start
-
Register on https://app.bluequbit.io and copy the API token.
-
Install Python SDK from PyPI:
pip install bluequbit
- An example of how to run a Qiskit circuit using the SDK:
import qiskit
import bluequbit
bq_client = bluequbit.init("<token>")
qc_qiskit = qiskit.QuantumCircuit(2)
qc_qiskit.h(0)
qc_qiskit.x(1)
job_result = bq_client.run(qc_qiskit, job_name="testing_1")
state_vector = job_result.get_statevector()
# returns a NumPy array of [0. +0.j 0. +0.j 0.70710677+0.j 0.70710677+0.j]
- An example of how to run a Pennylane circuit using the SDK:
To use the Pennylane plugin, you must have pennylane~=0.37 version installed. It requires Python 3.9, but we recommend using Python 3.10 . Make sure your Python version is not older
import pennylane as qml
from pennylane import numpy as np
dev = qml.device('bluequbit.cpu', wires=1, token="<token>")
@qml.qnode(dev)
def circuit(angle):
qml.RY(angle, wires=0)
return qml.probs(wires=0)
probabilities = circuit(np.pi / 4)
# returns a NumPy array of [0.85355339 0.14644661]
The packages is tested extensively on Python 3.10.
Full reference
Please find detailed reference at https://app.bluequbit.io/sdk-docs.
Questions and Issues
Please submit questions and issues to info@bluequbit.io.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bluequbit-0.9.0b1.post1.tar.gz
(35.4 kB
view details)
Built Distribution
File details
Details for the file bluequbit-0.9.0b1.post1.tar.gz
.
File metadata
- Download URL: bluequbit-0.9.0b1.post1.tar.gz
- Upload date:
- Size: 35.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce73247108ddfaf63c7ce60e4a20774d0fdfa8a635f13860f538e350a0aafe6c |
|
MD5 | 8d90818318f061db8bb84c3cea6868c8 |
|
BLAKE2b-256 | f94d2706c632eb24ff62e83cfa7aa873a17218c97540e243c91affb3fec5cb03 |
File details
Details for the file bluequbit-0.9.0b1.post1-py3-none-any.whl
.
File metadata
- Download URL: bluequbit-0.9.0b1.post1-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3d8c40e7e27aeffaa98e5e3637737190812f343ca1fa908cdebf785ab1b7ca7 |
|
MD5 | cd9e93958d422adb45e29c6bdd037a8e |
|
BLAKE2b-256 | 02fefc58e106759a5f4972865a777fd47c7ab1fabe25d236b34568319a7bce73 |