Skip to main content
KetQat

Appearance

Theorem · intermediate

Parameter-shift rule

For a gate exp(-i theta G/2) whose generator squares to the identity, the exact derivative of any expectation value with respect to theta equals half the difference of the expectation values at theta + pi/2 and theta - pi/2.

Peer-reviewed resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Let E(θ)=Tr⁡ ⁣(O W e−iθG/2ρ eiθG/2W†)E(\theta) = \tr\!\big(O\, W\, e^{-i\theta G/2} \rho\, e^{i\theta G/2} W\dagg\big) for a state ρ\rho, a unitary WW and an observable OO. Then EE has the form E(θ)=a+bcos⁡θ+csin⁡θE(\theta) = a + b\cos\theta + c\sin\theta with real a,b,ca, b, c, and for every θ\theta

dEdθ(θ)=E ⁣(θ+π2)−E ⁣(θ−π2)2.\frac{dE}{d\theta}(\theta) = \frac{E\!\left(\theta + \frac{\pi}{2}\right) - E\!\left(\theta - \frac{\pi}{2}\right)}{2} .

The right-hand side is an exact identity, not a finite-difference approximation: the two shifted circuits are ordinary circuits of the same depth, so the gradient of a cost with pp such parameters costs 2p2p expectation-value estimates. For a parameter shared by several gates, apply the rule to each occurrence and add (chain rule). The rule appeared for Pauli rotations in Mitarai, Negoro, Kitagawa and Fujii and, for gates e−iθG′e^{-i\theta G'} whose generator has exactly two eigenvalues ±r\pm r, in the form E′(θ)=r [E(θ+s)−E(θ−s)]E'(\theta) = r\,[E(\theta + s) - E(\theta - s)] with s=π/(4r)s = \pi/(4r) (the case above is G′=G/2G' = G/2, r=1/2r = 1/2) in Schuld, Bergholm, Gogolin, Izaac and Killoran.

Holds when

  • The parameter θ\theta enters the circuit only through one gate e−iθG/2e^{-i\theta G/2} with GG Hermitian and G2=IG^2 = I (for example a Pauli string); all other gates, the input state and the observable are independent of θ\theta.
  • Exact expectation values; with finitely many measurement shots each term is estimated with statistical error.

Proof

Proof of the parameter-shift ruleMachine-checked

Since G2=IG^2 = I, the power series of the exponential splits into even and odd parts: e−iθG/2=cos⁡(θ/2) I−isin⁡(θ/2) Ge^{-i\theta G/2} = \cos(\theta/2)\, I - i \sin(\theta/2)\, G. Hence

e−iθG/2ρ eiθG/2=cos⁡2 ⁣θ2 ρ+sin⁡2 ⁣θ2 GρG+isin⁡θ2cos⁡θ2 (ρG−Gρ).e^{-i\theta G/2} \rho\, e^{i\theta G/2} = \cos^2\!\tfrac{\theta}{2}\, \rho + \sin^2\!\tfrac{\theta}{2}\, G\rho G + i \sin\tfrac{\theta}{2}\cos\tfrac{\theta}{2}\, (\rho G - G\rho) .

Using cos⁡2(θ/2)=(1+cos⁡θ)/2\cos^2(\theta/2) = (1 + \cos\theta)/2, sin⁡2(θ/2)=(1−cos⁡θ)/2\sin^2(\theta/2) = (1 - \cos\theta)/2 and sin⁡(θ/2)cos⁡(θ/2)=sin⁡(θ)/2\sin(\theta/2)\cos(\theta/2) = \sin(\theta)/2, and writing O~=W†OW\tilde O = W\dagg O W,

E(θ)=12Tr⁡(O~(ρ+GρG))⏟a+12Tr⁡(O~(ρ−GρG))⏟bcos⁡θ+i2Tr⁡(O~(ρG−Gρ))⏟csin⁡θ.E(\theta) = \underbrace{\tfrac12 \tr\big(\tilde O(\rho + G\rho G)\big)}_{a} + \underbrace{\tfrac12 \tr\big(\tilde O(\rho - G\rho G)\big)}_{b} \cos\theta + \underbrace{\tfrac{i}{2} \tr\big(\tilde O(\rho G - G\rho)\big)}_{c} \sin\theta .

The coefficients aa and bb are real because O~\tilde O, ρ\rho and GρGG\rho G are Hermitian; cc is real because i(ρG−Gρ)i(\rho G - G\rho) is Hermitian. Now cos⁡(θ±π/2)=∓sin⁡θ\cos(\theta \pm \pi/2) = \mp \sin\theta and sin⁡(θ±π/2)=±cos⁡θ\sin(\theta \pm \pi/2) = \pm\cos\theta, so

E ⁣(θ+π2)−E ⁣(θ−π2)=−2bsin⁡θ+2ccos⁡θ=2 dEdθ(θ),E\!\left(\theta + \tfrac{\pi}{2}\right) - E\!\left(\theta - \tfrac{\pi}{2}\right) = -2b\sin\theta + 2c\cos\theta = 2\, \frac{dE}{d\theta}(\theta) ,

which is the claim. For a gate e−iθG′e^{-i\theta G'} whose generator has eigenvalues ±r\pm r, apply the result to G=G′/rG = G'/r, which squares to II, and the variable ϕ=2rθ\phi = 2r\theta (so that e−iθG′=e−iϕG/2e^{-i\theta G'} = e^{-i\phi G/2}); the chain rule gives the shift π/(4r)\pi/(4r) and prefactor rr stated by Schuld et al.. The Pauli case is that of Mitarai et al..

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Kosuke Mitarai, Makoto Negoro, Masahiro Kitagawa, Keisuke Fujii (2018). Quantum circuit learning. Physical Review A 98, 032309. doi:10.1103/PhysRevA.98.032309arXiv:1803.00745
  2. Maria Schuld, Ville Bergholm, Christian Gogolin, … Nathan Killoran (2019). Evaluating analytic gradients on quantum hardware. Physical Review A 99, 032331. doi:10.1103/PhysRevA.99.032331arXiv:1811.11184

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Trigonometric form and shift identity re-derived (derivative of a + b cos + c sin equals the half-difference at +-pi/2); general rule r[E(theta+s) - E(theta-s)], s = pi/(4r), compared with Schuld et al. arXiv:1811.11184 (PRA 99, 032331), Eqs. (8)-(14); Mitarai et al. (PRA 98, 032309) attribution consistent with Schuld et al.'s 'generalizes previous results for qubit-based platforms'. Reference metadata compared with Crossref.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e

Current revision b4724b8318d78975. Source file knowledge/records/theorem/parameter-shift-rule.md in the content repository (readable there once it is public).