mqt.core.bench.repeat_until_success¶
Repeat-until-success benchmark instance.
Module Contents¶
- class Options(*, data_qubits: int = 1)¶
Parameters for a Pauli-string repeat-until-success benchmark.
- class RepeatUntilSuccess(options: Options = ...)¶
A validated Pauli-string repeat-until-success benchmark.
The circuit applies \((I + i\sqrt{2}X^{\otimes n}) / \sqrt{3}\). Each attempt measures an ancilla prepared from \(|0\rangle\) and retries on failure. After success, return the parity of a \(Y \otimes X^{\otimes(n-1)}\) measurement on the data qubits.
- evaluate(counts: Mapping[str, int]) Evaluation¶
Compare sampled counts with the ideal distribution.
- static from_instance_specification_json(json: str, *, source: str = '<instance-specification>') RepeatUntilSuccess¶
Parse a strict benchmark instance specification.
- static from_manifest_json(json: str, *, source: str = '<manifest>') RepeatUntilSuccess¶
Parse a strict benchmark manifest.