A boolean QPQ using single photons