0

What is the practical and theoretical difference is between these 3 states, which ultimately produce the same output result.

Could you tell me some examples of different results obtained starting from these 3 states and doing the same operations below.

The concept is unclear to me.

Thank you

|0> -> RY(pi/2) -> RX(pi) -> cnot q[0] q[1] 
|0> -> RX(pi/2) -> cnot q[0] q[1] 
|0> -> H -> cnot q[0] q[1] 
Alasdair
  • 3,071
  • 15
  • 20
Davide Cavallini
  • 216
  • 4
  • 15

1 Answers1

2

Not all of these states are the same, assuming that you're talking about the single-qubit states obtained before application of the CNOT gate (otherwise please specify which single-qubit gates are applied to which qubit in the 2-qubit state).

The last state is H|0⟩ = 1/sqrt(2) (|0⟩ + |1⟩). The first state ends up being the same state, up to a global phase, which means there is no way to observe a difference between these two states. But the second state is 1/sqrt(2) (|0⟩ - i|1⟩), which behaves differently.

To observe the difference between the second and the last states, apply a Hadamard gate to both and measure them multiple times: you'll always get 0 result for the last state, but you'll get both 0 and 1 for the second state.

To quickly run this experiment, you can use Q#: running the following snippet will give you ~50 0 measurements for the state prepared using Rx and 100 0 measurements for the state prepared using H.

open Microsoft.Quantum.Diagnostics;
open Microsoft.Quantum.Math;

operation RunTests (prep : (Qubit => Unit)) : Unit {
    mutable n0 = 0;
    use q = Qubit();
    for _ in 1 .. 100 {
        // Prepare the qubit in the given state.
        prep(q);
        // Apply Hadamard gate and measure.
        H(q);
        if M(q) == Zero {
            set n0 += 1;
        }
        Reset(q);
    }
    Message($"{n0} zeros measured");
}

operation QubitsDemo () : Unit {
    RunTests(Rx(PI() / 2.0, _));
    RunTests(H);
}
Mariia Mykhailova
  • 1,987
  • 1
  • 9
  • 18