A parton shower based on factorization of the quantum density matrix