I had a question earlier about generating the superposition of all the possible states: Here. In that case, we could apply $H^{\otimes n}$ to the state $|0\rangle^{\otimes n}$, and each state has the same amplitude in the superposition: $|0\rangle^{\otimes n} \to \dfrac{1}{\sqrt{2^n}}\sum_{i=0}^{2^n-1} |i\rangle $. However, it is possible for us to tune the amplitude of certain states in the superposition? Say if I have 4 qubits and 4 Hadamard gates (one on each), that would generate a superposition of 16 states. Can I add some additional procedures to increase the amplitude of $|0110\rangle$ and $|1001\rangle$ and the rest states have the same and reduced amplitude?


  • 3
    $\begingroup$ This one of the things Grover's Algorithm does; the Wikipedia Page is quite good at outlining the algorithm. $\endgroup$ – Bertrand Einstein IV Jan 26 at 18:39
  • $\begingroup$ @Bertrand Einstein IV Thank you!! $\endgroup$ – ZR- Jan 26 at 20:35

Yes indeed you can!

First a simple example: if you want to increase all the amplitudes of the all the states that look like $|\cdot \cdot \cdot 1\rangle$ then you just need to apply an $R_y$ gate on the final qubit.

If on the other hand you want to increase the amplitudes of the specific states $|0110\rangle$ and $|1001\rangle$ by specific amounts, then you need to apply a series of controlled $R_y$ gates which isn't so trivial, and generically takes an exponential depth. If you want to increase their amplitudes, but you don't care by how much specifically, you can use Grover's algorithm as mentioned by Bertrand Einstein IV.

  • $\begingroup$ Thanks for the answer!! If I want to increase the amplitude for $|0110\rangle$ by specific amount, should I add $R_y$ to the second and third qubit? Why is there an exponential depth? $\endgroup$ – ZR- Jan 27 at 15:17
  • 1
    $\begingroup$ Well if you add an $R_y$ to the second and third qubit, you're also increasing the amplitudes of all states where the second and third qubit is 1 (so also $|0111\rangle$, $|1110\rangle$ and $|1111\rangle$) and also changing the amplitudes of other states with where only of either the second or third qubit is 1, so you unfortunately have to correct those with controlled $R_y$ rotations. I think an interesting way to see it is start with just two qubits and try to increase the amplitude of the state $|01\rangle$ $\endgroup$ – Rajiv Krishnakumar Jan 27 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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