5

I'm studying the parameter shift rule and got stuck when improving an example with Pauli operators in https://arxiv.org/abs/1803.00745.

This paper shows up $\partial_\mu f=\frac{1}{2}(f(\mu+\frac{\pi}{2})-f(\mu-\frac{\pi}{2})) $ when measuring in z-basis. But how this formula change with x-basis?

glS
  • 24,708
  • 5
  • 34
  • 108
Monad
  • 375
  • 1
  • 6

2 Answers2

2

In quantum computing, we almost always measure in the z-basis (by convention). Of course, we can also use other conventions, but we seem to stick to the z-basis.

To answer your question, the formula does not change and is irrelevant for the measurement basis used. The whole idea of the parameter shift rule is to avoid the problem of the finite-difference approximation of measuring 2 points very close to each other and produce a meaningless gradient value. With the parameter shift, you shift the measurement of the finite difference (using conditions on the ansatz) pi/2 away from the current point.

So, just go ahead and use the formula!

quantum
  • 575
  • 2
  • 10
0

I would also recommend this explanation from PennyLane, which contains several examples, including a Pauli Gate example.

Catalina
  • 151
  • 2