Blueqat cloud SDK (bqcloud)
Client SDK for Blueqat cloud.
Install
pip install blueqat-cloud
Handling API key
Register API
import bqcloud
api = bqcloud.register_api("Your API key here")
Your API key is stored to $HOME/.bqcloud/api_key.
If you don't want to save API key, use insteads following codes.
import bqcloud
api = bqcloud.api.Api("Your API key here")
Load API
Once API key is saved, the key can be loaded from file.
import bqcloud
api = bqcloud.load_api()
Gate
Create a task
from blueqat import Circuit
from bqcloud import load_api, Device
api = load_api()
task = api.execute(Circuit().h[0].cx[0, 1], Device.IonQDevice, 10)
Show a status
print(task.status())
Update a task
task.update()
Wait a task
# Wait until task is done. It may takes so long time.
result = task.wait()
print(result.shots())
# Wait 10 sec. If complete, result is returned, otherwise, None is returned.
result = task.wait(timeout=10)
if result:
print(result.shots())
else:
print("timeout")
Get fetched result again
# Once updated or waited after task completed, task.result() returns the result.
result = task.result()
if result:
print(result.shots())
else:
print("result is not fetched")
List tasks
tasks = api.tasks()
print(list(tasks))
if tasks[0].result() is not None:
print(tasks[0].result().shots())
Annealing
import bqcloud
api = bqcloud.load_api()
api.annealing([[-1, 0], [0, 0.5]], 5, 10)
Metadata
Release files for blueqat-cloud 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blueqat-cloud-0.0.9.tar.gz | 7.9 kB | Without provenance | Details for blueqat-cloud-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blueqat_cloud-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for blueqat_cloud-0.0.9-py3-none-any.whl |
Total release size: 18.7 kB
Release files / blueqat-cloud-0.0.9.tar.gz
| Download URL | blueqat-cloud-0.0.9.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e89ea5b4d10aae055371fed9326213a1bf04d56bb27480100d0715e327a9533
|
|
BLAKE2b-256 checksum How to use checksums |
049b99d157aca526feacfa3cff940f7cbeec4475d1f226fccff9c324d1b1ab13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Release files / blueqat_cloud-0.0.9-py3-none-any.whl
| Download URL | blueqat_cloud-0.0.9-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a2ac56d66d95b1fceb84974247c91b3524e6d2de1dd2819eb52221de4ec973b
|
|
BLAKE2b-256 checksum How to use checksums |
bf1868bc895e6c4b7a2acae0089710acc2f882d62b0ce14ef74da26a273c9ef6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
|
Security for blueqat-cloud 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.