supermarq.qcvv.su2 ================== .. py:module:: supermarq.qcvv.su2 .. autoapi-nested-parse:: Tooling for SU(2) benchmarking. Classes ------- .. autoapisummary:: supermarq.qcvv.su2.SU2 supermarq.qcvv.su2.SU2Results Module Contents --------------- .. py:class:: SU2(num_circuits: int, cycle_depths: collections.abc.Iterable[int], two_qubit_gate: cirq.Gate = cirq.CZ, *, random_seed: int | numpy.random.Generator | None = None, _samples: list[supermarq.qcvv.base_experiment.Sample] | None = None, **kwargs: str) Bases: :py:obj:`supermarq.qcvv.base_experiment.QCVVExperiment`\ [\ :py:obj:`SU2Results`\ ] SU2 benchmarking experiment. SU2 benchmarking extracts the fidelity of a given two qubit gate, even in the presence of additional single qubit errors. The method works by sampling circuits of the form .. code:: 0: ──|─Rr───Q───X───Q──|─ ^{n} ... ─|─Rr───X─|─ ^{N-n} ... ──Rf───M─── | │ │ | | | │ 1: ──|─Rr───Q───X───Q──|─ ... ─|─Rr───X─|─ ... ──Rf───M─── Where each :code:`Rr` gate is a randomly chosen :math:`SU(2)` rotation and the :code:`Rf` gates are single qubit :math:`SU(2)` rotations that in the absence of noise invert the preceding circuit so that the final qubit state should be :code:`00`. An exponential fit decay is then fitted to the observed 00 state probability as it decays with the number of two qubit gates included. Note that all circuits contain a fixed number of single qubit gates, so that the contribution for single qubit noise is constant. See Fig. 3 of https://www.nature.com/articles/s41586-023-06481-y#Fig3 for further details. .. py:attribute:: two_qubit_gate The two qubit gate to be benchmarked .. py:class:: SU2Results Bases: :py:obj:`supermarq.qcvv.base_experiment.QCVVResults` Data structure for the SU2 experiment results. .. py:method:: plot_results(filename: str | None = None) -> matplotlib.pyplot.Figure Plot the results of the experiment. :param filename: Optional argument providing a filename to save the plots to. Defaults to None, indicating not to save the plot. :returns: A single matplotlib figure containing the relevant plots of the results data. :raises RuntimeError: If there is no data stored. .. py:method:: print_results() -> None Prints the key results data. .. py:property:: single_qubit_noise :type: float Returns: Estimated single qubit noise. .. py:property:: single_qubit_noise_std :type: float Returns: Standard deviation of estimated single qubit noise. .. py:property:: two_qubit_gate_error :type: float Returns: The two qubit gate error. Equal to one minus the fidelity. .. py:property:: two_qubit_gate_error_std :type: float Returns: The two qubit gate error standard deviation. Equal to standard deviation of the fidelity. .. py:property:: two_qubit_gate_fidelity :type: float Returns: Estimated two qubit gate fidelity. .. py:property:: two_qubit_gate_fidelity_std :type: float Returns: Standard deviation of estimated two qubit gate fidelity.