Compute Matrix for Simple Quantum Gates

  • Context: Graduate 
  • Thread starter Thread starter brydustin
  • Start date Start date
  • Tags Tags
    Quantum Quantum gates
Click For Summary
SUMMARY

The discussion focuses on computing the matrix representation of the U_CNOT quantum gate, which is defined by the transformations |00> -> |00>, |01> -> |01>, |10> -> |11>, and |11> -> |10>. The correct matrix representation is confirmed to be [1 0 0 0; 0 0 0 1; 0 0 1 0; 0 1 0 0], which can be derived using outer products. The participant also explores using vectors to facilitate the computation, leading to the same correct result. The inquiry revolves around whether this method is optimal or if there are more straightforward approaches to compute gate matrices.

PREREQUISITES
  • Understanding of quantum mechanics and qubit states
  • Familiarity with quantum gate operations, specifically the U_CNOT operator
  • Knowledge of matrix representation and outer products
  • Basic proficiency in linear algebra and vector manipulation
NEXT STEPS
  • Research the mathematical foundations of quantum gates and their matrix representations
  • Learn about the implementation of quantum gates in Qiskit
  • Explore the concept of outer products in linear algebra
  • Investigate alternative methods for computing quantum gate matrices, such as using tensor products
USEFUL FOR

Quantum computing enthusiasts, researchers in quantum mechanics, and developers working with quantum algorithms will benefit from this discussion.

brydustin
Messages
201
Reaction score
0
The example from my textbook shows one example of how to compute the matrix for a gate.
The example is the U_CNOT operator: |00> -> |00>, |01> -> |01>; |10>->|11>; |11>->|10>

Then they show that the operator is merely the sum of the outer products of these.

|00><00| + |10><10| + |01><11| + |11><01| = [ I 0 ; 0 X] : where X is the "NOT" operator.

When I perform the same sort of computation with the "top" part of the circuit as the "target bit" and the bottom part as the "control bit" I get the identity; however, my first intuition was that it should be [X 0; 0 I] (which is also wrong). The correct answer is that it should be:
[1 0 0 0; 0 0 0 1; 0 0 1 0 ; 0 1 0 0 ] (that's row by row). I understand how to read the circuit, but not how to compute the associated matrix.

I've noticed that if I put the basis set into a "vector" then I can get the computation to work out, but this seems kinda "hand-wavy":
[tex]\begin{pmatrix} 1 &\0 &\0 &\0 \\ 0 &\0 &\0 &\1 \\ 0 &\0 &\1 &\0 \\ 0 &\1 &\0 &\0 \end{pmatrix} \begin{pmatrix}|00) \\ |01)\\ |10)\\ |11)\\ \end{pmatrix}= \begin{pmatrix}|00) \\ |11)\\ |10)\\ |01)\\ \end{pmatrix}[/tex]

For example I suppose this will also work:

[tex]\begin{pmatrix} \alpha &\0 &\0 &\0 \\ \beta &\1 &\1 &\0 \\ \gamma &\--1 &\0 &\+1 \\ \delta &\1 &\0 &\0 \end{pmatrix} \begin{pmatrix}|00) \\ |01)\\ |10)\\ |11)\\ \end{pmatrix}= \begin{pmatrix}|00) \\ |11)\\ |10)\\ |01)\\ \end{pmatrix} : {\alpha, \beta,\gamma,\delta \in Reals}[/tex]
 
Last edited:
Physics news on Phys.org
This seems to be the same as the first answer I got, and it's correct. Is this the best way to compute the matrix for a gate? Is there a more straightforward way to do this?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K