iq_readout.metrics.get_probs_prep_meas#
- get_probs_prep_meas(classifiers, *shots)[source]#
Returns matrix whose element
probs[s,o]corresponds to: p(measured bitstring o | prepared bitstring s), with s and o in the corresponding base 2, 3 or 10.- Parameters:
- classifiers
A list of classifiers from the iq_readout package. It can also be a single classifier.
- shots: list(np.ndarray(num_qubits, num_shots, 2))
Tuple of shots when preparing all the possible bistrings. The bitstrings should be sorted in the standard binary order, e.g.
000,001,010,011, … In the case thatclassifiersis a single classifier (not a list), each element of this variable can have shape(num_shots, 2).
- Returns:
- probs: np.ndarray(2**num_qubits, 2**num_qubits) | np.ndarray(3**num_qubits, 3**num_qubits)
The size of the array depends on the number of states that the classifier can discriminate.