During this course, Lagrangian and Hamiltonian mechanics will be used for analyzing quantum computing circuits. As a refresher on Lagrangian mechanics, let us first consider a classical pendulum, with a point mass \(m\) suspended by a rigid wire of length \(\ell\), subjected to a uniform gravitational field having acceleration \(g\). Refer to Figure \ref{fig:pendulum}.

The magnitude of the linear velocity of the bob (point mass) is

\begin{equation} \label{eq:v-pendulum}v=\ell\,\dot{\theta}\;,\\ \end{equation}where \(\theta\) is the angle of the pendulum as measured from the vertical.

The gravitational potential energy of the bob is, by geometry,

\begin{equation} \label{eq:V-pendulum}V=mgh=mg\ell\,(1-\cos\theta)\approx\frac{1}{2}mg\ell\theta^{2}\;,\\ \end{equation}where the zero level for the height has been taken as the stable equilibrium position of the pendulum at \(\theta=0\), and the last form is an \(O(\theta^{4})\) Taylor approximation valid near \(\theta=0\).

The kinetic energy of the bob is

\begin{equation} \label{eq:T-pendulum}T=\frac{1}{2}mv^{2}=\frac{1}{2}m\ell^{2}\dot{\theta}^{2}\;,\\ \end{equation}where we have used (\ref{eq:v-pendulum}).

Recall that the Lagrangian is defined as the kinetic energy minus the potential energy,

\begin{equation} \label{eq:L-general}L\equiv T-V\;.\\ \end{equation}We choose the generalized position and momentum variables as

\begin{align} q & \label{eq:q-pendulum}=\ell\,\theta\;, \\ p & \label{eq:p-pendulum}\equiv\frac{\partial L}{\partial\dot{q}}\approx\frac{\partial}{\partial\dot{q}}\left(\frac{1}{2}m\dot{q}^{2}-\frac{mg}{2\ell}q^{2}\right)=m\dot{q}=m\ell\,\dot{\theta}\;.\\ \end{align}The Euler–Lagrange equation in Lagrangian mechanics states that

\begin{equation} \label{eq:Euler-Lagrange-general}\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\partial L}{\partial\dot{q}}\right)=\frac{\partial L}{\partial q}\;.\\ \end{equation}Inserting (\ref{eq:q-pendulum}) and (\ref{eq:p-pendulum}) into (\ref{eq:Euler-Lagrange-general}), we have

## Share on Social Media