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 Fez 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=100, target="ibmq_fez_qpu", method="dry-run")
print("This is the job that's created ", job.status())
print(job.counts(0))
Metadata
Release files for cirq-superstaq 0.5.70
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cirq_superstaq-0.5.70.tar.gz | 88.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cirq_superstaq-0.5.70-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 192.0 kB
Release files / cirq_superstaq-0.5.70.tar.gz
| Download URL | cirq_superstaq-0.5.70.tar.gz |
|---|---|
| Size | 88.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c530dd5ed6c1eb111447a67391c3f8ab07e040ba8014f15e103d0bc1af25e43
|
|
BLAKE2b-256 checksum How to use checksums |
fb5de236ec379457dacc80882b2942209d8f54d283d7a2124f55ee2b787e847d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / cirq_superstaq-0.5.70-py3-none-any.whl
| Download URL | cirq_superstaq-0.5.70-py3-none-any.whl |
|---|---|
| Size | 103.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ab4b82b3d67922aeb0b9971b078d4fa754a0809cd8ed09adf2628610a243605
|
|
BLAKE2b-256 checksum How to use checksums |
068b65c62659dcb93e9c21ccb49a0efe573e22d24f8d8a2b9175af2b6a59e7f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|