The Cirq module that provides tools and access to Superstaq.
Project description
cirq-superstaq
This package is used to access Superstaq via a Web API through Cirq. Cirq programmers can take advantage of the applications, pulse level optimizations, and write-once-target-all features of Superstaq with this package.
cirq-superstaq is available on PyPI and can be installed with:
pip install cirq-superstaq
Please note that Python version 3.9 or higher is required. For further installation instructions, see here.
Creating and submitting a circuit through cirq-superstaq
import cirq
import cirq_superstaq as css
q0 = cirq.LineQubit(0)
q1 = cirq.LineQubit(1)
circuit = cirq.Circuit(cirq.H(q0), cirq.CNOT(q0, q1), cirq.measure(q0))
service = css.Service(
api_key="""Insert superstaq token that you received from https://superstaq.infleqtion.com""",
verbose=True,
)
# Submitting a circuit to IBM's Brisbane QPU. Providing the "dry-run" method parameter instructs Superstaq to simulate the circuit, and is available to free trial users.
job = service.create_job(circuit, repetitions=1, target="ibmq_brisbane_qpu", method="dry-run")
print("This is the job that's created ", job.status())
print(job.counts())
Project details
Release history Release notifications | RSS feed
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 cirq_superstaq-0.5.59.tar.gz.
File metadata
- Download URL: cirq_superstaq-0.5.59.tar.gz
- Upload date:
- Size: 81.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21206dd162032043590661fdf7d8e35bfcd8b96b5ee663cb051016344ecf7684
|
|
| MD5 |
ddd0c6bbd230172ae81fe69c3b6ec153
|
|
| BLAKE2b-256 |
68dafcf4481970f97c7f9a69693048a222b1db9bfbb516233de864fd07bc515e
|
File details
Details for the file cirq_superstaq-0.5.59-py3-none-any.whl.
File metadata
- Download URL: cirq_superstaq-0.5.59-py3-none-any.whl
- Upload date:
- Size: 97.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
570ba533d02bc48eb60676375095858ffe21a88ff7ef69686aef1eb6008a32f8
|
|
| MD5 |
782dd4699c3e68e0779a5f70ecaf2ce2
|
|
| BLAKE2b-256 |
ebca388656361edd0f2131c9bc5072a52e93fdd086d3c1b3253900d4f3720a0c
|