Quantum Computing Asked on June 22, 2021
I have a single qubit $a$ in state
$$ |srangle = alpha_0|0rangle + alpha_1|1rangle $$
$alpha_0$ may be 0 whereas $alpha_1$ is always positive and above $0$. Almost always $$alpha_0 << alpha_1$$
Is there any way to flip $alpha_0$ and $alpha_1$ if and only if $alpha_0 > 0$?
I was thinking of having two ancillary qubits and perform two controlled CNOTs to detect both state $0$ and state $1$ and then CCNOT with those two ancillary qubits to flip $a_0$ and $a_1$
But does this make sense? I am not sure if detecting a superposition is possible in this way
No, that's not possible. For example, it would allow you to implement an operation that sent both $|0rangle$ and $|1rangle$ to $|1rangle$. Two states going to the same state means the operation is irreversible and non-unitary.
Answered by Craig Gidney on June 22, 2021
Elaborating more on the previous answer, here is a proof that it's indeed not possible.
Let us assume that there is a unitary $ U $ acting on qubit $a$ and on $m$ ancillary qubits such that $UBig(|s rangle otimes |0 rangle^m_{anc}Big)$ is the desired output. Then on inputs $|+ rangle, |- rangle$ the outputs are
So we may write $$U = |+ rangle langle +| otimes W_+ + |- rangle langle -| otimes W_-$$ where $W_{pm} |0 rangle^m = |phi_{pm} rangle $.
On input $|1 rangle$ we have the output state $$ |chi rangle = UBig(|1 rangle otimes |0 rangle^m_{anc}Big) = frac{1}{sqrt{2}} Big(|+ rangle otimes |phi_+ rangle_{anc} - |- rangle otimes |phi_- rangle_{anc}Big)$$ and since we want the qubit to be in $|1 rangle$ state, it must hold that $$ langle chi| Big( |1 rangle langle 1| otimes mathbb{1} Big) |chi rangle = 1 implies text{Re}{langle phi_+ | phi_- rangle} = 1 implies |phi_+ rangle = |phi_- rangle := |phi rangle$$ But $$ UBig(|0 rangle otimes |0 rangle^m_{anc}Big) = frac{1}{sqrt{2}} Big(|+ rangle otimes |phi_+ rangle_{anc} + |- rangle otimes |phi_- rangle_{anc}Big) = |0 rangle |phi rangle_{anc}$$ so finally $UBig(|s rangle otimes |0 rangle^m_{anc}Big) = |s rangle otimes |phi rangle_{anc}$ and $U$ does not flip $a_0, a_1$.
To overcome this impossibility, you may want to obtain an algorithm that has the desired output state only with some success probability. A solution towards this direction is the following: if you can obtain two copies of the input state $|s rangle$, then
Apply amplitude amplification on the first copy to amplify the amplitude of $|0 rangle$ state.
Apply an X gate on the second copy and then a Controlled-X (control is the first copy). Now the state is $ c_0 |0 rangle X|s rangle + c_1 |1 rangle |s rangle $.
Measure the first qubit. If it's zero, then the state of the second qubit is in the correct state ($X|s rangle$). If it's one, then there is some error probability but this will be small since from step 1, $|c_0|^2$ will be big if $a_0 neq 0 $.
Answered by tsgeorgios on June 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP