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.33.tar.gz (64.1 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.33-py3-none-any.whl (71.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cirq_superstaq-0.5.33.tar.gz
  • Upload date:
  • Size: 64.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for cirq_superstaq-0.5.33.tar.gz
Algorithm Hash digest
SHA256 459b1d8c96366340ba07fb16f22ac183b0d9aba0ab90413555353c4c3c11c9b8
MD5 eef2fca9341f973c283bee2ba92d1d17
BLAKE2b-256 0cfc6ef72190e51b904362e1306725b01a6c7214d9b131f2d167219f258e8d0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cirq_superstaq-0.5.33-py3-none-any.whl
Algorithm Hash digest
SHA256 2feb1ca12f83f657a0fbd702e6215275c1779a5dbc5abe795affb867ca0df580
MD5 d2bd4faeeccbd9f3e5c9031058830aed
BLAKE2b-256 1459b23caaeb15b7d2e59e28c85ff01a8f7d3b7be9d801176f16f70e86608ede

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