corbett / QuantumComputing

This is an implementation of IBM's Quantum Experience in simulation; a 5-qubit quantum computer with a limited set of gates. Please cite me if you end up using this academically.
GNU General Public License v3.0
590 stars 140 forks source link

Measurement error in the README.md? #12

Open bortzmeyer opened 6 years ago

bortzmeyer commented 6 years ago

README.md says (example "Pure python quantum computing machinery"):

qc.measure("q1")
qc.measure("q2")
Probability.pretty_print_probabilities(qc.qubits.get_quantum_register_containing("q1").get_state())

If you do so, the last line always output:

|psi>=|00>
Pr(|00>)=1.000000; 
<state>=1.000000

Because measurement destroyed the state. IMHO, it should be get_noop instead of get_state.

marcus-mello commented 6 years ago

Hi Stéphane, Can you tell more about your post?