0
$\begingroup$

I am new in IBM composer quantum and I have a doubt.

I have the next circuit

enter image description here

After reinitializing q0 and reading it. (breaking entanglement) The phase disk for qubit q1 says that 100% is 0, but the result when I run it in a simulator is 521 00 and 503 10. The qubit q1 is in a rare indeterminate state, so that if I wanted execute some gate to take it to 0 or 1 (without restarting it) I can't do it. (or I don't know how to do it). and to test something I have to necessarily run in a simulator because what the phase disk says is not true. Is there something I am doing wrong? Is there a way I'm not aware of to bring q1 to 1 without resetting it?`

Thanks.

$\endgroup$
2
  • $\begingroup$ q1 is $|0\rangle$ if q0 is measured $|0\rangle$. If we ignore qo then q1 is random. $\endgroup$
    – kludg
    Aug 3, 2022 at 15:23
  • $\begingroup$ OK, I get that, I assumed that the result in the simulator is correct, but the question is why the phase disk is different than it is not correct. And the other question is if I have a qbit in an indeterminate state with an H gate, can I apply another H gate or S + RX gates and change this state to |0 or |1. In the example, the q1. I don't know what gates to use so that qbit q1 takes the value |0 without resetting it. (without applying the gate |0⟩) $\endgroup$ Aug 4, 2022 at 17:21

2 Answers 2

1
$\begingroup$

Once you apply a 'Measurement' into the Qiskit's composer then it will pick one of the possible states, either $|0\rangle$ or $|1\rangle$. You can see this by changing the Visualization seed at the top right corner. Same issue if you try to look at the statevector of the circuit consist of a single Hadamard gate follow by a Measurement operator. You will see that it's always a $|0\rangle$ or $|1\rangle$ in the statevector due to the collapsed of the wavefunction. If you remove the measurement then you can see the superposition.

In term of always getting a $|1\rangle$ in your circuit, you can just use control operation. You have the bell state $|\psi \rangle = \dfrac{|00\rangle + |11\rangle}{\sqrt{2}} $. So if you measure the first qubit to be $|0\rangle$ then you know that the second qubit is also a $|0\rangle$. Thus, apply the $X$ gate to $q[1]$. If you measure a $|1\rangle$ then do nothing since you know for sure $q[1]$ is already a $|1\rangle$. Here is the circuit:

enter image description here

OPENQASM 2.0;
include "qelib1.inc";

qreg q[2];
creg c[1];
h q[0];
cx q[0], q[1];
measure q[0] -> c[0];
if (c == 0) x q[1];
measure q[1] -> c[0];
$\endgroup$
0
$\begingroup$

A new learner myself, but this is what I see here. By using the Hadamard and CNOT gates you have created the Bell state $1/\sqrt(2)(|00\rangle +|11\rangle)$ as the first phase disks show.
You then reinitialized q0 to $|0\rangle$. To my limited understanding, this is as if you blocked the particles that were moving through that register and have instead sent a bunch of $|0\rangle$'s, but the particles in the second register continue in the Bell state. I see your reinitialization of q0 as a damn of sorts; you have blocked one part and provided a new state, but the particles on the other side will continue to flow. (Fancy way of saying that you have not broken the entanglement until that measurement on q1.)

As for your question about bringing q1 to $|1\rangle$ without resetting it, it would help to know what your end goal is? If you simply want $q0 = |0\rangle$ and $q1=|1\rangle$ I would recommend restarting and putting a Xgate (bit flip) on the second register.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.