iq_readout.metrics.get_probs_prep_meas#
- get_probs_prep_meas(classifier, shots_0, shots_1, shots_2=None)[source]#
Returns matrix whose element i,j corresponds to: p(measure state j | prepared state i)
- Parameters:
- classifier
A classifier from the iq_readout package
- shots_0: np.ndarray(N, 2)
Data when preparaing state 0
- shots_1: np.ndarray(N, 2)
Data when preparaing state 1
- shots_2: np.ndarray(N, 2)
Data when preparaing state 2
- Returns:
- probs: np.ndarray(2,2) or np.ndarray(3,3)
The size of the array depends on the number of states that the classifier can discriminate.