How are the Pauli $X$ and $Z$ matrices expressed in bra-ket notation?

3

1

For example:

$$\rm{X=\sigma_x=NOT=|0\rangle\langle 1|+|1\rangle\langle 0|=\begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}}$$

$$\rm{Z=\sigma_Z=signflip=|0\rangle\langle 0|-|1\rangle\langle 1|=\begin{bmatrix}1 & 0 \\ 0 & -1\end{bmatrix}}$$

I do no understand how the matrix can be expressed in bra-ket and the way around. I could not find any good teachings on this.

John T

Posted 2020-10-08T17:18:43.663

Reputation: 153

Question was closed 2020-10-18T19:11:38.893

please try to use mathjax rather than images whenever possible

– glS – 2020-10-09T06:55:09.223

@glS no, my question is answered below as you can see checked it as an answer. – John T – 2020-10-09T09:07:34.023

Answers

4

Recall that kets $|\cdot\rangle$ represent column vectors; a bra $\langle\cdot|$ is a ket's row vector counterpart. For any ket $|\psi\rangle$, the corresponding bra is its adjoint (conjugate transpose): $\langle\psi| = |\psi\rangle^\dagger$. (For a refresher on this, see this question).

Kets and bras give us a neat way to express inner and outer products. The outer product of two vectors of the same size produces a square matrix. We can use a linear combination of several outer products of simple vectors (such as basis vectors) to express any square matrix. For example, the $X$ gate can be expressed as follows:

$$X = |0\rangle\langle1| + |1\rangle\langle0| = \begin{bmatrix} 1 \\ 0 \end{bmatrix}\begin{bmatrix} 0 & 1 \end{bmatrix} + \begin{bmatrix} 0 \\ 1 \end{bmatrix}\begin{bmatrix} 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$$

Mariia Mykhailova

Posted 2020-10-08T17:18:43.663

Reputation: 6 616

And how do I go from matrix to notation, the way around? – John T – 2020-10-08T19:54:39.380

1Same way but in other direction - express the matrix as a sum of matrices with just one non-zero elements, and each of these matrices will be a ket-bra product of two basis vectors – Mariia Mykhailova – 2020-10-08T19:57:27.677