\ket{x}\bra{y}$
\ket{x}\bra{0} + \ket{y}\bra{1}$ where $\ket{x}$ and $\ket{y}$ are [[orthonormal]] produces a [[unitary-operator]] sending $\ket{0}$ to $\ket{x}$ and $\ket{1}$ to $\ket{y}$\ket{x}\bra{x}$ is a projection matrix onto $\ket{x}$