photon density matrix simulation for arbitrary input state