Skip to main content

SDK to interact with Kipu Quantum Hub quantum backends.

Project description

Kipu Quantum Hub SDK

PyPI version

The Kipu Quantum Hub 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:

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

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

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

qhub_quantum-1.0.0.tar.gz (112.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qhub_quantum-1.0.0-py3-none-any.whl (145.7 kB view details)

Uploaded Python 3

File details

Details for the file qhub_quantum-1.0.0.tar.gz.

File metadata

  • Download URL: qhub_quantum-1.0.0.tar.gz
  • Upload date:
  • Size: 112.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qhub_quantum-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3b8618d4cc66ac7fa5b85903fc9205e85ef4b72917a886ca6414aa50773da416
MD5 0fe51491e74d31207c6fe3d2a6d9a147
BLAKE2b-256 f1d2e8dbc6b669fbf98ae9b90514aa5ee0c700413f6c86755603e7e790a3dd5a

See more details on using hashes here.

File details

Details for the file qhub_quantum-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: qhub_quantum-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 145.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qhub_quantum-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd4196eb11d93684ad3914421605dd571c94c0fab095de62b7a53ca72df8c98f
MD5 7a3a2e5ac516c7c9c84c5aa1270e57d1
BLAKE2b-256 920c9d10baf1635e88b43a81e8ba85b46870a4d5762ae932bc67a7b93b097f30

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