Skip to main content

The Cirq module that provides tools and access to Superstaq.

Project description

cirq-superstaq

cirq-superstaq's default workflow

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 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.46.tar.gz (64.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cirq_superstaq-0.5.46-py3-none-any.whl (71.3 kB view details)

Uploaded Python 3

File details

Details for the file cirq_superstaq-0.5.46.tar.gz.

File metadata

  • Download URL: cirq_superstaq-0.5.46.tar.gz
  • Upload date:
  • Size: 64.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for cirq_superstaq-0.5.46.tar.gz
Algorithm Hash digest
SHA256 b1eb2d61d819d9a08cf395d2e80442f357090366538dda6be41a9150ceff506a
MD5 5172c7c639355a3440f0c67ce642f387
BLAKE2b-256 a2ae50bc9ee53184f852b06b641612d21585e63112acdc78f6a8596505f06976

See more details on using hashes here.

File details

Details for the file cirq_superstaq-0.5.46-py3-none-any.whl.

File metadata

File hashes

Hashes for cirq_superstaq-0.5.46-py3-none-any.whl
Algorithm Hash digest
SHA256 70b9200d1bf18240b048aa1f416157922420cc4a8ffe2ae464fa12197ad4f503
MD5 3e80a8c8c908121b43b0185a71c821f4
BLAKE2b-256 53e40fad5c2f04a552958a9b143b9b63f4242e1d0cb8c93116d753a28df523ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page