spheres.utils.measure

spheres.utils.measure(state, projectors)[source]

Given a state and a set of projectors, calculates the probability of each outcome, and returns an outcome index with that probability.

Parameters
  • state (qt.Qobj) –

  • projectors (list) –

Returns

index

Return type

int