Skip to main content

SDK to interact with PLANQK quantum backends.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

⚠️ DEPRECATED ⚠️

This package has been deprecated and is no longer maintained.

Please migrate to the new package:

Install the new package:

pip install qhub-quantum

PLANQK Quantum SDK

PyPI version

The PLANQK Quantum SDK is for developing quantum circuits using Qiskit to be run on quantum devices provided by the PLANQK Platform. 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 PLANQK:

Installation

The package is released on PyPI and can be installed via pip:

pip install --upgrade planqk-quantum

To install a pre-release version, use the following command:

pip install --pre --upgrade planqk-quantum

Usage

Working with Qiskit Backends

You can execute a Qiskit circuit on a selected backend, retrieve its job object, and its results:

from planqk.quantum.sdk import PlanqkQuantumProvider
from qiskit import QuantumCircuit, transpile

# Initialize the provider
provider = PlanqkQuantumProvider()

# 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 planqk.quantum.sdk import PlanqkBraketProvider

# Select the IonQ Forte device
device = PlanqkBraketProvider().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

planqk_quantum-3.1.2.tar.gz (128.6 kB view details)

Uploaded Source

Built Distribution

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

planqk_quantum-3.1.2-py3-none-any.whl (165.5 kB view details)

Uploaded Python 3

File details

Details for the file planqk_quantum-3.1.2.tar.gz.

File metadata

  • Download URL: planqk_quantum-3.1.2.tar.gz
  • Upload date:
  • Size: 128.6 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 planqk_quantum-3.1.2.tar.gz
Algorithm Hash digest
SHA256 062e0673d5639aea2e93fb377fa5f3d6dd15550d8497e51f8f9eeb4a947956a8
MD5 74b95f4273ff12398a6eec333ba7f633
BLAKE2b-256 cea982ec0cc3dc5799b812117b6fbdb39c2180865eb5a57e1fba2d5f89680e0f

See more details on using hashes here.

File details

Details for the file planqk_quantum-3.1.2-py3-none-any.whl.

File metadata

  • Download URL: planqk_quantum-3.1.2-py3-none-any.whl
  • Upload date:
  • Size: 165.5 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 planqk_quantum-3.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d51ff04579aca1cdf92e2243570ebd80f7eee303b01238f6cc78f38b98232390
MD5 61e2230277d1a681a144f6fe8ad9e3e9
BLAKE2b-256 a04d6c9da21f8e283a2498a5b1baec842f57ec18184872d0038de5f525da043a

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