From Maxwell equations for free space and by converting the amplitudes in Fourier expansion of the vector potential into operators according to quantisation correspondence, this paper obtains Hamiltonian operator, which quantises the electromagnetic field, and introduces the number state representation for the field. 本文从真空中麦克斯韦方程组出发,通过把矢势的Fourier展开式中的振幅按照量子化对应化为算符,得到了哈密顿算符,从而实现了电磁场的量子化,同时给出了电磁场的数态描述。