Skip to main content
11 events
when toggle format what by license comment
Jun 8, 2016 at 21:11 comment added coolcat007 @DavidZ yea true, but I'm writing a program that does this for me, so then this would be the easiest way to implement it.
Jun 8, 2016 at 12:38 comment added David Z @coolcat007 Yeah, that's the idea. (Of course you don't need to calculate a whole matrix just to swap two qubits.)
Jun 7, 2016 at 19:32 comment added coolcat007 @DavidZ So basically you are saying, in the example I gave you have to calculate the following: $(I \otimes I \otimes SWAP \otimes I) \times (I \otimes CNOT \otimes I \otimes I) \times (I \otimes I \otimes SWAP \otimes I)$. Will this give me the correct transformation matrix?
Jun 6, 2016 at 23:17 comment added David Z @coolcat007 You can still use tensor products, you might just have to write them a little differently. It's possible that the easiest way to actually figure out the matrix elements is to reorder your qubit basis, compute the tensor product, and undo the reordering. But you can do this all in the math; you don't have to implement a sorting algorithm in the quantum computer. Remember, the labeling of the qubits is arbitrary, assuming they're all mutually connected.
Jun 6, 2016 at 21:50 comment added coolcat007 @DavidZ How does this work for a 2-qubit operator (Like CNOT) on for example qubit 2 and 4 in a 5-qubit system? Can you still use the tensor product or do you have to use different methods to perform such an operation? So a more general question: in an n-qubit system, say you have a transform involving m qubits that are not necessarily in order, how would you perform this? Do you need to use bubblesort using swap functions to get the qubits in the right order?
Apr 19, 2016 at 9:27 comment added David Z @frogeyedpeas ah, I mixed up the definition of the tensor product. I've fixed it now.
Apr 19, 2016 at 9:27 history edited David Z CC BY-SA 3.0
fix tensor product math
Apr 19, 2016 at 2:54 comment added Sidharth Ghoshal Which is the correct $O \otimes I_2$ as you suggested
Apr 19, 2016 at 2:54 comment added Sidharth Ghoshal This gave me enough of a hint to derive the correct formulation. I did the check and the operator you suggested instead applies a Hadamard transform to the second Qubit and not the first. If you replicate @Craig Gidney's procedure you end up with the matrix $$ \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & -1 & 0 \\ 0 & 1 & 0 & -1 \end{pmatrix}$$
Apr 18, 2016 at 20:28 vote accept Sidharth Ghoshal
Apr 19, 2016 at 2:51
Apr 18, 2016 at 9:48 history answered David Z CC BY-SA 3.0