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.26.tar.gz
(62.8 kB
view details)
Built Distribution
File details
Details for the file cirq_superstaq-0.5.26.tar.gz
.
File metadata
- Download URL: cirq_superstaq-0.5.26.tar.gz
- Upload date:
- Size: 62.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 377e8fbe17f6a9f14bf3eae58e0d7293f85d8e3c82e40c1c9559ea34525c3a73 |
|
MD5 | da68e31afbd74630ab0849b538be6272 |
|
BLAKE2b-256 | 1dc2cae9759ca161cff22d9cb7a6200ff6f545c5c2401aff6770cbc890d52954 |
File details
Details for the file cirq_superstaq-0.5.26-py3-none-any.whl
.
File metadata
- Download URL: cirq_superstaq-0.5.26-py3-none-any.whl
- Upload date:
- Size: 69.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d209aeed5e9f8684be126f34c578386b75e9489bf75663e43876bd82ead160f |
|
MD5 | 8d2fce43e1e2b95d9a7dfdad1c8d6561 |
|
BLAKE2b-256 | da3f22eaf4ebce253d99451209c32928e9832922d7dd083a7fcd1591fa763e12 |