Quicke States
quicke-states is a Cirq library for verified Dicke-state circuit synthesis,
optimization, hardware placement, and reproducible benchmarking.
The compiler is deliberately explicit about equivalence:
- unitary-safe passes preserve a circuit on every input;
- state-preparation optimization may replace a circuit when both prepare the same declared Dicke state from the all-zero input;
- unsupported large or arbitrary circuits are reported as unverified rather than silently treated as exact.
Installation
From the public source repository:
pip install "git+https://github.com/wwwillott/quicke-states.git"
PyPI publishing is the next step. After that, the same package will also install as:
pip install quicke-states
For a source checkout, Willow support and development tools are optional:
pip install -e ".[willow,dev]"
Compile a Dicke state
from dicke_compiler import compile_dicke
result = compile_dicke(8, 4, objective="depth")
print(result.circuit)
print(result.after_metrics)
print(result.verification)
The default output uses cirq.LineQubit with full CZ and
cirq.PhasedXZGate operations.
Optimize an existing preparation
from dicke_compiler import DickeTarget, optimize_dicke
result = optimize_dicke(
existing_circuit,
DickeTarget(8, 4),
output_qubits=ordered_output_qubits,
equivalence="state_preparation",
objective="cz_depth",
)
The result records its selected family, applied passes, before/after metrics, runtime, and verification evidence.
Register a research template
CircuitTemplate and TemplateRegistry let researchers add verified
state-preparation constructions without modifying compiler internals. The
compiler searches bounded graph embeddings, verifies the template when
feasible, and compares it with analytic generators under the selected
objective.
The packaged registry covers all 56 symmetric challenge targets
2 <= N <= 15, 1 <= k <= floor(N/2). Each compact, offline-generated
template retains its source revision, a SHA-256 provenance hash, and its
known-valid Willow placement. The compiler validates the asset at import,
uses bounded fallback embedding on other coupling graphs, and still compares
templates with analytic generators. These are the best constructions
currently known to this project, not proofs of global optimality.
The analytic generator portfolio includes:
line_shallow, the default reachable-subspace line construction;line_basic, an independent line baseline without shallow row rewrites;scs_path, an independent split-and-cyclic-shift reference family;- topology-aware
w_treeandanti_w_treefamilies selected automatically for one-excitation and one-hole targets.
The SCS family is intentionally opt-in because it is a useful independent reference but is usually deeper after nearest-neighbor routing:
result = compile_dicke(6, 3, methods=("scs_path",))
Current Willow comparison results are stored in
benchmarks/incumbent_comparison.csv.
The reusable compiler matches the incumbent's 7-moment D(4,2) and 13-moment
D(6,3) circuits. Its selected D(8,4) template uses 21 moments instead of
23 at the same CZ count. These are reference results, not claims of global
optimality.
Use a coupling graph and current calibration
from dicke_compiler import (
CalibrationData,
HardwareTarget,
compile_dicke,
)
calibration = CalibrationData(
single_qubit=sq_errors,
two_qubit=cz_errors,
readout_zero=zero_to_one_errors,
readout_one=one_to_zero_errors,
)
hardware = HardwareTarget.from_edges(
device_qubits,
device_couplers,
calibration=calibration,
)
result = compile_dicke(
6,
3,
hardware=hardware,
objective="projected_survival",
)
Projected survival is an uncertainty-adjusted independent gate/readout proxy. It is useful for ranking candidates on current calibration data, but it is not presented as a measured hardware fidelity or competition score.
For Google Willow:
from dicke_compiler import compile_dicke, willow_target
result = compile_dicke(6, 3, hardware=willow_target())
Command line
quicke-states 6 3 --objective depth --print-circuit
Guarantees and current limits
- Exact complex128 statevector verification defaults to absolute tolerance
1e-8for up to 15 qubits. - Built-in analytic generators can return an analytic provenance report above the exact-simulation limit.
- Version 0.1 supports deterministic unitary state preparation. Adaptive measurement/feed-forward synthesis is not yet part of the stable API.
- Candidate search is bounded and does not claim globally minimum depth.
- State-aware row templates are valid on their documented reachable subspaces, not as arbitrary full-unitary replacements.
Research basis
The line synthesis is based on:
A. Bärtschi and S. Eidenbenz, “Deterministic Preparation of Dicke States,” arXiv:1904.07358 (2019).
The default line constructions follow that paper's split-and-cyclic-shift structure, then apply unitary-safe compression and hardware placement.
Development
pytest
ruff check src tests
python benchmarks/benchmark_compiler.py --max-qubits 15 --domain half
Competition submission artifacts remain separate from the package. New compiler results should be independently benchmarked before being copied into those artifacts.
License
BSD 3-Clause. See LICENSE.
Metadata
Release files for quicke-states 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| quicke_states-0.1.0.tar.gz | 61.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quicke_states-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 123.6 kB
Release files / quicke_states-0.1.0.tar.gz
| Download URL | quicke_states-0.1.0.tar.gz |
|---|---|
| Size | 61.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e6b8b658ce001982ba4929c83f2cf8cee1526c79cdbe29c9f60927debf517b3
|
|
BLAKE2b-256 checksum How to use checksums |
22093eb6641b8b6ff85913bc79662a037b660b00487a0418f2e64613e041d79d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / quicke_states-0.1.0-py3-none-any.whl
| Download URL | quicke_states-0.1.0-py3-none-any.whl |
|---|---|
| Size | 61.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed25b0b1ec4df3b5718933e7944c19b97bd5f8e714e00cf62d8d726cf4c6478d
|
|
BLAKE2b-256 checksum How to use checksums |
d7cada7f0dddb9bdf2ae99d5b2f2796eb3d154cb16b939f9f8812a35712eaec6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for quicke-states 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.