4
$\begingroup$

Given a function $f : \{0,1\}^n \longrightarrow \{0,1\}^m$ and a function $g : \{0,1\}^m \longrightarrow \{0,1\}^n$ that both can be computed by polynomial-size classical circuits such that $g(f(x))=x$ for all $x\in\{0,1\}^n$, how can I build a quantum circuit that maps $|x,0\rangle$ to $|f(x),0\rangle$ ?

$\endgroup$
0

1 Answer 1

4
$\begingroup$

I assume you know how to turn a classical circuit that computes $f$ into a quantum circuit that computes $|x,\,y\oplus f(x)\rangle$ from $|x,y\rangle$, since that should be covered in any introduction to quantum computing.

Given $|x,0\rangle$ and quantum circuits of that kind for $f$ and $g$, you can simply compute $|x,f(x)\rangle$, then rearrange to $|f(x),x\rangle$, then compute $|f(x),x\oplus g(f(x))\rangle = |f(x),0\rangle$.

$\endgroup$
1
  • $\begingroup$ Nice. That is two times Deutsch essentially? $\endgroup$
    – Marion
    Commented Feb 6, 2022 at 2:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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