[−][src]Function qip::measurement_ops::measure_prob_fn
pub fn measure_prob_fn<F, P: Precision>(
n: u64,
measured: u64,
indices: &[u64],
input_offset: Option<u64>,
f: F
) -> P where
F: Fn(u64) -> Complex<P> + Send + Sync,
Calculate the probability of a given measurement. measured
gives the bits (as a u64) which has
been measured from the qubits at indices
in the order supplied by indices
.
input_offset
gives the actual index of the lowest indexed entry in input
in case it's split
across multiple vectors (as for distributed computation). input_length
is the length of the
number of allowed indexible