Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Deqart Python SDK

Usage

Interface with the Deqart server

Initialization

import deqart

# If you have run the line below once, subsequent initialization no longer
# requires explicit API token, i.e. deqart.init() without an argument is
# sufficient. This is because the token is automatically saved to
# ~/.config/deqart/config.json.
dq = deqart.init(YOUR_API_TOKEN)

Estimating how long it takes to simulate a circuit

import deqart

dq = deqart.init()

qc = qiskit.QuantumCircuit(2)
qc.h(0)
qc.x(1)

result = dq.estimate_job_runtime(qc)
print(result)
# Output
# {
#   'device': 'qsim_simulator',
#   'estimate_ms': 100,
#   'num_qubits': 2,
#   'qc': 'UUlTS0lUBQAVAgAAAAAAAAABcQAKaQAIAAAAAgAAAAAAAAAAAAAABAAAAAEAAAAAAAAAAmNpcmN1aXQtNzgAAAAAAAAAAG51bGxxAQAAAAIAAQFxAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAUAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASEdhdGVxAAAAAAAFAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhHYXRlcQAAAAEAAA==',
#   'warning_message': 'This is just an estimate; the actual runtime may be less or more.'
# }

Submitting a simulation job and retrieving it

import deqart

dq = deqart.init()

dq.submit_job(qc)
result = dq.search_jobs()
print(result)
# Output
# {
#   'column_names': ['job_id', 'run_status', 'success', 'worker_runtime_ms', 'created_on'],
#   'data': [['4j2u9lb031YgfPpB', 'QUEUED', None, None, '2022-10-20T07:10:20.316Z']], 'total_count': 1
# }

Circuit serialization

You can decode a quantum circuit of Braket/Cirq/Qiskit to/from JSON string.

import deqart.circuit_serialization as circuit_serialization

# Example with Cirq circuit
encoded_cirq = circuit_serialization.encode_circuit(qc_cirq)
decoded_cirq = circuit_serialization.decode_circuit(encoded_cirq)

Release files for deqart 0.0.11b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deqart 0.0.11b2
File Size Uploaded
deqart-0.0.11b2.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deqart 0.0.11b2
File Interpreter ABI Platform
deqart-0.0.11b2-py3-none-any.whl Python 3 none any Details

Total release size: 31.7 kB

Release files / deqart-0.0.11b2.tar.gz

Download URL deqart-0.0.11b2.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f7ff40f1a4bc92f25b1379c4a07346742c0246d29a5ef2d4f631c3551df76713
BLAKE2b-256 checksum
How to use checksums
00add99e31b68688bb1ea33cc1b38e7de9cb306608b60b91a19ebf842b6f3d1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / deqart-0.0.11b2-py3-none-any.whl

Download URL deqart-0.0.11b2-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ecdd74e262b6bd713bcd8999be35b2ec127d22b7779f8d01cfb53e082a494bab
BLAKE2b-256 checksum
How to use checksums
d17176d45e1f0abd48d57453ebf5e9304328652061056bd775c55b020086e9fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.0.11b2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page