This release is a pre-release and may not be stable for production use.
Kipu Quantum Hub Quantum SDK
The Kipu Quantum Hub Quantum SDK is for developing quantum circuits using Qiskit to be run on quantum devices provided by the Kipu Quantum Hub. This library is an extension for Qiskit. This means that you are able to seamlessly integrate and reuse your existing Qiskit code, leveraging the power and familiarity of a framework you are already accustomed to.
Getting Started
Check out the following guides on how to get started with Kipu Quantum Hub:
Requirements
- Python 3.11+
uvfor development and dependency management
Installation
The package is released on PyPI and can be installed via pip:
pip install --upgrade qhub-quantum
To install a pre-release version, use the following command:
pip install --pre --upgrade qhub-quantum
A pre-release is published from
mainwithout review, and its number is a build counter, not a forecast of the next stable version.1.13.2rc2can ship as1.14.0.
Stable releases are gated behind a merge request; see the release process.
Usage
Working with Qiskit Backends
You can execute a Qiskit circuit on a selected backend, retrieve its job object, and its results:
from qhub.quantum.sdk import HubQiskitProvider
from qiskit import QuantumCircuit, transpile
# Initialize the provider
provider = HubQiskitProvider()
# Select a backend, full list of backends can be found at https://platform.planqk.de/quantum-backends
backend = provider.get_backend("azure.ionq.simulator")
# Create a Qiskit circuit
circuit = QuantumCircuit(3, 3)
circuit.h(0)
circuit.cx(0, 1)
circuit.cx(1, 2)
circuit.measure(range(3), range(3))
# Transpile the circuit for the selected backend
circuit = transpile(circuit, backend)
# Execute the circuit on the selected backend
job = backend.run(circuit, shots=100)
# Monitor job status and get results
print(f"Status: {job.status()}")
print(f"Result: {job.result()}")
Working with Braket Devices
You can execute a Braket circuit on a selected device, retrieve its task object, and its results:
from braket.circuits import Circuit
from qhub.quantum.sdk import HubBraketProvider
# Select the IonQ Forte device
device = HubBraketProvider().get_device("aws.ionq.forte")
# Create a Braket circuit
circuit = Circuit().h(0).cnot(0, 1).cnot(1, 2)
# Execute the circuit with 100 shots
task = device.run(circuit, 100)
# Monitor task status and get results
print(f"Status: {task.state()}")
print(f"Result: {task.result()}")
Development
To create a new virtual environment, for example, run:
uv venv
uv sync
Then, to activate the environment:
source .venv/bin/activate
Update dependencies and lock files:
uv sync -U
Testing
Run the test suite with:
pytest
Linting
Lint and format with ruff:
ruff check .
ruff format .
License
Apache-2.0 | Copyright 2023-present Kipu Quantum GmbH
Metadata
Release files for qhub-quantum 1.16.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qhub_quantum-1.16.0rc1.tar.gz | 2.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qhub_quantum-1.16.0rc1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.9 MB
Release files / qhub_quantum-1.16.0rc1.tar.gz
| Download URL | qhub_quantum-1.16.0rc1.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
954a6b1b7b233fbc43bbedef342a29c16928b2f1552023981ca27089e040438e
|
|
BLAKE2b-256 checksum How to use checksums |
15ab65ad9353ae0c7b45066004d37aceda616fd67c49b86dfe5d80587441057f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / qhub_quantum-1.16.0rc1-py3-none-any.whl
| Download URL | qhub_quantum-1.16.0rc1-py3-none-any.whl |
|---|---|
| Size | 175.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39cf9ceda98b68de9b5c126de8d3fbfc1ddd3f668b85c6911b4296f9e44fa3d6
|
|
BLAKE2b-256 checksum How to use checksums |
93e3e8612f56e87239b31acac9f90eeafb2cb34d43d613cd8dd297bfe6359805
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|