mqt.core.bench.fan_out¶
Quantum fan-out benchmark instances and options.
Module Contents¶
- class FanOut(options: Options)¶
A validated quantum fan-out benchmark.
The benchmark prepares uniform controls and a target in \(|+\rangle\). Fan-out distributes controlled phase gates \(P(\pi/2)\) across the target and clean ancillas, then uncomputes the ancillas. A final Hadamard on the target makes the phase observable.
For \(n\) controls, the circuit uses \(2n\) qubits. The logical output contains the controls followed by the target as its least-significant bit. For a control string of Hamming weight \(w\), the target is zero with conditional probability \(\cos^2(\pi w/4)\).
- evaluate(counts: Mapping[str, int]) Evaluation¶
Compare sampled counts with the ideal distribution.