Compute Matrix for Simple Quantum Gates

In summary, the conversation discusses the computation of a matrix for a gate using the example of the U_CNOT operator. The operator is shown to be the sum of outer products and the correct matrix is found to be [1 0 0 0; 0 0 0 1; 0 0 1 0 ; 0 1 0 0 ] when the top part of the circuit is the target bit and the bottom part is the control bit. The conversation also mentions using a "hand-wavy" method involving putting the basis set into a vector to compute the matrix, which is shown to be equivalent to the correct answer. It is asked if there is a more straightforward way to compute the matrix
  • #1
brydustin
205
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
  • #2
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?
 

1. What is a compute matrix for simple quantum gates?

A compute matrix for simple quantum gates is a mathematical representation of the operations performed by a quantum gate on a qubit (quantum bit). It is a unitary matrix that describes the transformation of the state of the qubit after the gate is applied.

2. What are simple quantum gates used for?

Simple quantum gates are used to manipulate the state of qubits in quantum computing systems. They are the building blocks of quantum circuits and are used to perform operations such as quantum logic gates, which are essential for performing operations on multiple qubits simultaneously.

3. How is a compute matrix for simple quantum gates calculated?

A compute matrix for simple quantum gates is calculated by multiplying the individual matrices of the gate operations in the desired order. This results in a single matrix that represents the overall operation of the gate on the qubit state.

4. What is the difference between a classical logic gate and a quantum logic gate?

Classical logic gates operate on classical bits, which can only have a value of 0 or 1. Quantum logic gates, on the other hand, operate on qubits, which can exist in superposition states and can represent both 0 and 1 simultaneously. This allows quantum logic gates to perform operations on multiple qubits simultaneously, making them more powerful than classical logic gates.

5. Are there limitations to the number of quantum gates that can be applied in a quantum circuit?

Yes, there are limitations to the number of quantum gates that can be applied in a quantum circuit. This is due to the phenomenon of quantum decoherence, where the delicate quantum states of the qubits can be disrupted by external factors and result in errors in the computation. Therefore, it is important to carefully design quantum circuits with a limited number of gates to minimize the effects of decoherence.

Similar threads

Replies
2
Views
408
Replies
1
Views
1K
Replies
2
Views
1K
  • Quantum Physics
Replies
2
Views
2K
Replies
1
Views
853
Replies
7
Views
3K
  • Quantum Physics
Replies
3
Views
1K
Replies
2
Views
732
  • Quantum Physics
Replies
1
Views
740
Replies
32
Views
2K
Back
Top