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 Fez 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=100, target="ibmq_fez_qpu", method="dry-run")
print("This is the job that's created ", job.status())
print(job.counts(0))

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.61.tar.gz (82.0 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.61-py3-none-any.whl (97.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cirq_superstaq-0.5.61.tar.gz
  • Upload date:
  • Size: 82.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for cirq_superstaq-0.5.61.tar.gz
Algorithm Hash digest
SHA256 d4a74c47c15e0865921296dc9ed082ce5b4e51d1e91bdc187dbd31d8cc177982
MD5 a39aaeadd591e53272cd331a91460dca
BLAKE2b-256 38d220b5f08ef7559b332f29e8a439572917ed9730eb9bf1d5db345821692235

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cirq_superstaq-0.5.61-py3-none-any.whl
Algorithm Hash digest
SHA256 44568117ed7bbca41a15d9b5d51175b19be2a290aaf00243d610ead937569e1c
MD5 4be1de10f7d7038ff434e6d423968615
BLAKE2b-256 57d4b9d032337b99e5465bbbaf4996c2767fa9d5dd507b4179b2ff3632c47d8e

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