# Can we say what happens to phases after a reset?

Take a simple state-vector of a 2 qubit system:

$$|\psi\rangle = \frac{1}{3\sqrt{2}}\pmatrix{1 \\ 2i\\ -3 i \\-2}$$ Suppose we now reset the last (second) qubit. This forces the state space to satisfy $$|1*\rangle = 0$$ where star is an arbitrary state of qubit $$1$$.

$$|\psi_{\mathrm{reset}}\rangle = \frac{1}{3}\pmatrix{\sqrt{5}\>e^{i\phi_1} \\ 2\>e^{i \phi_2}\\ 0 \\0}$$ The magnitudes of the amplitude components are clear, but their phases I am lost on. Does this depend on the physical implimentation of the reset? Is there perhaps some simple trick with phase kickback to see what it must be for consistency?

EDIT: The more I think about this the more I become convinced the phase should remain whatever it was in the $$|0*\rangle$$ components, because a reset should have the same overall effect as a swap with $$0$$ ancilla qubit, which has no effect on the phase. Can anyone lend there expertise to confirm/deny this?

The state you're starting with is: $$|\psi\rangle=\frac{1}{3\sqrt{2}}(|00\rangle+2\mathrm{i}|01\rangle-3\mathrm{i}|10\rangle-2|11\rangle)$$ If you post-select on the state $$|0\rangle\langle0|$$, resetting a qubit is done in two steps: first we measure it. If the outcome is $$|0\rangle$$, we leave it like this. If the outcome is $$|1\rangle$$, we apply an $$X$$ gate. I'll suppose that you use the Qiskit convention of ordering qubits since you want to reset the second one but state that each state starting with a $$1$$ should have amplitude $$0$$. If that's not the case, the reasoning carries on to the other qubit.

Suppose we measured $$|0\rangle$$. This means that we want to keep the states in which the second qubit is $$|0\rangle$$, normalise them accordingly and leave their phase as is. The unnormalized state is: $$|00\rangle+2\mathrm{i}|01\rangle$$ Normalising it thus gives: $$\frac{1}{\sqrt{5}}\left(|00\rangle+2\mathrm{i}|01\rangle\right)$$

If we measured $$|1\rangle$$ however, then the unnormalized state is: $$-3\mathrm{i}|10\rangle-2|11\rangle$$ We can remove a global phase of $$-1$$: $$3\mathrm{i}|10\rangle+2|11\rangle$$ And finally normalising it and flipping the first qubit: $$\frac{1}{\sqrt{13}}\left(3\mathrm{i}|00\rangle+2|01\rangle\right)$$ So, after having applied a reset, the state you'll be left with will depend on the result you've got when performing your measurement. Concerning the phase, what matters is that the relative phases between the amplitudes stays the same. That is, if you take two amplitudes $$\rho_1\mathrm{e}^{\mathrm{i}\theta_1}$$ and $$\rho_2\mathrm{e}^{\mathrm{i}\theta_2}$$, the difference $$\theta_1-\theta_2$$ must remain the same.

Now, as you pointed out in the comments, this doesn't corresponds to a reset operation. If we want to a what is the state after the reset operation, we have to define this operation. That is, we want to apply the following channel on the last qubit: $$\Phi(\rho)=\mathrm{tr}(\rho)|0\rangle\!\langle0|$$ First of all, we compute the associated density matrix: $$|\psi\rangle\!\langle\psi|=\begin{pmatrix}1&-2\mathrm{i}&3\mathrm{i}&-2\\2\mathrm{i}&4&-6&-4\mathrm{i}\\-3\mathrm{i}&-6&9&6\mathrm{i}\\-2&4\mathrm{i}&-6\mathrm{i}&4\end{pmatrix}$$ The state after having applied $$\Phi$$ on the last qubit will be $$|0\rangle\!\langle0|\otimes\mathrm{tr}_{\text{last}}(\rho)$$. We have: $$\mathrm{tr}_{\text{last}}(\rho)=\frac{1}{9}\begin{pmatrix}5&2\mathrm{i}\\-2\mathrm{i}&4\end{pmatrix}$$ This is a mixed state, which is due to the fact that the initial state we were considering was entangled. As such, we cannot write the associated vector of this state. Hence, talking of the amplitudes and phases of its components doesn't make much sense.

However, not all is lost. Applying $$\Phi$$ on the last qubit is actually equivalent to post-select the state like we did, but without knowing the measurement result. Like, imagine someone does the postselection for you but then doesn't tell you whether they measured $$|0\rangle$$ or $$|1\rangle$$. This means that it is exactly equivalent to consider that the state of the other qubit is $$\frac{1}{\sqrt{5}}(|0\rangle+2\mathrm{i}|1\rangle)$$ with probability $$\frac{5}{18}$$ or $$\frac{1}{\sqrt{13}}(3\mathrm{i}|0\rangle+2|1\rangle)$$ with probability $$\frac{13}{18}$$. If you compute the associated density matrices and sum them while weighting them with their probability of appearing, you will find back the expected density matrix. Putting things differenly, you know for certain that the state is one of the two, but you don't know which one, only the probabilities.

If you were to start with a separable state however, the reset operation wouldn't affect the second qubit and you would be able to find the amplitudes and relative phases of the associated statevector.

• Hi Tristan. It looks like you're not implementing a reset, but a post-selection (operation by $|0\rangle\langle 0|$). Am I mistaken? By the no-communication theorem the probailities of measuring the rightmost qubit should be left unchanged before and after a reset of the second. In both your 'measurement' examples the probability changes. Commented May 31, 2023 at 14:35
• @Craig I've updated my answer to say what happens if we don't postselect, please have a look and tell me if that answers your question Commented May 31, 2023 at 15:40
• It seems to me you've merely restated the problem. We can add those states you have as a properly normalized sum, and we will find the exact state I call $|\psi_{\mathrm{reset}}\rangle$ which is still ambiguous up to the phases of the amplitudes. If you're right that the phase after the reset is not well defined unless we know the outcome of measurement, what do online simulators do during a reset? Either there's a well defined phase even with this built in classical ignorance of the measurement outcome, or the simulators are choosing some measurement outcome and acting accordingly. Commented Jun 1, 2023 at 16:58
• @Craig It doesn't make sense to define a $\left|\psi_{\text{reset}}\right\rangle$ here, as the resulting state is mixed. At most, you can define a density matrix $\rho_{\text{reset}}$, which is the one I've put in my answer. Adding the statevectors and then normalising won't give you the right density matrix. Note that even though the pases are not well-defined, the density matrix is known. It's easy for a simulator to simply work with the density matrix of a mixed state and to apply quantum gates on it. If it gives you a statevector, then it postselected on the measurement outcome. Commented Jun 1, 2023 at 18:35