pub fn expectation_z(state: &Array1<Complex64>, target: usize) -> f64
Expectation value of the Pauli-Z operator on qubit target, ⟨Z⟩ = P(|0⟩) − P(|1⟩) ∈ [−1, 1].
target
⟨Z⟩ = P(|0⟩) − P(|1⟩) ∈ [−1, 1]