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 benchmark

  • level (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” level

  • circuit_size (int | None) – Input for the benchmark creation, in most cases this is equal to the qubit number

  • benchmark_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 higher

  • compiler: "qiskit" or "tket"

  • compiler_settings: Optimization level for "qiskit" (0-3), placement for "tket" (lineplacement or graphplacement), 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.

class CompilerSettings(qiskit=None, tket=None)[source]

Data class for the compiler settings.

class QiskitSettings(optimization_level=1)[source]

Data class for the Qiskit compiler settings.

class TKETSettings(placement='lineplacement')[source]

Data class for the TKET compiler settings.

  • 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:

  1. Qiskit with the compiler settings: Optimization level 0 to 3

  2. TKET with the compiler settings: Line placement and graph placement

Native Gate-Set Support

So far, MQT Bench supports the following native gate-sets:

  1. IBMQ gate-set: [‘rz’, ‘sx’, ‘x’, ‘cx’, ‘measure’]

  2. Rigetti gate-set: [‘rx’, ‘rz’, ‘cz’, ‘measure’]

  3. IonQ gate-set: [‘rxx’, ‘rz’, ‘ry’, ‘rx’, ‘measure’]

  4. OQC gate-set: [‘rz’, ‘sx’, ‘x’, ‘ecr’, ‘measure’]

  5. Quantinuum gate-set: [‘rzz’, ‘rz’, ‘ry’, ‘rx’, ‘measure’]

Device Support

So far, MQT Bench supports the following devices:

  1. IBMQ Washington with 127 qubits

  2. IBMQ Montreal with 27 qubits

  3. Rigetti Aspen-M3 with 79 qubits

  4. IonQ Harmony with 11 qubits

  5. IonQ Aria 1 with 25 qubits

  6. OQC Lucy with 8 qubits

  7. 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.