  Quantum computers comprise elementary logic gates that initialize, control
and measure delicate quantum states. One of the most important gates is the
controlled-NOT, which is widely used to prepare two-qubit entangled states. The
controlled-NOT gate for single photon qubits is normally realized as a six-mode
network of individual beamsplitters. This architecture however, utilizes only a
small fraction of the circuit for the quantum operation with the majority of
the footprint dedicated to routing waveguides. Quantum walks are an alternative
photonics platform that use arrays of coupled waveguides with a continuous
interaction region instead of discrete gates. While quantum walks have been
successful for investigating condensed matter physics, applying the multi-mode
interference for logical quantum operations is yet to be shown. Here, we
experimentally demonstrate a two-qubit controlled-NOT gate in an array of
lithium niobate-on-insulator waveguides. We engineer the tight-binding
Hamiltonian of the six evanescently-coupled single-mode waveguides such that
the multi-mode interference corresponds to the linear optical controlled-NOT
unitary. We measure the two-qubit transfer matrix with $0.938\pm0.003$
fidelity, and we use the gate to generate entangled qubits with $0.945\pm0.002$
fidelity by preparing the control photon in a superposition state. Our results
highlight a new application for quantum walks that use a compact multi-mode
interaction region to realize large multi-component quantum circuits.
