devqubit adapter for Cirq
Project description
devqubit-cirq
Google Cirq adapter for devqubit — automatic circuit capture, simulator snapshots, and result logging for Cirq samplers and simulators.
[!IMPORTANT] This is an internal adapter package. Install via
pip install "devqubit[cirq]"and use thedevqubitpublic API.
Installation
pip install "devqubit[cirq]"
Usage
import cirq
from devqubit import track
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit([
cirq.H(q0),
cirq.CNOT(q0, q1),
cirq.measure(q0, q1, key="result"),
])
with track(project="cirq-exp") as run:
simulator = run.wrap(cirq.Simulator())
result = simulator.run(circuit, repetitions=1000)
Parameter Sweeps
import sympy
theta = sympy.Symbol("theta")
circuit = cirq.Circuit([
cirq.Ry(theta).on(q0),
cirq.measure(q0, key="m"),
])
with track(project="sweep") as run:
simulator = run.wrap(cirq.Simulator())
sweep = cirq.Linspace("theta", 0, 2 * 3.14159, 10)
results = simulator.run_sweep(circuit, sweep, repetitions=100)
What's Captured
| Artifact | Kind | Role |
|---|---|---|
| Cirq JSON | cirq.circuit.json |
program |
| Circuit diagram | cirq.circuits.txt |
program |
| Measurement counts | result.counts.json |
result |
| Device properties | device.cirq.raw_properties.json |
device_raw |
| Execution envelope | devqubit.envelope.json |
envelope |
Documentation
See the Adapters guide for parameter sweeps, performance tuning, and batch execution.
License
Apache 2.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file devqubit_cirq-0.1.12.tar.gz.
File metadata
- Download URL: devqubit_cirq-0.1.12.tar.gz
- Upload date:
- Size: 44.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e81fc7e0c0c1507865180eedc3968c9918fc89a4139d5b9fc05abd378a3b43d
|
|
| MD5 |
db45caea8d0243566a6f177088ab369e
|
|
| BLAKE2b-256 |
2e93826af296f6c615aefaab64f219ef046744b6a4a640e26143f3bff5c742df
|
Provenance
The following attestation bundles were made for devqubit_cirq-0.1.12.tar.gz:
Publisher:
release.yaml on devqubit-labs/devqubit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devqubit_cirq-0.1.12.tar.gz -
Subject digest:
1e81fc7e0c0c1507865180eedc3968c9918fc89a4139d5b9fc05abd378a3b43d - Sigstore transparency entry: 951144327
- Sigstore integration time:
-
Permalink:
devqubit-labs/devqubit@1845fb0c2c30cd7630764a8846acbe74d8998fa5 -
Branch / Tag:
refs/tags/v0.1.12 - Owner: https://github.com/devqubit-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@1845fb0c2c30cd7630764a8846acbe74d8998fa5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file devqubit_cirq-0.1.12-py3-none-any.whl.
File metadata
- Download URL: devqubit_cirq-0.1.12-py3-none-any.whl
- Upload date:
- Size: 33.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cf0bbdfe8933d7ce5f0019a64ec339461891cc391e72ed97857e4d65f67fa87
|
|
| MD5 |
c5f7e67666c564098cf4f72ca4f1a85e
|
|
| BLAKE2b-256 |
f48ea4203a4e9d76c25b529e9fe5cffc03658447949e1407714520c134615c2e
|
Provenance
The following attestation bundles were made for devqubit_cirq-0.1.12-py3-none-any.whl:
Publisher:
release.yaml on devqubit-labs/devqubit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
devqubit_cirq-0.1.12-py3-none-any.whl -
Subject digest:
1cf0bbdfe8933d7ce5f0019a64ec339461891cc391e72ed97857e4d65f67fa87 - Sigstore transparency entry: 951144802
- Sigstore integration time:
-
Permalink:
devqubit-labs/devqubit@1845fb0c2c30cd7630764a8846acbe74d8998fa5 -
Branch / Tag:
refs/tags/v0.1.12 - Owner: https://github.com/devqubit-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@1845fb0c2c30cd7630764a8846acbe74d8998fa5 -
Trigger Event:
push
-
Statement type: