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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qudora_sdk-1.0.0.tar.gz.
File metadata
- Download URL: qudora_sdk-1.0.0.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3affd454559db8cbe1836e6b192c5451a14d1173d5b3f67760abd3198f43f01f
|
|
| MD5 |
198b0bca794648c754c5e47f6eaaa18e
|
|
| BLAKE2b-256 |
693935a8a61707c42aa70c4bb9337769e0f21e8ad73257a4c51b6c61ae887acf
|
File details
Details for the file qudora_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: qudora_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 33.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e827a04ef3f29dd0b8a9ff073cbfb0f92b041fb9f5bb5fee18c964bfc019c55
|
|
| MD5 |
2c2fe2733e6715c35b4355a42bc5992e
|
|
| BLAKE2b-256 |
9c12af56a7660ff86cd04a1dd032666c383e69f1f931670c9586f4b3474a0e88
|