Quantum Algorithms, Quantum Computing, Physics, Mathematics, Education.
expectation_vals.append(m) This snippet will give you the expectation value stored in the expectation_vals array, ordered as X, Y, Z. Now that we have the expectation value of each Pauli matrix and we know that these come up in the general formula of the density matrix ρ, we can calculate our