1. A device comprising: a gate capable of receiving a target photon state and a probe photon state, wherein the gate creates in the probe state a change that depends on a number of photons in the target photon state; and a measurement system arranged to measure the change in the probe state to detect whether the target photon state includes one or more photons.