mqt.core.bench.qft¶
QFT benchmark instances and options.
Module Contents¶
- class Method¶
Bases:
enum.EnumFull-register or semiclassical measurement-and-feed-forward method.
- STANDARD = 0¶
- SEMICLASSICAL = 1¶
- class Options(*, qubits: int, period_exponent: int, method: Method = Method.STANDARD)¶
Parameters for a QFT benchmark.
- class QFT(options: Options)¶
A validated QFT benchmark.
The semiclassical method uses measurements and classical feedback in place of controlled gates before readout. For this benchmark’s input states, it also prepares each input bit as needed and reuses one measured and reset qubit. The standard method uses a full register. Both methods return the same number of bits; qubit reuse is an implementation choice in addition to the semiclassical transform.
- evaluate(counts: Mapping[str, int]) Evaluation¶
Compare sampled counts with the ideal distribution.