supermarq.qcvv.su2
Tooling for SU(2) benchmarking.
Classes
SU2 benchmarking experiment. |
|
Data structure for the SU2 experiment results. |
Module Contents
- class supermarq.qcvv.su2.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:
supermarq.qcvv.base_experiment.QCVVExperiment[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
0: ──|─Rr───Q───X───Q──|─ ^{n} ... ─|─Rr───X─|─ ^{N-n} ... ──Rf───M─── | │ │ | | | │ 1: ──|─Rr───Q───X───Q──|─ ... ─|─Rr───X─|─ ... ──Rf───M───Where each
Rrgate is a randomly chosen \(SU(2)\) rotation and theRfgates are single qubit \(SU(2)\) rotations that in the absence of noise invert the preceding circuit so that the final qubit state should be00.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.
- two_qubit_gate
The two qubit gate to be benchmarked
- class supermarq.qcvv.su2.SU2Results
Bases:
supermarq.qcvv.base_experiment.QCVVResultsData structure for the SU2 experiment results.
- plot_results(filename: str | None = None) matplotlib.pyplot.Figure
Plot the results of the experiment.
- Parameters:
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.
- print_results() None
Prints the key results data.
- property single_qubit_noise: float
Returns: Estimated single qubit noise.
- property single_qubit_noise_std: float
Returns: Standard deviation of estimated single qubit noise.
- property two_qubit_gate_error: float
Returns: The two qubit gate error. Equal to one minus the fidelity.
- property two_qubit_gate_error_std: float
Returns: The two qubit gate error standard deviation. Equal to standard deviation of the fidelity.
- property two_qubit_gate_fidelity: float
Returns: Estimated two qubit gate fidelity.
- property two_qubit_gate_fidelity_std: float
Returns: Standard deviation of estimated two qubit gate fidelity.