2

I'm trying to understand the method from Grover and Rudolph to initialise state based on probability distribution. There is a example described in This post, however I don't understand why we need to have to do the rotation conditionally to a $\theta_0$ register. Since we add this register specifically already in this value, why it wouldn't work if we just perform the rotation in the additional qubits without it being controlled? Like: $$|0\rangle|0\rangle \rightarrow |0\rangle R_{\theta} |0\rangle = |0\rangle (\cos(\theta)|0\rangle + \sin(\theta)|1\rangle)$$ If you could show a quick example of why it doesn't work it'd be very nice.

Frederik vom Ende
  • 4,163
  • 3
  • 12
  • 49
L.DZ
  • 75
  • 5

1 Answers1

1

$\newcommand{\ket}[1]{|#1\rangle}$The ancilla qubits is necessary and it takes a value $\theta_i$ that is computed in the quantum circuit for the whole superposition. Then the rotation is done with a gate of the form $$U\ket{anc}\ket{reg} = \ket{anc} * Ry(\theta_i)*\ket{reg}$$. by doing this, we only need 1 rotation gate to compute the conditional amplitude of all the value in the superposition.

(See this post for more details.)

glS
  • 27,510
  • 7
  • 37
  • 125
L.DZ
  • 75
  • 5