# Tag Info

## New answers tagged matrix-representation

2

The application of Hadamard gate on the first qubit is correct. Since CNOT is two qubit gate, it has to be described by matrix 4x4, so far you have only 2x2 matrix. However, there is a identity operator $I$ described by unit matrix on the second qubit. Hence the first step in you circuit can be described by matrix $H \otimes I$. Resulting matrix is of type ...

1

By taking into account this representation of the CNOT gate: $$CNOT = | 0 \rangle \langle 0 | \otimes I + | 1 \rangle \langle 1 | \otimes X$$ We can write: $$CNOT(1, 3) = | 0 \rangle \langle 0 | \otimes I \otimes I + | 1 \rangle \langle 1 | \otimes I \otimes X$$ CNOT(1, 2) = | 0 \rangle \langle 0 | \otimes I \otimes I + | 1 \rangle \langle 1 | \otimes ...

Top 50 recent answers are included