Text this: Density matrix theory and applications