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.28.tar.gz
(64.1 kB
view details)
Built Distribution
File details
Details for the file cirq_superstaq-0.5.28.tar.gz
.
File metadata
- Download URL: cirq_superstaq-0.5.28.tar.gz
- Upload date:
- Size: 64.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c509125505e8840f026223f7f5348ea1290f693cb7727fc232b712e7c961278b |
|
MD5 | aaf1d36d5177b3598a8ee766bf24c66d |
|
BLAKE2b-256 | 13e6ced229f9bf40fc4cb8fd4234ac90334d30ecf715bb11d3a65effcd1c4da4 |
File details
Details for the file cirq_superstaq-0.5.28-py3-none-any.whl
.
File metadata
- Download URL: cirq_superstaq-0.5.28-py3-none-any.whl
- Upload date:
- Size: 70.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e750fa514e2f5a1bbda272f7887007bdb0922c0e878394376de5ff981e749bf |
|
MD5 | 5408dfb14e9409366dbdbc58e3f11561 |
|
BLAKE2b-256 | c755affde6f40667212e48f85376995cf00245dc1e3ac01ef3d3811521885e18 |