Parameter Space¶
The mqt.bench.get_benchmark
method has the following signature:
Module for the benchmark generation and benchmark retrieval.
- get_benchmark(benchmark_name, level, circuit_size=None, benchmark_instance_name=None, compiler='qiskit', compiler_settings=None, provider_name='ibm', device_name='ibm_washington', **kwargs)[source]
Returns one benchmark as a qiskit.QuantumCircuit Object or a pytket.Circuit object.
- Parameters:
benchmark_name (
str
) – name of the to be generated benchmarklevel (
str
|int
) – Choice of level, either as a string (“alg”, “indep”, “nativegates” or “mapped”) or as a number between 0-3 where 0 corresponds to “alg” level and 3 to “mapped” levelcircuit_size (
int
|None
) – Input for the benchmark creation, in most cases this is equal to the qubit numberbenchmark_instance_name (
str
|None
) – Input selection for some benchmarks, namely “groundstate” and “shor”compiler (
str
) – “qiskit” or “tket”compiler_settings (
CompilerSettings
|None
) – Data class containing the respective compiler settings for the specified compiler (e.g., optimization level for Qiskit or placement for TKET)provider_name (
str
) – “ibm”, “rigetti”, “ionq”, “oqc”, or “quantinuum” (required for “nativegates” level)device_name (
str
) – “ibm_washington”, “ibm_montreal”, “rigetti_aspen_m3”, “ionq_harmony”, “ionq_aria1”, “oqc_lucy”, “quantinuum_h2” (required for “mapped” level)kwargs (
str
) – Additional arguments for the benchmark generation- Returns:
QuantumCircuit
|Circuit
– Quantum Circuit Object representing the benchmark with the selected options, either as Qiskit::QuantumCircuit or Pytket::Circuit object (depending on the chosen compiler—while the algorithm level is always provided using Qiskit)
benchmark_name
(see details) :"ae"
,"dj"
,"grover-noancilla"
,"grover-v-chain"
,"ghz"
,"graphstate"
,"portfolioqaoa"
,"portfoliovqe"
,"qaoa"
,"qft"
,"qftentangled"
,"qnn"
,"qpeexact"
,"qpeinexact"
,"qwalk-noancilla"
,"qwalk-v-chain"
,"random"
,"realamprandom"
,"su2random"
,"twolocalrandom"
,"vqe"
,"wstate"
,"shor"
,"pricingcall"
,"pricingput"
,"groundstate"
,"routing"
,"tsp"
level
:0
or"alg"
,1
or"indep"
,2
or"nativegates"
,3
or"mapped"
circuit_size
: for most of the cases this is equal to number of qubits (all scalable benchmarks except"qwalk-v-chain"
and"grover-v-chain"
) while for all other the qubit number is highercompiler
:"qiskit"
or"tket"
compiler_settings
: Optimization level for"qiskit"
(0
-3
), placement for"tket"
(lineplacement
orgraphplacement
), exemplary shown:
from mqt.bench import CompilerSettings, QiskitSettings, TKETSettings
compiler_settings = CompilerSettings(
qiskit=QiskitSettings(optimization_level=1),
tket=TKETSettings(placement="lineplacement"),
)
- with
Module for the benchmark generation and benchmark retrieval.
provider_name
:"ibm"
,"rigetti"
,"ionq"
,"oqc"
, or"quantinuum"
(required for “nativegates” level)device_name
:"ibm_washington"
,"ibm_montreal"
,"rigetti_aspen_m3"
,"ionq_harmony"
,"ionq_aria1"
,"oqc_lucy"
, or"quantinuum_h2"
(required for “mapped” level)
Quantum Circuit Compiler Support¶
At the moment, two compilers are supported:
Native Gate-Set Support¶
So far, MQT Bench supports the following native gate-sets:
IBMQ gate-set: [‘rz’, ‘sx’, ‘x’, ‘cx’, ‘measure’]
Rigetti gate-set: [‘rx’, ‘rz’, ‘cz’, ‘measure’]
IonQ gate-set: [‘rxx’, ‘rz’, ‘ry’, ‘rx’, ‘measure’]
OQC gate-set: [‘rz’, ‘sx’, ‘x’, ‘ecr’, ‘measure’]
Quantinuum gate-set: [‘rzz’, ‘rz’, ‘ry’, ‘rx’, ‘measure’]
Device Support¶
So far, MQT Bench supports the following devices:
IBMQ Washington with 127 qubits
IBMQ Montreal with 27 qubits
Rigetti Aspen-M3 with 79 qubits
IonQ Harmony with 11 qubits
IonQ Aria 1 with 25 qubits
OQC Lucy with 8 qubits
Quantinuum H2 with 32 qubits
Examples how to use the get_benchmark
method for all four abstraction levels can be found on the Quickstart jupyter notebook.