An LC circuit can be quantized using the same methods as for the quantum harmonic oscillator. An LC circuit is a variety of resonant circuit, and consists of an inductor, represented by the letter L, and a capacitor, represented by the letter C. When connected together, an electric current can alternate between them at the circuit's resonant frequency:
where L is the inductance in henries, and C is the capacitance in farads. The angular frequency ω {\displaystyle \omega \,} has units of radians per second. A capacitor stores energy in the electric field between the plates, which can be written as follows:
Where Q is the net charge on the capacitor, calculated as
Likewise, an inductor stores energy in the magnetic field depending on the current, which can be written as follows:
Where ϕ {\displaystyle \phi } is the branch flux, defined as
Since charge and flux are canonically conjugate variables, one can use canonical quantization to rewrite the classical hamiltonian in the quantum formalism, by identifying
and enforcing the canonical commutation relation