iqm.benchmarks.utils

iqm.benchmarks.utils#

General utility functions

Functions

count_2q_layers(circuit_list)

Calculate the number of layers of parallel 2-qubit gates in a list of circuits.

count_native_gates(backend_arg, ...)

Count the number of IQM native gates of each quantum circuit in a list.

get_iqm_backend(backend_label)

Get the IQM backend object from a backend name (str).

marginal_distribution(prob_dist, indices)

Compute the marginal distribution over specified bits (indices)

perform_backend_transpilation(qc_list, ...)

Transpile a list of circuits to backend specifications.

reduce_to_active_qubits(circuit[, backend_name])

Reduces a quantum circuit to only its active qubits.

retrieve_all_counts(iqm_jobs[, identifier])

Retrieve the counts from a list of IQMJob objects.

retrieve_all_job_metadata(iqm_jobs)

Retrieve the counts from a list of IQMJob objects.

set_coupling_map(qubits, backend[, ...])

Set a coupling map according to the specified physical layout.

sort_batches_by_final_layout(...)

Sort batches of circuits according to the final measurement mapping in their corresponding backend.

submit_execute(sorted_transpiled_qc_list, ...)

Submit for execute a list of quantum circuits on the specified Backend.

timeit(f)

Calculates the amount of time a function takes to execute

xrvariable_to_counts(dataset, identifier, ...)

Retrieve counts from xarray dataset.