mqt.core.bench.modular_multiplier¶
Modular multiplier benchmark instances and options.
Module Contents¶
- class Options(*, multiplier: str, modulus: str, multiplicand: str, control: str = '1')¶
Parameters for a modular multiplier benchmark.
- class ModularMultiplier(options: Options)¶
A validated modular multiplier benchmark.
The initially zero product register stores \(c \cdot a \cdot x \bmod N\), where \(c\) is the control, \(a\) is the classical multiplier, \(x\) is the multiplicand, and \(N\) is the modulus.
- evaluate(counts: Mapping[str, int]) Evaluation¶
Compare sampled counts with the ideal distribution.
- static from_instance_specification_json(json: str, *, source: str = '<instance-specification>') ModularMultiplier¶
Parse a strict benchmark instance specification.
- static from_manifest_json(json: str, *, source: str = '<manifest>') ModularMultiplier¶
Parse a strict benchmark manifest.