The quantum version of the
gate for bits exchanges
the two logical states. That is, using ket notation,
| (8) |
![]() |
(10) |
.
An even simpler gate is the one that does nothing. We call this
the ![]() |
(11) |
The
and
gates are ``reversible''. In other
words, we can undo their actions by applying other
gates. For example, the action of the
gate can be undone
by another
gate. The action of every reversible
quantum gate can be represented by matrix multiplication, where the
matrix has the additional property of preserving the length of
vectors. Such matrices are called ``unitary'' and are
characterized by the equation
, where
is the conjugate transpose of
and
is the identity
matrix. (The conjugate transpose of a matrix is computed by flipping
the matrix across the main diagonal and conjugating the complex
numbers.) For gates
represented by a matrix, the unitarity condition is necessary and
sufficient for ensuring that pure states get mapped to pure states.
Because qubit states can be represented as points on a sphere,
reversible one-qubit gates can be thought of as rotations of the Bloch
sphere. This is why such quantum gates are often called
``rotations''. As explained in detail in [11],
rotations around the
,
and
axis are in a sense generated by
the three Pauli matrices
To check directly that the rotation gates are reversible one can
determine their inverses. In this case and as expected, the inverse of
a rotation is the rotation around the same axis in the opposite
direction. For example, the inverses of the
and
gates are given by
![]() |
(14) |
The ket notation can be extended so that we can write gates in a
compact form that readily generalizes to multiple qubits. To do so we
have to introduce expressions such as
. This is called
the ``bra'' notation. The terminology comes from the term ``bracket'':
The `bra'' is the left and the ``ket'' is the right part of a matched
pair of brackets. From the vector point of view,
corresponds to the row vector
. Note that a column
vector multiplied by a row vector yields a matrix. In the bra-ket
notation, this corresponds to multiplying a ket
by a bra
, written as
. Since this represents
an operator on states, we expect to be able to compute the effect of
on a state
by forming the
product. To be able to evaluate such products with one-qubit kets and
bras, we need the following two rules.
| (16) |
| (17) |
To understand inner product evaluation,
think of the expressions
as products of row and column vectors. For example,
![]() |
(18) |
Every linear operator on states can be expressed with the bra-ket
notation.
For example, the bra-ket expression for the
gate
is
.
To apply
to a qubit, you multiply its state on the left
by the bra-ket expression:
![]() |
![]() |
||
![]() |
|||
| (19) |
The coefficients of the
in a bra-ket representation
of a gate correspond to matrix entries in the matrix representation.
The relationship is defined by
![]() |
(20) |