How China built a single-photon detector that works in space