Skip to main content

A tool to access the quantum devices from the QUDORA Cloud using Python.

Project description

QUDORA SDK

This package can currently only be used by members of QUDORA.

The QUDORA Software Development Kit (SDK) enables an interaction with quantum devices hosted on the QUDORA Cloud from Python code.

The included Qiskit-provider allows direct execution of Qiskit-QuantumCircuits on the QUDORA Cloud quantum devices.

Installation

To install the latest version of the QUDORA SDK run

pip install qudora-sdk

Qiskit-Provider Usage

This section explains the usage of the included Qiskit-provider to access QUDORA Cloud quantum devices. In order to use the provider an API-Token from the QUDORA Cloud is required. Such a token can be generated here.

Access to Quantum Devices

To authenticate with the QUDORA Cloud the provider requires the generated API-Token, which is here called my-example-token.

from qudora_sdk.qiskit import QUDORAProvider

provider = QUDORAProvider(token="my-example-token")

If the authentication was successful, all available quantum devices can be listed.

print(provider.backends())

Selecting a particular backend is done with the get_backend() function.

backend = provider.get_backend('QVLS Simulator')

Running Qiskit-QuantumCircuits

The quantum devices can execute QuantumCircuit-objects written with Qiskit. More information about writing circuits with qiskit can be found here. Previously created Backend-objects have a run()-function to submit circuits to a selected backend.

qc = Quantum Circuit(2,2)
qc.h(0)
qc.h(1)
qc.cx(0,1)

qc.measure(0,0)
qc.measure(1,1)

job = backend.run(qc, job_name='My example job')

The job object represents a job in the QUDORA Cloud. Its status can be retrieved by calling job.status(). To obtain the result of a job, the result() function can be called. This function will wait until the job finishes and return the measurement results.

result = job.result(timeout=30)
print(result)

Customised Settings

A backend has parameters (mostly used for noise models), which you can modify to your needs. You can list all available settings using the show_available_settings()-method.

backend.show_available_settings()

To run a job with custom settings, you can pass a settings dictionary to the run() method.

custom_settings = {
    'measurement_error_probability': 0.005,
    'two_qubit_gate_noise_strength': 1.0
}

job = backend.run(qc, job_name='Job with custom settings', backend_settings=custom_settings)

LICENSE

Copyright (C) 2024 QUDORA GmbH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

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

qudora_sdk-1.0.4.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

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

qudora_sdk-1.0.4-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file qudora_sdk-1.0.4.tar.gz.

File metadata

  • Download URL: qudora_sdk-1.0.4.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for qudora_sdk-1.0.4.tar.gz
Algorithm Hash digest
SHA256 8e694fad9dd76ffc203016f06bb65544c94fd82944d19cb6c631182c0c1c6686
MD5 757f595b37c77b832c4745f58b91d1d0
BLAKE2b-256 962c5ff4b008455ea37a5531a9397c0b95de24ced337077c0ddd654c6e3d7f41

See more details on using hashes here.

File details

Details for the file qudora_sdk-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: qudora_sdk-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.5

File hashes

Hashes for qudora_sdk-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c5a6020d45fc4c6a953d4962e6e4ed586ac69f64deb67ab2c00b0860e71bc343
MD5 2f9ec88ee15fd60b6277b12ab80ccd44
BLAKE2b-256 9e53b615b8332ef9352decec8b706394581a468fe3a33e27aca32fe9b4893c0e

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