Many interesting phenomena, such as quantization of Landau levels and quantum Hall effect, can occur in an electronic system under a strong magnetic field. However, photons do not carry charge, and they do not have many properties induced by external magnetic fields, either. Recently, the pseudomagnetic field, an artificial synthetic gauge field, has attracted intense research interest in classical wave systems, in which the propagation of the wave can be manipulated like in a real magnetic field. The photonic crystal is an optical structure composed of periodic material distributions and provides a good platform for studying the control of electromagnetic waves. In this work, we construct a uniform pseudomagnetic field by introducing uniaxial linear gradient deformation of metallic rods in a two-dimensional photonic crystal. The strong pseudomagnetic field leads to the quantization of photonic Landau levels in photonic crystal. The sublattice polarization of
n= 0 Landau level is also demonstrated in our simulations. Unlike the real magnetic field, the pseudomagnetic fields of photonic crystal is opposite in two inequivalent energy valleys, and the time-reversal symmetry of the system is not broken. Our designed gradient photonic crystals support the transport of edge state in the gap between
n= 0 and
n= ±1 Landau levels. The edge state can propagate unidirectionally when it is excited by a chiral source. When a gaussian beam impinges on the photonic crystal, the propagating paths of two splitting beams can be controlled, which gives rise to the bend of two beams. Two photonic crystals with opposite pseudomagnetic fields are assembled together, and the interesting phenomenon of “snake-state” can be obtained. Our proposal opens the way for designing information processing devices by manipulating electromagnetic waves.