3
$\begingroup$

Suppose that a quantum state $|\psi\rangle$ in question is $|\psi\rangle \propto \sum_x |x\rangle|f(x)\rangle$.

I want to implement a quantum swap operation such that computational basis $|x\rangle|f(x)\rangle$ becomes $|x\rangle|f(x+1)\rangle$. That is, $|x\rangle|f(x)\rangle \to |x\rangle|f(x+1)\rangle$. This seems to be just about a series of basis swaps, but I am not so sure about this. Can we implement this as a quantum circuit? (For the greatest $x$, $x+1$ is considered to be zero.)

$\endgroup$

1 Answer 1

4
$\begingroup$

Probably the best way to think about this is "subtract 1 from the first register". This is a standard classical computation, and hence you can write out a circuit for it. (Although you'll want to be careful of your boundary conditions.)

$\endgroup$

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.