1
$\begingroup$

I am trying to calculate the state of this Quirk circuit by hand:

enter image description here

where U is a custom gate with 2x2 matrix:

enter image description here

From what I've read, I should be able to calculate the resultant amplitudes as:

(U⊗I⊗I).(anti_controlled_H⊗I).(anti_Toffoli)

which is

calculation

But the resulting amplitudes in Wolfram Alpha do not match the Quirk output, leading me to believe I've made fundamental mistake. What am I missing?

$\endgroup$

1 Answer 1

1
$\begingroup$

While quantum circuits are written such that time goes left to right[1], matrix multiplication goes the other direction[2].

That is, a quantum circuit contains the gate $U_1$ followed by $U_2$ is equivalent to $U_2U_1$.

Which means you need to calculate $(\text{Anti-CCX})(\text{Anti-CH} \otimes I)(U \otimes I \otimes I)$

$\endgroup$

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.