estimate_joint_reset_confusion

forest.benchmarking.readout.estimate_joint_reset_confusion(qc: pyquil.api._quantum_computer.QuantumComputer, qubits: Sequence[int] = None, num_trials: int = 10, joint_group_size: int = 1, use_active_reset: bool = True, show_progress_bar: bool = False) → Dict[Tuple[int, ...], numpy.ndarray]

Measures a reset ‘confusion matrix’ for all groups of size joint_group_size among the qubits.

Specifically, for each possible joint_group_sized group among the qubits we perform a measurement for each bitstring on that group. The measurement proceeds as follows:

-Repeatedly try to prepare the bitstring state on the qubits until success. -If use_active_reset is true (default) actively reset qubits to ground state; otherwise, wait the preset amount of time for qubits to decay to ground state. -Measure the state after the chosen reset method.

Since reset should result in the all zeros state this ‘confusion matrix’ should ideally have all ones down the left-most column of the matrix. The entry at (row_idx, 0) thus represents the success probability of reset given that the pre-reset state is the binary representation of the number row_idx. WARNING: this method can be very slow

Parameters:
  • qc – a quantum computer whose reset error you wish to characterize
  • qubits – a list of accessible qubits on the qc you wish to characterize. Defaults to all qubits in qc.
  • num_trials – number of repeated trials of reset after preparation of each bitstring on each joint group of qubits. Note: num_trials does not correspond to num_shots; a new program must be run in each trial, so running a group of n trials takes longer than would collecting the same number of shots output from a single program.
  • joint_group_size – the size of each group; a square matrix with 2^joint_group_size number of rows/columns will be estimated for each group of qubits of the given size among the provided qubits.
  • use_active_reset – dictates whether to actively reset qubits or else wait the pre-allotted amount of time for the qubits to decay to the ground state. Using active reset will allow for faster data collection.
  • show_progress_bar – displays a progress bar via tqdm if true.
Returns:

a dictionary whose keys are all possible joint_group_sized tuples that can be formed from the qubits. Each value is an estimated 2^group_size square matrix for the corresponding tuple of qubits. Each key is listed in order of increasing qubit number. The corresponding matrix has rows and columns indexed in increasing bitstring order, with most significant (leftmost) bit labeling the smallest qubit number. Each matrix row corresponds to the bitstring that was prepared before the reset, and each column corresponds to the bitstring measured after the reset.