From 38e4636129d6662b74745cc8817617122a04b7d2 Mon Sep 17 00:00:00 2001 From: Toshinari Itoko Date: Mon, 8 Apr 2024 17:40:32 +0900 Subject: [PATCH] Improve docs and reno following reviewer's comments --- .../randomized_benchmarking/layer_fidelity.py | 12 +++++++----- .../notes/layer-fidelity-1e09dea9e5b69515.yaml | 8 +++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/qiskit_experiments/library/randomized_benchmarking/layer_fidelity.py b/qiskit_experiments/library/randomized_benchmarking/layer_fidelity.py index ffe9a1f6df..6dbd80d5c0 100644 --- a/qiskit_experiments/library/randomized_benchmarking/layer_fidelity.py +++ b/qiskit_experiments/library/randomized_benchmarking/layer_fidelity.py @@ -93,14 +93,15 @@ def __init__( Args: physical_qubits: List of physical qubits for the experiment. - two_qubit_layers: List of list of qubit pairs where a list of qubit pairs - corresponds with a two-qubit gate layer. Qubit direction matters. + two_qubit_layers: List of two-qubit gate layers to run on. Each two-qubit + gate layer must be given as a list of directed qubit pairs. lengths: A list of layer lengths (the number of depth points). - backend: The backend to run the experiment on. + backend: The backend to run the experiment on. Note that either ``backend`` or + ``two_qubit_gate`` and ``one_qubit_basis_gates`` must be set at instantiation. num_samples: Number of samples (i.e. circuits) to generate for each layer length. seed: Optional, seed used to initialize ``numpy.random.default_rng``. when generating circuits. The ``default_rng`` will be initialized - with this seed value every time :meth:`circuits` is called. + with this seed value every time :meth:~.LayerFidelity.circuits` is called. two_qubit_gate: Optional, 2q-gate name (e.g. "cx", "cz", "ecr") of which the two qubit layers consist. If not specified (but ``backend`` is supplied), @@ -188,7 +189,8 @@ def _default_experiment_options(cls) -> Options: """Default experiment options. Experiment Options: - two_qubit_layers (List[List[Tuple[int, int]]]): List of pairs of qubits to run on. + two_qubit_layers (List[List[Tuple[int, int]]]): List of two-qubit gate layers to run on. + Each two-qubit gate layer must be given as a list of directed qubit pairs. lengths (List[int]): A list of layer lengths. num_samples (int): Number of samples to generate for each layer length. seed (None or int or SeedSequence or BitGenerator or Generator): A seed diff --git a/releasenotes/notes/layer-fidelity-1e09dea9e5b69515.yaml b/releasenotes/notes/layer-fidelity-1e09dea9e5b69515.yaml index c04f6d56d4..6ca0fe3183 100644 --- a/releasenotes/notes/layer-fidelity-1e09dea9e5b69515.yaml +++ b/releasenotes/notes/layer-fidelity-1e09dea9e5b69515.yaml @@ -1,8 +1,8 @@ --- features: - | - Add a new experiment class :class:`.LayerFidelity` - to measure `layer fidelity `_, + Add a new experiment class :class:`.LayerFidelity` to measure + `layer fidelity and EPLG (error per layered gate) `_, which is a holistic benchmark to characterize the full quality of the devices at scale. It has an experimental feature: its :meth:`circuits` @@ -20,4 +20,6 @@ features: df[(df.name=="ProcessFidelity") & (df.qubits==(59, 60))].value See `an example notebook - `_ for more examples. + `_ for more examples + such as how to select a best possible qubit chain to measure and + how to plot EPLG as a function of (sub)chain length. \ No newline at end of file