mqt.core.bench.magic_state_distillation¶
Magic-state distillation benchmark instances and options.
Module Contents¶
- class MagicStateDistillation(options: Options = ...)¶
A concatenated 15-to-1 magic-state distillation benchmark.
Each block uses Litinski’s five-qubit 15-to-1 circuit. The first level uses ideal \(\pi/8\) Pauli rotations; later levels implement these rotations with the preceding level’s retained \(T^\dagger|+\rangle\) states. The circuit uses
5 * levelsqubits and executes15**levelsleaf rotations per shot. Backend and resource limits apply.Bit 1 flags any rejected block; bit 0 checks the retained root state against \(T^\dagger|+\rangle\). Ideal output is
00. All blocks execute once, regardless of rejection. The benchmark models ideal logical circuits without input noise, physical error correction, or retries.- evaluate(counts: Mapping[str, int]) Evaluation¶
Compare sampled counts with the ideal distribution.
- static from_instance_specification_json(json: str, *, source: str = '<instance-specification>') MagicStateDistillation¶
Parse a strict benchmark instance specification.
- static from_manifest_json(json: str, *, source: str = '<manifest>') MagicStateDistillation¶
Parse a strict benchmark manifest.