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.8
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
cirq_superstaq-0.5.24.tar.gz
(62.2 kB
view details)
Built Distribution
File details
Details for the file cirq_superstaq-0.5.24.tar.gz
.
File metadata
- Download URL: cirq_superstaq-0.5.24.tar.gz
- Upload date:
- Size: 62.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8acb7b549bc5af49b3f2a908071f38a2c2ee4098c306ba0a5319ac4b3fdc4f8c |
|
MD5 | 11b379b707850199c32e92d7c2720c94 |
|
BLAKE2b-256 | af2ed6bc2ed43524a5ba2d69577e5635b44d734cdd3d50c9012e2c06946fe89e |
File details
Details for the file cirq_superstaq-0.5.24-py3-none-any.whl
.
File metadata
- Download URL: cirq_superstaq-0.5.24-py3-none-any.whl
- Upload date:
- Size: 69.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edfb021d00f8ee8cca6e7ef59c884294275194655e508ef9bbb4f74995a1a991 |
|
MD5 | c11fcb4b67450641c12799e38926d30e |
|
BLAKE2b-256 | b00aca3311f51e36d2a2c130b08b4c7a2bba15bbc3dcf3469f3ced0b7e63b764 |