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

Uploaded Source

Built Distribution

cirq_superstaq-0.5.25-py3-none-any.whl (69.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cirq_superstaq-0.5.25.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

Hashes for cirq_superstaq-0.5.25.tar.gz
Algorithm Hash digest
SHA256 36d9edd6cc2621696a0ccb8f9d60876be347d6aa33796a252a2fe9f426995415
MD5 2d0ebde61edb3b1712c1444d0c8b9da0
BLAKE2b-256 f3f2bc43b5d62fff4fa1ae19abc211d5978ffaed1f28ef8df3c9b2d5de188059

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cirq_superstaq-0.5.25-py3-none-any.whl
Algorithm Hash digest
SHA256 5bbc9e28da06078ddb65808218a1ad2c26417e5e7c6708993091cf03f821db88
MD5 3d4923be4229b72abe584fec9d68fd28
BLAKE2b-256 b9903747d06b13aeb8f8ede06c937586426b4a1ba60118a4a11d760ffe9101c5

See more details on using hashes here.

Supported by

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