# Matrix representation of a measurement

It is well known that any operation on a quantum computer is described with a unitary matrix (a quantum gate) because quantum computing is reversible.

Only non-reversible operation is a measurement of a qubit. Therefore, I would expect that the measurement can be described by a non-unitary matrix (or even by matrix that is not invertible).

A result of the measurement should be a probability distribution of all possible states of measured qubits.

My question: How does a matrix representing measurement of qubit(s) look like?

There is no single matrix representing measurement. Projective measurements are represented by a set of orthogonal projectors. For example, measurement of a single qubit in the standard basis is represented by projectors $$\pi_0=\begin{pmatrix} 1 &0\\ 0 &0 \end{pmatrix}$$ and $$\pi_1=\begin{pmatrix} 0 &0\\ 0 &1 \end{pmatrix}$$
If a qubit was initially in state with density matrix $$\rho$$, then the post-measurement density matrix $$\rho'$$ is
$$\rho'=\sum_{i=0}^1\pi_i\rho\pi_i$$