3
$\begingroup$

In the derivation of the parameter shift rules in the original paper, the Hermitian generator $G$ of any unitary $U(\theta)=\exp[-i\theta G]$ satisfies

$$ U(\pm\frac{\pi}{4r})=\frac{1}{\sqrt{2}}(I\mp\frac{i}{r}G) $$

So, this should allow us to write the gradient as a single pass of the normal circuit corresponding to $I$ and a pass of one of the two shifted circuits, right? I get why using both the shifted circuits works, but isn't it computationally more efficient to use the run of the unshifted circuit we are already doing, plus only one shifted circuit?

$\endgroup$

1 Answer 1

3
$\begingroup$

Note that we are not interested in differentiating the gate $U(\theta)$, but some expectation-value-based function $E(\theta)$, which "contains the gate twice", if you will: $$E(\theta)=\langle \psi_0|U(\theta)^\dagger H U(\theta)|\psi_0\rangle$$ This function can be shown to be a Fourier series, with a single frequency for gates that satisfy the original shift rule. This means that $$E(\theta) = a_0 + a_1\cos(\theta)+ b_1\sin(\theta)$$ where I assumed the single frequency to be $1$ for simplicity. Furthermore, without loss of generality, we may assume that we want the derivative of $E$ at $0$, because we may absorb the "rest" of $U(\theta)$ in the state $\psi_0$. This means, we want to find $E'(0)=b_1$. At the same time, $E(0)=a_0+a_1$, i.e. the un-shifted evaluation does not contain any information about $b_1$, and does not allow us to resolve $a_0$ and $a_1$, but only their sum. The conclusion from this is, that we need two evaluations that are somehow shifted away from $0$ (or a multiple of $\pi$ for that matter, because the $\sin(\theta)$ part vanishes at those points).

You might be happy to hear, that computing the second-order derivative $E''(0)$ is indeed possible with just one additional execution: $$E''(0) = a_1 = (E(0) - E(\pi)) / 2$$ This last statement appears for example in Mari, Bromley, Killoran (2021).

For more information, you could be interested in

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.