Get the gradient of a quantum circuit
The landscape of a quantum circuit
This section is a simplified discussion of results in Ref. 5.
Consider the expectation value of $B$ on state $\vert\psi_N\rangle = U_{N:k+1} U_k(\eta)U_{k1:1}\vert\psi_0\rangle$ with $U_k(\eta)=e^{i\Xi\eta/2}$. Given $\Xi^2 =1$, we have $U_k(\eta) = \cos(\frac{\eta}{2})i\sin(\frac{\eta}{2})\Xi$.
Here, In line 1, we used the following shorthands
And in line 5, we have introduced
Finally, we obtained a sine function.
A direct proposition is
For statistic functional
Next, we describe a new class of differenciable loss which can not be written as an obserable easily, the statistic functionals, for simplicity, we consider an arbitrary statistic functional $f(\xset)$, with a sequence of bit strings $\xset\equiv{x_1,x_2,\ldots, x_r}$ as its arguments. Let’s define the following expectation of this function
Here, $\gammaset={\gammav_1, \gammav_2,\ldots,\gammav_r}$ is the offset angles applied to circuit parameters, %Its element $\gammav_i$ is defined in the same parameter space as $\thetav$ that represents a shift to $\thetav$. which means the probability distributions of generated samples is ${\pshift{\gammav_1}, \pshift{\gammav_2},\ldots ,\pshift{\gammav_r}}$. Writing out the above expectation explicitly, we have
where index $i$ runs from $1$ to $r$. Its partial derivative with respect to $\thetai$ is
Again, using the gradient of probability, we have
If $f$ is symmetric, $\Expect_f(\mathbf{0})$ becomes a Vstatistic~\cite{Mises1947}, then the gradient can be further simplified to
which contains only two terms. This result can be readily verified by calculating the gradient of MMD loss, noticing the expectation of a kernel function is a Vstatistic of degree $2$. By repeatedly applying the gradient formula, we will be able to obtain higher order gradients.
References

JinGuo Liu and Lei Wang, arXiv:1804.04168

J. Li, X. Yang, X. Peng, and C.P. Sun, Phys. Rev. Lett. 118, 150503 (2017).

E. Farhi and H. Neven, arXiv:1802.06002.

K. Mitarai, M. Negoro, M. Kitagawa, and K. Fujii, arXiv:1803.00745.

Nakanishi, Ken M., Keisuke Fujii, and Synge Todo.
arXiv:1903.12166 (2019).