0
$\begingroup$

I have $n*k$ qubits. At the very beginning the length of the state vector is $2^{nk}$. After some manipulations (Qiskit circuit) I reduce it to $k^n$ and it looks like $a|1...\rangle +a|0...\rangle ...$ Now I want to "eliminate " the $|0...\rangle$ components, and keep only the $|1...\rangle$ ones, if possible with the same coefficient for all (equiprobability).

Applying Grover I can find $c|1...\rangle +d|0...\rangle ...$

with $c >> d$, but I guess there is a simpler and more efficient method. But which one?

$\endgroup$
1
  • $\begingroup$ From my understanding, there isn't really a more asymptotically efficient method than Grover's. You can do the repeat-until-success methods, or finally you can use some sequence of controlled $R_y$ rotations. But the last option is dependent on your coefficients $a$ and which states you have already zeroed out. In general it is exponential in gate depth, but you can always give it a shot and see if in practice it works OK for your situation. But I believe in general the problem you are posing does not have an easy trick to solve it $\endgroup$ Nov 16 at 8:49

1 Answer 1

0
$\begingroup$

If you can use repeat-until-success patterns, you can just measure the first qubit: if the measurement result is 1, you have the state you want, with the basis vectors that start with 0 eliminated. If the measurement result is 0, however, you have the opposite of what you want, so you'll need to repeat the process from scratch, preparing the state again and measuring the first qubit again.

$\endgroup$
1
  • $\begingroup$ I could indeed do that but it would be not very efficient, for there are far more |0...> than |1...> as soon as n and k increase. $\endgroup$ Jun 17 at 19:38

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.