From 73ddf5fe2be7bff4a082ef88b837b1f1fc49f75e Mon Sep 17 00:00:00 2001 From: Charles MOUSSA Date: Wed, 14 Aug 2024 10:05:06 +0200 Subject: [PATCH] adding small note gpsr hamevo --- docs/differentiation.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/differentiation.md b/docs/differentiation.md index 8437e103..e17d371e 100644 --- a/docs/differentiation.md +++ b/docs/differentiation.md @@ -44,6 +44,12 @@ F_{S} & =4\overset{S}{\underset{s=1}{\sum}}{\rm sin}\left(\frac{\delta_{M}\Delta Here $F_s=f(x+\delta_s)-f(x-\delta_s)$ denotes the difference between values of functions evaluated at shifted arguments $x\pm\delta_s$. +!!! caution "Using GPSR with HamiltonianEvolution" + GPSR works with the formalism above-presented, which corresponds to many parametric operations such as rotation gates. + For HamiltonianEvolution, since the factor 1/2 is missing, to allow GPSR differentiation, we multiply by 2 the + spectral gaps. Also we use a shift prefactor of 0.5 for multi-gap GPSR or 0.5 divided by the spectral gap for single-gap GPSR. + + ### Example ```python exec="on" source="material-block" html="1" import pyqtorch as pyq