## QUANTEM GATE

Categories: PROGRAMMING LANGUAGE

A quantum gate is a unitary matrix.First of all, quantum gates will be implemented by physical devices, and so they must abide by the laws of quantum physics. One relevant law of physics is that no information is ever lost when transitioning between points in the past and the future¹. This is known as unitarity. Since our quantum gates define how we transition between states, they too must abide by unitarity

Secondly, note that our quantum gates will be applied to qubits. We learned earlier that qubits are really just vectors, and so that means quantum gates must somehow operate on vectors. Fortunately, we recall that a matrix is actually just a linear transformation for vectors!

Combining these two ideas, we think of quantum gates as unitary matrices. A unitary matrix is any square matrix of complex numbers such that the conjugate transpose is equal to its inverse. As a quick refresher, the conjugate transpose of a matrix is found by taking the conjugate of each element in the matrix (a + bi → a — bi), and then taking the transpose of the matrix (element ij → element ji). We typically denote the conjugate transpose by the dagger, †.