" alt="$a&gt;0$"> and  <img src="loss_cp_eq26389.png" alt="$d^2$"> is the squared difference between the actual and desired position of tip of the pendulum. The mean and the variance of the loss are computed by averaging over the Gaussian state distribution <img src="loss_cp_eq32292.png" alt="$p(x) = \mathcal N(m,s)$"> with mean <img src="loss_cp_eq81831.png" alt="$m$"> and covariance matrix <img src="loss_cp_eq72999.png" alt="$s$">. Derivatives of these quantities are computed when desired.</p><pre class="