[][src]Function qip::measurement_ops::measure_state

pub fn measure_state<P: Precision>(
    n: u64,
    indices: &[u64],
    measured: (u64, P),
    input: &[Complex<P>],
    output: &mut [Complex<P>],
    offsets: Option<(u64, u64)>,
    multithread: bool
)

Normalize the output state such that it matches only states which produce the measured result and has the same magnitude. This is done by zeroing out the states which cannot give measured, and dividing the remaining by the sqrt(1/p) for p=measured_prob. See measure_prob for details.