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.69
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.69.tar.gz | 88.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cirq_superstaq-0.5.69-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 191.7 kB
Release files / cirq_superstaq-0.5.69.tar.gz
| Download URL | cirq_superstaq-0.5.69.tar.gz |
|---|---|
| Size | 88.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7122085516a89611d9a7369e66cba6f8d8b8229f9ff6909ffb7e738d68fe4357
|
|
BLAKE2b-256 checksum How to use checksums |
ad96f25673bc0b852d00bc52e421713e95c6af5cbf6412ea5a7dbb54a1884108
|
| 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.69-py3-none-any.whl
| Download URL | cirq_superstaq-0.5.69-py3-none-any.whl |
|---|---|
| Size | 103.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afd5f26b98b138c80d494f9c0a3ef8774981d67541bf177fa80e8293466e7f5f
|
|
BLAKE2b-256 checksum How to use checksums |
382b32c01aff9f991d854233bbdc1516cc2151713e368cb05e6466ebebbada1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|