Gupta–Bleuler formalism
In quantum field theory, the Gupta–Bleuler formalism is a way of quantizing the electromagnetic field. The formulation is due to theoretical physicists Suraj N. Gupta and Konrad Bleuler. Overview
Firstly, consider a single photon. A basis of the one-photon vector space (it is explained why it is not a Hilbert space below) is given by the eigenstates  where , the 4-momentum is null () and the  component, the energy, is positive and  is the unit polarization vector and the index  ranges from 0 to 3. So,  is uniquely determined by the spatial momentum . Using the bra–ket notation, this space is equipped with a sesquilinear form defined by

,

where the  factor is to implement Lorentz covariance. The metric signature used here is +−−−. However, this sesquilinear form gives positive norms for spatial polarizations but negative norms for time-like polarizations. Negative probabilities are unphysical, not to mention a physical photon only has two transverse polarizations, not four. If one includes gauge covariance, one realizes a photon can have three possible polarizations (two transverse and one longitudinal (i.e. parallel to the 4-momentum)). This is given by the restriction . However, the longitudinal component is merely an unphysical gauge. While it would be nice to define a stricter restriction than the one given above which only leaves the two transverse components, it is easy to check that this can't be defined in a Lorentz covariant manner because what is transverse in one frame of reference isn't transverse anymore in another. To resolve this difficulty, first look at the subspace with three polarizations. The sesquilinear form restricted to it is merely semidefinite, which is better than indefinite. In addition, the subspace with zero norm turns out to be none other than the gauge degrees of freedom. So, define the physical Hilbert space to be the quotient space of the three polarization subspace by its zero norm subspace. This space has a positive definite form, making it a true Hilbert space. This technique can be similarly extended to the bosonic Fock space of multiparticle photons. Using the standard trick of adjoint creation and annihilation operators, but with this quotient trick, one can formulate a free field vector potential as an operator valued distribution  satisfying

with the condition

for physical states  and  in the Fock space (it is understood that physical states are really equivalence classes of states that differ by a state of zero norm). This is not the same thing as

. Note that if O is any gauge invariant operator,

does not depend upon the choice of the representatives of the equivalence classes, and so, this quantity is well-defined. This is not true for non-gauge-invariant operators in general because the Lorenz gauge still leaves residual gauge degrees of freedom. In an interacting theory of quantum electrodynamics, the Lorenz gauge condition still applies, but  no longer satisfies the free wave equation. See also 
 BRST formalism
 Quantum gauge theory
 Quantum electrodynamics
 ξ gauge

Notes

References
 
 

Gauge theories
Quantum electrodynamics