Implementation of a quantum private query using single-photon transistors