We present a programmable silicon photonic four-qubit integrated circuit for the generation and manipulation of diverse quantum states. The silicon photonic chip integrates photon-pair sources, pump-reducing filters, wavelength-division-multiplexing filters, Mach–Zehnder interferometer switches, and single-qubit arbitrary gates, enabling versatile state preparation and tomography. We measure Hong–Ou–Mandel interference with an impressive 98% visibility using four-photon coincidence, laying the foundation for high-purity qubits. Our analysis involves estimating the fidelity and purity of distinct quantum states through maximum-likelihood estimation applied to tomographic measurements. In our experimental results, we showcase the following achievements: a heralded single qubit achieving 98.2% fidelity and 98.3% purity, a Bell state reaching 95.2% fidelity and 94.8% purity, and a four-qubit system with two simultaneous Bell states exhibiting 87.4% fidelity and 84.6% purity. Finally, a four-qubit Greenberger–Horne–Zeilinger (GHZ) state demonstrates 85.4% fidelity and 81.7% purity. In addition, we certify the entanglement of the four-photon GHZ state through Bell’s inequality violations and a negative entanglement witness.