iqm.benchmarks.utils.extract_fidelities

iqm.benchmarks.utils.extract_fidelities#

iqm.benchmarks.utils.extract_fidelities(cal_url: str, all_metrics: bool = False) Tuple[List[List[int]], List[float], str, Dict[int, int]] | Tuple[List[List[int]], List[float], str, Dict[int, int], Dict[str, Dict[int | Tuple[int, int], float]]]#

Returns couplings and CZ-fidelities from calibration data URL

Parameters:
  • cal_url (str) – str The url under which the calibration data for the backend can be found

  • all_metrics (bool) – bool If True, returns a dictionary with all metrics from the calibration data Default is False

Returns:

List[List[int]]

A list of pairs, each of which is a qubit coupling for which the calibration data contains a fidelity.

list_fids: List[float]

A list of CZ fidelities from the calibration url, ordered in the same way as list_couplings

topology: str

Name of the chip topology layout, currently either “star” or “crystal”

qubit_mapping: Dict[int, int]

Enumerating all calibrated qubits starting from 0. For instance if on a 5 qubit chip the qubits 2, 3 are calibrated, the mapping will be {2: 0, 3: 1}.

metrics_dict: Dict

Dictionary of all metrics (returned only if all_metrics=True) Format: {metric_name: {qubit: value}} for single qubit metrics Format: {metric_name: {(qubit_1, qubit_2): value}} for two qubit metrics

Return type:

list_couplings