  Quantum state transfer from flying photons to stationary matter qubits is an
important element in the realization of quantum networks. Self-assembled
semiconductor quantum dots provide a promising solid-state platform hosting
both single photon and spin, with an inherent light-matter interface. Here, we
develop a method to coherently and actively control the single-photon frequency
bins in superposition using electro-optic modulators, and measure the
spin-photon entanglement with a fidelity of $0.796\pm0.020$. Further, by
Greenberger-Horne-Zeilinger-type state projection on the frequency, path and
polarization degrees of freedom of a single photon, we demonstrate quantum
state transfer from a single photon to a single electron spin confined in an
InGaAs quantum dot, separated by 5 meters. The quantum state mapping from the
photon's polarization to the electron's spin is demonstrated along three
different axis on the Bloch sphere, with an average fidelity of $78.5\%$.
