Use units , metric , and . Treat the complex scalar field and its adjoint as independent variables when varying the action. Their canonical momenta are
Canonical quantization in the Heisenberg picture imposes, at the same time ,
All other independent equal-time commutators vanish: in particular , together with the same-type field and momentum commutators. The Legendre transform gives the Hamiltonian density
The Euler-Lagrange equations are . The positive- and negative-frequency plane waves form a complete basis of solutions of the Klein-Gordon equation. Since the field is complex, their operator coefficients are independent rather than being adjoints of each other. Define the Lorentz-invariant phase space measure . A convenient expansion is
The minus sign is a phase convention: replacing by produces the usual plus-sign expansion without changing its commutators or number operator. The normalization is fixed by the canonical commutation relations. For example,
when . The cross commutators vanish and the other canonical relation follows by taking adjoints with the operator order reversed. Conversely these mode commutators can be obtained by Fourier inversion of the equal-time relations. This is canonical quantization of a complex scalar field.
Substitution into the spatial integral for makes the diagonal terms proportional to and . Terms creating or annihilating a pair have and a coefficient , so they cancel. The result before vacuum subtraction is
Commuting past leaves a divergent field-independent vacuum energy. The displayed zero-vacuum-energy form must therefore be understood as a normal-ordered Hamiltonian:
A regulator can be introduced before subtracting the constant. This is the normal-ordered Hamiltonian of a free complex scalar field; the unrenormalized Hamiltonian is not literally equal to this expression without that convention.
The scalar-field vacuum is annihilated by both annihilation operators. Their adjoints create two species of spin-zero bosons with the same positive energy and mass , because
Repeated creation operators give the bosonic Fock space. The negative-frequency part does not create a negative-energy physical state; it creates the antiparticle of positive energy. The charge distinguishes the two species.
For the global phase transformation , , Noether theorem gives . Its divergence is
With vanishing boundary flux, the integral of is a conserved charge. Substituting the modes gives, before charge normal ordering, . The pair terms cancel because their frequency difference is zero when their spatial momenta sum to zero. Taking the vacuum charge to vanish gives the complex scalar charge operator
The mode commutators imply and , so
Thus the particle carries charge , the antiparticle carries charge , and a state with occupation numbers has charge . Also and , agreeing with the phase transformation and charge conservation.