Different types of interactions in quantum systems are currently being investigated regarding their suitability for future quantum technologies. One promising candidate is the strong and long-range interaction between Rydberg states of neutral atoms, for which first applications in the fields of quantum computation [1] and quantum simulations [2][3][4] have been reported in recent years. Using electromagnetically induced transparency, these Rydberg interactions can be mapped to light [5][6][7][8][9][10][11][12][13][14][15], thus creating an effective interaction between photons. Here we extend the range of applicability of these interactions to the field of quantum communication and quantum networking [16] by realising a photon-photon quantum gate [17,18]. To achieve this, a photonic control qubit is stored in a Rydberg quantum memory in an ultracold atomic gas. This qubit interacts with a propagating photonic target qubit coupled to a Rydberg state to generate a conditional π phase shift. Finally, the control photon is retrieved. We measure controlled-NOT truth tables with fidelities 0.66(9) and 0.70(8) and an entangling-gate fidelity of 0.637(45). The demonstration of a photon-photon quantum gate is the hallmark for having achieved full quantum control of one photon over another. The level of control achieved here is an important step on one hand for exploring novel many-body states of photons and on the other hand for applications in quantum communication and quantum networking. A prominent example is deterministic photonic Bell-state detection which is crucial for quantum repeaters.Optical technologies serve as today's standard for distributing information in the Internet since photons offer high speed and large bandwidth. Because of these benefits, future quantum technologies will probably rely on photonic qubits to transfer quantum states between distant nodes. However, ambitions to use photons for processing rather than only transmitting qubits are hampered by the fact that photons hardly interact with each other. A solution to this problem is offered by a Rydberg polariton [6][7][8][9][10][11][12][13][14][15]. This intriguing quasiparticle -composed of a photonic component and an atomic Rydberg excitation -is obtained when a photon enters a medium in which electromagnetically induced transparency (EIT) couples the photon to a Rydberg state.The key idea is that the atomic Rydberg components create a strong long-range interaction between two Rydberg polaritons. Many schemes for implementing a photonphoton gate based on Rydberg interactions have been a (Control qubit) b (Target qubit) |gñ |gñ |g ñ |69 |67 ñ ñ |e |e R R ñ ñ |e |e L L ñ ñ Δ Δ HFS HFS |Lñ |Lñ |Rñ |Rñ Δ t Δ t ' Control Rydberg coupling Target coupling Ground state coupling FIG. 1: Atomic level schemes. a, Level scheme for EIT storage of the control qubit. The initial population (green) is prepared in state |g . |L polarisation is stored in a Rydberg state |69 , |R polarisation in a ground state |g ′ . b, Level scheme for the target qubit. |L pol...