iqm.benchmarks.randomized_benchmarking.direct_rb.direct_rb.DirectRandomizedBenchmarking#

class iqm.benchmarks.randomized_benchmarking.direct_rb.direct_rb.DirectRandomizedBenchmarking(backend_arg: IQMBackendBase | str, configuration: DirectRBConfiguration)#

Bases: Benchmark

Direct RB estimates the fidelity of layers of canonical gates

Attributes

name

Methods

add_all_meta_to_dataset(dataset)

Adds all configuration metadata and circuits to the dataset variable

analysis_function(run)

Direct RB analysis function

assign_inputs_to_qubits()

Assigns all DRB inputs (Optional[Sequence[Any]]) to input qubit layouts.

execute(backend)

Executes the Direct Randomized Benchmarking benchmark.

submit_single_drb_job(backend_arg, qubits, ...)

Submit fixed-depth DRB jobs for execution in the specified IQMBackend

Parameters:
static analysis_function(run: BenchmarkRunResult) BenchmarkAnalysisResult#

Direct RB analysis function

Parameters:

run (BenchmarkRunResult) – The result of the benchmark run.

Returns:

AnalysisResult corresponding to DRB.

Return type:

BenchmarkAnalysisResult

add_all_meta_to_dataset(dataset: Dataset)#

Adds all configuration metadata and circuits to the dataset variable

Parameters:

dataset (xr.Dataset) – The xarray dataset

assign_inputs_to_qubits()#

Assigns all DRB inputs (Optional[Sequence[Any]]) to input qubit layouts.

submit_single_drb_job(backend_arg: IQMBackendBase, qubits: Sequence[int], depth: int, sorted_transpiled_circuit_dicts: Dict[Tuple[int, ...], List[QuantumCircuit]]) Dict[str, Any]#

Submit fixed-depth DRB jobs for execution in the specified IQMBackend

Parameters:
  • backend_arg (IQMBackendBase) – the IQM backend to submit the job to

  • qubits (Sequence[int]) – the qubits to identify the submitted job

  • depth (int) – the depth (number of canonical layers) of the circuits to identify the submitted job

  • sorted_transpiled_circuit_dicts (Dict[Tuple[int, ...], List[QuantumCircuit]]) – A dictionary containing all MRB circuits

Returns:

Dict with qubit layout, depth, submitted job objects, and submission time

Return type:

Dict[str, Any]

execute(backend: IQMBackendBase) Dataset#

Executes the Direct Randomized Benchmarking benchmark.

Parameters:

backend (IQMBackendBase) – The IQM backend to execute the benchmark on

Returns:

Dataset containing benchmark results and metadata

Return type:

xr.Dataset