Quantum photonics for computation and computation of quantum photonics