Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Thimble Methods and Contour Deformation

    Moving an integration contour into complex field space can reduce oscillations without changing the integral. But three pieces must survive the move: the allowed ends of the contour, the complex Jacobian, and every contributing sector. We will check all three in a coupled two-variable integral. Dropping one sector or replacing a Jacobian by its magnitude gives a definite wrong answer.

    Preparation: Complex integration and Gaussian integrals. Complex Saddles and Integration Cycles develops the oriented cubic cycles reused below. The construction here adds a coupled second variable, a nonconstant Jacobian and independent two-dimensional integration. All variables are dimensionless.

    Deform the complete measure

    Consider an NN-variable integral with a specified real NN-dimensional cycle C0\mathcal C_0 in complexified field space:

    Z=∫C0dNz e−S(z)/h,h>0.Z=\int_{\mathcal C_0}d^Nz\,e^{-S(z)/h},\qquad h>0.

    The positive parameter hh controls the weight; it is not a physical Planck constant here. Suppose a deformation gives a parameterization z=F(x)z=F(x), with real coordinates xx and Jacobian Jij=∂Fi/∂xjJ_{ij}=\partial F_i/\partial x_j. Pulling back the holomorphic volume form gives

    Z=∫dNx det⁡J(x) e−S(F(x))/h.Z=\int d^Nx\,\det J(x)\,e^{-S(F(x))/h}.

    The determinant is complex. It records both the stretching and orientation of the tangent volume. A valid deformation preserves the homology class appropriate to the integrand: no singularity may be crossed without accounting for it, and boundary contributions at infinity must vanish in allowed decay regions. A locally smooth map alone does not establish these global conditions.

    If one samples the positive weight

    w(x)=∣det⁡J(x)∣e−Re⁡S(F(x))/h,R(x)=det⁡J(x)∣det⁡J(x)∣e−iIm⁡S(F(x))/h,w(x)=|\det J(x)|e^{-\operatorname{Re}S(F(x))/h}, \qquad R(x)=\frac{\det J(x)}{|\det J(x)|} e^{-i\operatorname{Im}S(F(x))/h},

    the observable is reconstructed as

    ⟨O⟩=⟨O(F(x))R(x)⟩w⟨R(x)⟩w.\langle O\rangle=\frac{\langle O(F(x))R(x)\rangle_w}{\langle R(x)\rangle_w}.

    This identity requires a nonzero denominator and correctly sampled support. A smaller action phase may help, but the Jacobian phase and cancellation between regions still matter. The computation below uses deterministic quadrature, so it can expose these effects without sampling noise.

    What gradient flow preserves

    For a holomorphic action, the outward gradient flow in a flat metric is

    dzidt=∂iS(z)‾.\frac{dz_i}{dt}=\overline{\partial_iS(z)}.

    It obeys

    dSdt=∑i∣∂iS∣2,dIm⁡Sdt=0,dRe⁡Sdt≥0.\frac{dS}{dt}=\sum_i|\partial_iS|^2, \qquad \frac{d\operatorname{Im}S}{dt}=0, \qquad \frac{d\operatorname{Re}S}{dt}\ge0.

    Thus e−S/he^{-S/h} decays as one flows outward from a nondegenerate saddle along its decay directions. The corresponding real NN-dimensional stable integration cycle is a Lefschetz thimble. The sign of flow reverses when one describes trajectories running inward toward the saddle. The local saddle directions are only the beginning: their endpoints and intersections with dual cycles determine whether they occur in the original integral. Witten, §3.2, especially Eq. (3.32) (PDF), develops the higher-dimensional cycle construction.

    A finite-time flow of the entire original contour generally gives a manifold that is not itself a thimble. Wherever this flow exists smoothly, its tangent matrix satisfies

    J˙ij=Hik(z)Jkj‾,Hik=∂i∂kS.\dot J_{ij}=\overline{H_{ik}(z)J_{kj}}, \qquad H_{ik}=\partial_i\partial_kS.

    The conjugation acts on both HH and JJ: differentiation is with respect to real initial coordinates. Replacing this equation by J˙=HJ\dot J=HJ transports a different tangent matrix. The companion checks the stated equation against finite differences at six bounded local flows.

    On an exact thimble, Im⁡S\operatorname{Im}S is constant but arg⁡det⁡J\arg\det J need not be. Moreover, an original cycle can contain several thimbles:

    [C0]=∑σnσ[Jσ],Z=∑σnσZσ,nσ∈Z.[\mathcal C_0]=\sum_\sigma n_\sigma[\mathcal J_\sigma], \qquad Z=\sum_\sigma n_\sigma Z_\sigma, \qquad n_\sigma\in\mathbb Z.

    The oriented integers come from the original cycle and its dual intersections. Different sectors may carry different action phases. A single-thimble approximation discards terms in this sum; constant phase within the retained sector does not justify that omission. Aarts, §10.4, Eqs. (10.6)–(10.7) (PDF) distinguishes the residual measure phase from the relative phases of several sectors.

    A coupled integral whose normalization is known

    Define

    Z2=12πi2πh∫Cdz∫Rdw e−S(z,w)/h,S(z,w)=az−z33+w22+iλzw.\begin{aligned} Z_2&=\frac1{2\pi i\sqrt{2\pi h}} \int_{\mathcal C}dz\int_{\mathbb R}dw\,e^{-S(z,w)/h},\\ S(z,w)&=az-\frac{z^3}{3}+\frac{w^2}{2}+i\lambda zw. \end{aligned}

    Here λ\lambda is real. The oriented zz contour C\mathcal C comes inward from infinity on the ray arg⁡z=−π/3\arg z=-\pi/3, passes through zero and goes outward on arg⁡z=+π/3\arg z=+\pi/3. The ww contour is the real line. These are the defining contours, not an integral over two real axes.

    The cubic term gives decay e−r3/(3h)e^{-r^3/(3h)} on both rays. The absolute real-ww Gaussian integration can produce growth quadratic in r=∣z∣r=|z|, which is dominated by this cubic decay. The original double integral is therefore absolutely convergent, and completing the square is legitimate with the associated contour shifts.

    Introduce

    η=w+iλz,z=u+c,c=λ22.\eta=w+i\lambda z,\qquad z=u+c,\qquad c=\frac{\lambda^2}{2}.

    The action becomes

    S=aeu−u33+η22+C0,ae=a+λ44,C0=aλ22+λ612.\begin{aligned} S&=a_eu-\frac{u^3}{3}+\frac{\eta^2}{2}+C_0,\\ a_e&=a+\frac{\lambda^4}{4},\qquad C_0=\frac{a\lambda^2}{2}+\frac{\lambda^6}{12}. \end{aligned}

    The linear triangular transformation has unit complex determinant. Translating the Gaussian line and the cubic contour preserves their allowed ends; the entire integrand has no finite singularity. The normalized Gaussian integral is one. The remaining cubic contour has the standard Airy normalization, giving

    Z2=e−C0/hh1/3Ai⁡ ⁣(aeh2/3).Z_2=e^{-C_0/h}h^{1/3}\operatorname{Ai}\!\left(\frac{a_e}{h^{2/3}}\right).

    The factor e−C0/he^{-C_0/h} is essential. This relation supplies an oracle, while direct two-dimensional quadrature on the original contours provides an independent numerical route.

    Choose

    h=0.7,λ=0.6,a=−1.0324+0.4i.h=0.7,\qquad \lambda=0.6,\qquad a=-1.0324+0.4i.

    Then ae=−1+0.4ia_e=-1+0.4i, c=0.18c=0.18 and C0=−0.181944+0.072iC_0=-0.181944+0.072i. The result is

    Z2=0.701066487656+0.00739474476548i.Z_2=0.701066487656+0.00739474476548i.

    The two critical points follow either from the transformed action or from its original gradient:

    z±=c±ae,w±=−iλz±.z_\pm=c\pm\sqrt{a_e},\qquad w_\pm=-i\lambda z_\pm.

    We use the principal square root. Both saddles are nondegenerate for this nonzero aea_e.

    Transport two oriented sectors

    The earlier intersection coefficients of the one-variable cubic supplies two oriented cycles J+\mathcal J_+ and J−\mathcal J_- for ae=−1+0.4ia_e=-1+0.4i. Their decay-sector endpoints are W→UW\to U and W→DW\to D, respectively, where U,D,WU,D,W denote the rays at π/3,−π/3,π\pi/3,-\pi/3,\pi. Consequently

    (eU−eW)−(eD−eW)=eU−eD,[C]=[J+]−[J−].(e_U-e_W)-(e_D-e_W)=e_U-e_D, \qquad [\mathcal C]=[\mathcal J_+]-[\mathcal J_-].

    This endpoint argument is valid for this entire cubic integrand; it is not a general substitute for an intersection calculation in the presence of punctures or extra cycles. Taking each cubic cycle times the real Gaussian line, and transporting it through the invertible transformation above, gives two genuine two-dimensional sectors of the coupled integral with coefficients (1,−1)(1,-1).

    These are transported product cycles. At zero further deformation they are thimbles for the transported metric, but they are not asserted to be the gradient thimbles of the flat metric in the original (z,w)(z,w) coordinates. Their admissible homology and integrals suffice for the check.

    The companion imports the existing pure cubic flow kernel and recomputes its oriented integrals. Including the Gaussian normalization and constant factor gives

    Z2,+=0.538571005901+0.0207752459679i,Z2,−=−0.162495481755+0.0133805012024i,Z2,+−Z2,−=0.701066487656+0.00739474476547i.\begin{aligned} Z_{2,+}&=0.538571005901+0.0207752459679i,\\ Z_{2,-}&=-0.162495481755+0.0133805012024i,\\ Z_{2,+}-Z_{2,-}&=0.701066487656+0.00739474476547i. \end{aligned}

    Keeping only the plus sector misses a contribution of magnitude 0.163045450.16304545. This error persists when that sector is integrated accurately. The full oriented sum agrees with the original integral.

    The flow integrations retain the complex tangent dudu, reverse the orientation of the incoming branch, and include a short connector between seeds near the saddle. Changing flow tolerance, endpoint radius and seed distance reduces the full-sum error from 9.6×10−119.6\times10^{-11} to 1.2×10−131.2\times10^{-13}. Separate one-parameter controls are also retained. The old chapter is not modified by this reuse.

    A deformation with a varying Jacobian phase

    To test more than a linear change of coordinates, deform the Gaussian direction in each sector:

    ηϵ(v)=v+iϵve−v2,v∈R,ϵ=0, 0.2, 0.4.\eta_\epsilon(v)=v+i\epsilon v e^{-v^2},\qquad v\in\mathbb R, \qquad \epsilon=0,\ 0.2,\ 0.4.

    Its real part is vv, so the curve is injective. Its imaginary displacement vanishes at both ends, preserving Gaussian decay throughout the homotopy. The tangent is

    ηϵ′(v)=1+iϵ(1−2v2)e−v2,\eta'_\epsilon(v)=1+i\epsilon(1-2v^2)e^{-v^2},

    whose real part is one on the integration line. If ss parameterizes a cubic cycle, the coupled contour is z=u(s)+cz=u(s)+c, w=ηϵ(v)−iλzw=\eta_\epsilon(v)-i\lambda z, and

    J=(u′(s)0−iλu′(s)ηϵ′(v)),det⁡J=u′(s)ηϵ′(v).J=\begin{pmatrix}u'(s)&0\\-i\lambda u'(s)&\eta'_\epsilon(v)\end{pmatrix}, \qquad \det J=u'(s)\eta'_\epsilon(v).

    The Gaussian factor in the pulled-back measure is

    Gϵ=12πh∫−∞∞dv ηϵ′(v)e−ηϵ(v)2/(2h)=1.G_\epsilon=\frac1{\sqrt{2\pi h}} \int_{-\infty}^{\infty}dv\,\eta'_\epsilon(v) e^{-\eta_\epsilon(v)^2/(2h)}=1.

    For ϵ>0\epsilon>0, these explicitly deformed sectors are not steepest-descent cycles: the Gaussian action phase varies as well as the measure phase. They are nevertheless valid contours for the same integral. Exact contour invariance does not require constant phase.

    At ϵ=0.4\epsilon=0.4, three numerical choices give

    Gϵ with ηϵ′=1to quadrature precision,Gϵ with 1=1.0022521280−0.1086471902i,Gϵ with ∣ηϵ′∣=1.0291313956−0.1099141578i.\begin{aligned} G_\epsilon\text{ with }\eta'_\epsilon&=1\quad\text{to quadrature precision},\\ G_\epsilon\text{ with }1&=1.0022521280-0.1086471902i,\\ G_\epsilon\text{ with }|\eta'_\epsilon|&=1.0291313956-0.1099141578i. \end{aligned}

    Thus omitting the Jacobian, or keeping its magnitude while dropping its phase, changes the result. In these tests the cubic tangent and both sectors are still retained, so the discrepancy isolates the new Gaussian-direction measure error. The correct complete sum remains Z2Z_2; omitting only this Jacobian instead gives approximately 0.703449−0.068758i0.703449-0.068758i.

    The complex z plane shows two transported cubic sectors and the original rays. A second panel compares the exact full integral, the incomplete one-sector value and the result obtained by dropping the Gaussian-direction Jacobian.

    Left: the zz projection of the transported sectors at h=0.7h=0.7, λ=0.6\lambda=0.6 and a=−1.0324+0.4ia=-1.0324+0.4i; arrows show their integration orientation. The Gaussian direction is not shown. Right: complex integral values distinguish the correct oriented sum, omission of the minus sector and omission of η0.4′\eta'_{0.4} while both sectors are retained. These are quadrature results, not Monte Carlo samples or a computation of flat-metric two-dimensional thimbles.

    Independent controls and what they establish

    Direct tensor Gauss–Legendre integration uses the original lower/upper rays and real ww, before completing the square. Radial/real orders 64/9664/96 with cutoffs 5/105/10, and 96/16096/160 with cutoffs 6/126/12, reproduce Z2Z_2 within 5×10−155\times10^{-15}. Separate order and cutoff changes are recorded; the last few digits fluctuate at floating-point precision rather than forming a rigorous error enclosure.

    The same direct calculation checks mixed moments. Since η\eta is a centered Gaussian after transformation,

    ⟨(w+iλz)2⟩=h,⟨w⟩=−iλ⟨z⟩,⟨z⟩=c−h1/3Ai⁡′(ae/h2/3)Ai⁡(ae/h2/3).\begin{aligned} \langle(w+i\lambda z)^2\rangle&=h,\\ \langle w\rangle&=-i\lambda\langle z\rangle,\\ \langle z\rangle&=c-h^{1/3} \frac{\operatorname{Ai}'(a_e/h^{2/3})}{\operatorname{Ai}(a_e/h^{2/3})}. \end{aligned}

    For this example, ⟨z⟩=0.09063434+0.53513204i\langle z\rangle=0.09063434+0.53513204i and ⟨w⟩=0.32107922−0.05438060i\langle w\rangle=0.32107922-0.05438060i. The partition function and five retained moments agree within 5×10−155\times10^{-15} in the refined direct quadrature. These expectations are complex-weighted moments, not positive-measure means of real fields.

    The Gaussian-direction adaptive quadrature is checked against a separate Gauss–Legendre sequence. At ϵ=0.4\epsilon=0.4, the factor error falls from 4.7×10−54.7\times10^{-5} at order 64 to 2.7×10−112.7\times10^{-11} at order 128, then about 10−1410^{-14} at orders 192 and 256. The coarse values are retained: contour invariance is not permission to use unresolved quadrature. Direct finite differences of the full two-variable map verify its Jacobian with second-order convergence. A separate bounded flow test checks J˙=HJ‾\dot J=\overline{HJ} and constant imaginary action; it does not integrate an entire globally flowed manifold.

    For a field theory, finding all relevant sectors and sampling them can be much harder than computing a local flow. Dense tangent transport stores an N×NN\times N matrix; dense Hessian multiplication and determinant evaluation can require cubic work in NN, with different costs for sparse structure or specialized algorithms. Long flow can improve local phases while separating modes and making transitions between them harder. Alexandru et al., §II, Eqs. (2.5)–(2.9), and §III, Eq. (3.11) (PDF) discuss tangent transport and residual-phase reconstruction. These costs and global coverage questions are not settled by the two-variable calculation.

    Summary

    A complex deformation preserves an integral when its full measure and admissible cycle are retained. The coupled example requires two oriented sectors, and its nonlinear Gaussian-direction deformation requires a complex Jacobian. Both omissions produce errors that remain after quadrature refinement. Gradient flow provides useful manifolds and local phase control, while residual phases, singularities, boundaries and sector coverage remain separate requirements.

    The reproducible source and selected results are coupled_contours.py and contour-results.json under examples/lattice-hamiltonian/sign-problem/. The pure cubic kernel is imported from the earlier semiclassical example. No stochastic sampling, QCD saddle search or general proof of single-thimble dominance is implied.

    Exercises

    1. Check the coupling through a mixed moment

    Show that the transformed variables imply ⟨w2⟩=h−λ2⟨z2⟩\langle w^2\rangle=h-\lambda^2\langle z^2\rangle. Derive ⟨z2⟩\langle z^2\rangle from the cubic integral and evaluate the λ→0\lambda\to0 limit at fixed a,ha,h.

    Solution

    The transformed weight factorizes between uu and η\eta. Since w=η−iλzw=\eta-i\lambda z and ⟨η⟩=0\langle\eta\rangle=0, the cross term vanishes, while ⟨η2⟩=h\langle\eta^2\rangle=h. This gives the stated relation. The integral of a total derivative on the cubic cycle vanishes at its decay ends:

    0=∫Cdu ddue(u3/3−aeu)/h=1h∫Cdu (u2−ae)e(u3/3−aeu)/h.0=\int_{\mathcal C}du\,\frac{d}{du}e^{(u^3/3-a_eu)/h} =\frac1h\int_{\mathcal C}du\,(u^2-a_e)e^{(u^3/3-a_eu)/h}.

    Thus ⟨u2⟩=ae\langle u^2\rangle=a_e. Differentiating the normalized cubic integral with respect to aea_e gives ⟨u⟩=−h1/3Ai⁡′/Ai⁡\langle u\rangle=-h^{1/3}\operatorname{Ai}'/\operatorname{Ai}, provided its partition function is nonzero. Therefore

    ⟨z2⟩=c2+2c⟨u⟩+ae.\langle z^2\rangle=c^2+2c\langle u\rangle+a_e.

    At the stated parameters this is −0.9997716370+0.5926475346i-0.9997716370+0.5926475346i, giving ⟨w2⟩=1.0599177893−0.2133531125i\langle w^2\rangle=1.0599177893-0.2133531125i. These complex moments are consistent with the original coupled weight. As λ→0\lambda\to0, c,C0→0c,C_0\to0, ae→aa_e\to a, the two variables decouple, and ⟨w2⟩→h\langle w^2\rangle\to h, ⟨z2⟩→a\langle z^2\rangle\to a. The appropriate cubic sector combination is still fixed by the original contour; decoupling the Gaussian does not select one cubic sector.

    2. Detect a missing Jacobian before numerical integration

    Differentiate GϵG_\epsilon with respect to ϵ\epsilon and prove that it is independent of the deformation. Then compute the linear error when ηϵ′\eta'_\epsilon is omitted.

    Solution

    The derivative of the complete integrand is a total derivative:

    ∂ϵ ⁣[ηϵ′e−ηϵ2/(2h)]=∂v ⁣[(∂ϵηϵ)e−ηϵ2/(2h)].\partial_\epsilon\!\left[\eta'_\epsilon e^{-\eta_\epsilon^2/(2h)}\right] =\partial_v\!\left[(\partial_\epsilon\eta_\epsilon) e^{-\eta_\epsilon^2/(2h)}\right].

    Here ∂ϵηϵ=ive−v2\partial_\epsilon\eta_\epsilon=iv e^{-v^2} vanishes at both ends fast enough to remove the boundary term. Hence ∂ϵGϵ=0\partial_\epsilon G_\epsilon=0, and G0=1G_0=1 fixes every GϵG_\epsilon along the admissible homotopy.

    Without the Jacobian, expansion of the exponent gives

    Gϵ,omit=1−iϵh⟨v2e−v2⟩v∼N(0,h)+O(ϵ2)=1−iϵ(1+2h)3/2+O(ϵ2).G_{\epsilon,\mathrm{omit}}=1-\frac{i\epsilon}{h} \langle v^2e^{-v^2}\rangle_{v\sim N(0,h)}+O(\epsilon^2) =1-\frac{i\epsilon}{(1+2h)^{3/2}}+O(\epsilon^2).

    The Gaussian moment follows by differentiating ⟨e−tv2⟩=(1+2ht)−1/2\langle e^{-t v^2}\rangle=(1+2ht)^{-1/2} at t=1t=1. The missing Jacobian would contribute exactly the opposite linear term. At h=0.7h=0.7, the predicted imaginary slope is about −0.26896-0.26896, consistent with the finite-deformation values above. No increase in quadrature accuracy can remove this measure error.

    References

    • Aarts, Gert. “Introductory lectures on lattice QCD at nonzero baryon number,” Journal of Physics: Conference Series 706, 022004 (2016), arXiv:1512.05145v1 (PDF), §10.4, Eqs. (10.6)–(10.7): residual and inter-sector phases.
    • Alexandru, Andrei, Gökçe Başar, Paulo F. Bedaque, Gregory W. Ridgway and Neill C. Warrington. “Fast Estimator of jacobians in Monte Carlo Integration on Lefschetz Thimbles,” Physical Review D 93, 094514 (2016), arXiv:1604.00956v1 (PDF), §II, Eqs. (2.5)–(2.9), and §III, Eq. (3.11): tangent matrices, computational cost and phase reconstruction.
    • Witten, Edward. “Analytic Continuation Of Chern-Simons Theory” (2010), arXiv:1001.2933v4 (PDF), §§3.1–3.2: oriented cycles and the several-variable flow. His exponent I\mathcal I corresponds to −S/h-S/h here. The coupled integral and explicit Gaussian-direction homotopy above are derived for this teaching example.

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.