{'fraction_non_alphanumeric': 0.05522644292380975, 'fraction_numerical': 0.01600696375462437, 'mean_word_length': 3.8713780918727916, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Worldvolume approach to the tempered Lefschetz thimble method

As a solution towards the numerical sign problem, we propose a novel Hybrid Monte Carlo algorithm, in which molecular dynamics is performed on a continuum set of integration surfaces foliated by the antiholomorphic gradient flow ("the worldvolume of an integration surface"). This is an extension of the tempered Lefschetz thimble method (TLTM), and solves the sign and multimodal problems simultaneously as the original TLTM does. Furthermore, in this new algorithm, one no longer needs to compute the Jacobian of the gradient flow in generating a configuration, and only needs to evaluate its phase upon measurement. To demonstrate that this algorithm works correctly, we apply the algorithm to a chiral random matrix model, for which the complex Langevin method is known not to work.


Introduction
The sign problem is one of the major obstacles to numerical computation in various areas of physics, including finite density QCD [1], quantum Monte Carlo simulations of statistical systems [2], and the numerical simulations of real-time quantum field theories.
There have been proposed many Monte Carlo algorithms towards solving the sign problem, such as those based on the complex Langevin equation [3,4,5,6,7,8,9] and those on Lefschetz thimbles [10,11,12,13,14,15,16,17,18,19,20], each of which has its own advantage and disadvantage. The advantage to use the Complex Langevin equation is its cheap computational cost, but such algorithms are known to suffer from a notorious problem called the "wrong convergence problem" (giving incorrect results with small statistical errors) for physically important ranges of parameters [6,7,9]. On the other hand, although computationally expensive, the algorithms based on Lefschetz thimbles are basically free from the wrong convergence. However, this is the case when and only when a single Lefschetz thimble is relevant for the estimation of observables, because otherwise there can appear another problem of multimodality due to infinitely high potential barriers between different thimbles.
The tempered Lefschetz thimble method (TLTM) [16] is a Lefschetz thimble method that avoids the sign and multimodal problems simultaneously, by introducing a discrete set of integration surfaces (replicas of integration surface) and exchanging configurations between replicas. The TLTM has proved effective and versatile when applied to various models, including (0 + 1)-dimensional massive Thirring model [16], the two-dimensional Hubbard model away from half filling. The disadvantage of the original TLTM is its computational cost, the cost coming from the computation of the Jacobian and from the additional cost due to the introduction of replicas.
In this paper, as an extension of the TLTM, we propose a novel Hybrid Monte Carlo (HMC) algorithm, where molecular dynamics is performed on a continuum set of replicas, not on each replica as was done in [20] (see also [13,21]). This algorithm no longer requires the computation of the Jacobian in generating a configuration, which is expensive for large systems. To overview this new algorithm, we first review the basics of the sign problem, and then introduce our algorithm.
Let us consider a system of an N-dimensional dynamical variable x ∈ R N with an action S(x). Our aim is to evaluate the expectation value of an operator O(x), where dx ≡ dx 1 · · · dx N . When the action takes complex values, the Boltzmann weight e −S(x) /Z can no longer be interpreted as a probability distribution, which invalidates a direct application of the Markov chain Monte Carlo (MCMC) method. The simplest workaround is the so-called reweighting method, where a positive weight is constructed from the real part of the action, e −Re S(x) / R N dx e −Re S(x) , and O(x) is estimated by a ratio of reweighted averages, For large degrees of freedom (DOF), however, the phase factor e −i Im S(x) in reweighted averages makes the integrals highly oscillatory, so that (1.2) becomes a ratio of exponentially small quantities of e −O(N ) even when the ratio should give a quantity of O(1). Since the reweighting is a mathematically equivalent rewriting, it should not give any problems if one can obtain the values of the reweighted averages precisely both in the numerator and the denominator. However, in the Monte Carlo calculations, they are evaluated separately as sample averages, which should be accompanied by statistical errors of O(1/ √ N conf ), where N conf is the size of the sample. Thus, for the naive reweighting method, the expectation value is estimated in the form which means that we need an exponentially large sample size, N conf = e O(N ) , in order to make the statistical errors relatively small compared to the exponentially small mean values. This enormous computational time makes the MCMC computations impractical. This is the sign problem.
Lefschetz thimble methods are a class of algorithms towards solving the sign problem. In these methods, we complexify the integration variables, x ∈ R N → z ∈ C N , with the assumption that e −S(z) and e −S(z) O(z) are entire functions over C N . Then, from Cauchy's theorem, the integrals do not change under continuous deformations of the integration surface from R N to Σ ⊂ C N , as long as the boundary at infinity (|x| → ∞) is kept fixed under the deformations: where dz ≡ dz 1 · · · dz N . We expect that the sign problem is reduced if we can find an integration surface Σ on which e −i Im S(z) is almost constant.
Such surfaces are obtained from the following antiholomorphic gradient flow z t (x) at large flow times: In fact, this flow defines a map from the original integration surface Σ 0 ≡ R N to a real N-dimensional submanifold Σ t ≡ {z t (x) | x ∈ R N } in C N = R 2N : and the flowed surface Σ t approaches in the limit t → ∞ a union of Lefschetz thimbles, on each of which Im S(z) is constant. 1 We thus expect that the sign problem is substantially remedied on Σ t for sufficiently large t. The expectation value is then expressed in the form 2 (1.9) Here, |dz t | is the invariant volume element of Σ t , and can be expressed with the Jacobian of the flow, J t (x) ≡ ∂z t (x)/∂x, as The phase factor e iϕ(z) in (1.8) is then given by The Jacobian J t (x) can be computed by solving the second flow equation: 3 where H(z) ≡ (∂ i ∂ j S(z)).
When Σ t approaches more than one Lefschetz thimble, Σ t gets decomposed into separate regions as t increases, each region being surrounded by infinitely high potential barriers. This causes a multimodal problem in MCMC calculations. 4 The tempered Lefschetz thimble method (TLTM) was proposed in [16] to solve this multimodality by implementing the is constant along the flow, and Re S(z t ) increases except at critical points z σ [at which ∂ i S(z σ ) = 0]. For each critical point z σ , the Lefschetz thimble J σ is defined as  4 In the following discussions, we assume that there is no multimodal problem on the original integration surface Σ t=0 = R N . If this is not the case, we implement an extra algorithm to resolve the multimodality (such as the tempering with respect to the overall coefficient of the action) or make a shift of the starting integration surface from R N . parallel tempering algorithm [22,23,24] with the flow time t used as the tempering parameter. Namely, we prepare a finite set of flow times, {t α }, and introduce copies (replicas) of the corresponding configuration spaces, {Σ tα }. 5 The set {t α } is chosen so as to include large enough flow times to resolve the sign problem, as well as small enough flow times to resolve the multimodality. 6 Then, in addition to Monte Carlo updates on each Σ t , we swap configurations between adjacent replicas, which enables easy communications between configurations around different modes, and thus accelerates the relaxation to global equilibrium. Thus, the TLTM is an algorithm that solves the sign and multimodal problems simultaneously, and has proved effective for various models [16,19,20], as mentioned before. However, in this original TLTM, we need to increase the number of replicas as we increase DOF in order to keep sufficient acceptance rates in the swapping process. Furthermore, we have to compute the Jacobian J t (x) every time in the swapping process, which is expensive because the second flow equation (1.12) involves a matrix multiplication, whose cost is of O(N 3 ).
In this paper, we propose a novel Hybrid Monte Carlo (HMC) algorithm, where molecular dynamics is performed on a continuum set of integration surfaces, t Σ t . This algorithm solves the multimodal problem without preparing replicas. Furthermore, the Jacobian of the gradient flow no longer needs to be computed in generating a configuration, and only its phase needs to be evaluated upon measurement.
This algorithm is based on the observation that, since integrals on Σ t do not depend on t due to Cauchy's theorem, the values do not change even when we average them over t in a range [T 0 , T 1 ] with an arbitrary weight e −W (t) : . (1.13) We denote the new integration region by R (see Fig. 1): which we regard as the worldvolume of an integration surface moving in the "target space" C N = R 2N . We abbreviate the TLTM based on (1.13) as the WV-TLTM. Although the weight function e −W (t) can be chosen arbitrarily, a practically good choice is the one which gives an almost uniform distribution with respect to t (see subsection 3.4 for details). 5 Note that Σ t is not necessarily homeomorphic to Σ 0 = R N because we remove zeros of e −S(z) from Σ t (see [20]). 6 See [25,26] for a geometrical optimization of the values t α based on the distance between configurations introduced in [27].
The expectation value is now expressed as a ratio of reweighted averages over R: Here, the reweighted average is defined with respect to the (real-valued) invariant volume element Dz on the (N + 1)dimensional region R and to the new weight 7 e −V (z) ≡ e −Re S(z)−W (t(z)) . (1.17) The accompanying reweighting factor A(z) is then given by (1.18) The aim of this paper is to establish a HMC algorithm for the reweighted average (1.16) on the worldvolume R. To demonstrate that this algorithm works correctly, we apply the algorithm to a chiral random matrix model (the Stephanov model) [28,29], for which the complex Langevin method is known not to work [30].
This paper is organized as follows. In section 2, we review the basics of the HMC algorithm on a general constrained space R. In section 3, we deepen the argument for the case where the constrained surface R is the worldvolume of an integration surface. We first study the geometry of the worldvolume R by using the Arnowitt-Deser-Misner parametrization of the metric. We then construct molecular dynamics on R, with a prescription to determine the weight e −W (t) . After summarizing the HMC algorithm on the worldvolume R, we give an algorithm to estimate observables. In section 4, we apply this algorithm to the Stephanov model, and show that our algorithm correctly reproduces exact results, solving both sign and multimodal problems. Section 5 is devoted to conclusion and outlook.

HMC algorithm on a constrained space (review)
In this section, we briefly review the basics of the RATTLE algorithm [31,32], which is a HMC algorithm on a constrained space such as our worldvolume R. A detailed discussion is given in appendix A with more geometrical terms.

Stochastic process on a constrained space
Let R be an m-dimensional manifold embedded in the flat space R M = {z = (z I )} (I = 1, . . . , M). We assume that R is characterized by M − m independent constraint equations φ r (z) = 0 (r = 1, . . . , M − m). When R is the worldvolume of an integration surface, we set M = 2N and m = N + 1, treating C N as a real space R 2N .
Denoting the coordinates on R by ξ = (ξ µ ) (µ = 1, . . . , m), the embedding is expressed by functions z I = z I (ξ), and the induced metric on R is given by which defines the invariant volume element as where dξ = dξ 1 · · · ξ m .
The probability distribution p(z) on R is defined with respect to Dz, and thus is normalized as R Dz p(z) = 1. The transition matrix is also defined for Dz, so that a transition from a probability distribution p(z) to p ′ (z) (z ∈ R) is expressed with a transition matrix P (z ′ |z) as For the equilibrium distribution on R with respect to a potential V (z), the detailed balance condition is given by Throughout this paper, we denote a function on R by f (z) and f (ξ), interchangeably, with the understanding that z = z(ξ). The transition matrix on R is also written as P (z ′ |z) and P (ξ ′ |ξ) for z = z(ξ), z ′ = z(ξ ′ ) ∈ R.

HMC on a constrained space
Denoting by π = (π I ) the conjugate momentum to z = (z I ) ∈ R, we consider the Hamiltonian dynamics on R with the Hamiltonian which can be expressed as a set of first-order differential equations in time s with Lagrange multipliers λ r : Equations (2.7)-(2.10) can be discretized such that the symplecticity and the reversibility still hold after the discretization (below ∆s is the step size) [31,32]:
The HMC algorithm on R then consists of the following three steps for a given initial configuration z ∈ R: Step 1. Generate a vectorπ = (π I ) ∈ T z R M from the Gaussian distribution and project it onto T z R to obtain an initial momentum π = (π I ) ∈ T z R.
Step 3. Update the configuration z to z ′ with a probability The above process defines a stochastic process on R. One can show that its transition matrix P (z ′ |z) satisfies the detailed balance condition (see appendix A):

HMC on the worldvolume
In this section, we apply the general formalism in the previous section to the case where R is the worldvolume of an integration surface. We first clarify the geometry of the worldvolume R and then construct the HMC algorithm on R.

Geometry of the worldvolume R
Recall that our worldvolume R is an N +1-dimensional submanifold embedded in C N = R 2N . As in the previous section, we again assume that R ⊂ R 2N is characterized by a set of independent constraint equations: φ r (z) = 0 (r = 1, · · · , N − 1). We will often write a point z = (z i ) ∈ C N (i = 1, . . . , N) with real coordinates as 10 x a ) specifies a point z(ξ) = (z I (ξ)) ≡ (z I t (x)) in R, we can use ξ as coordinates of R. The flow equation (1.6) then takes the form The vectors E µ = (E I µ = ∂z I /∂ξ µ ) form a basis of T z R (see Fig. 2), from which the induced metric g µν on R is given by Since our worldvolume R = t Σ t is foliated by the antiholomorphic gradient flow, its intrinsic geometry should be best described (at least for physicists) by the Arnowitt-Deser-Misner (ADM) parametrization, for which the metric is expressed in the form Here, γ ab is the induced metric on Σ t (with its inverse matrix γ ab ), β a is the shift vector, and α is the lapse function, The inverse matrix of (g µν ) can be easily calculated to be The geometrical meaning of the ADM parametrization is explained in Fig. 3. Figure 3: Geometrical meaning of the ADM parametrization. α dt is the geodesic distance from a point ξ = (t, x a ) on Σ t to the surface Σ t+dt . β a dt shows that the time axis t is tilted with respect to the normal of Σ t by this amount in x-coordinates. γ ab is the induced metric on Σ t . The geodesic distance ds between two points ξ = (t, x a ) and ξ +dξ = (t+dt, x a +dx a ) is then obtained from Pythagorean theorem as in (3.5).
Since the flowed surfaces Σ t are determined by the flow equation, we can write down the explicit form of the basis E µ = (E I µ = ∂z I /∂ξ µ ) of T z R as . Thus, the induced metric γ ab can be directly expressed in terms of the Jacobian as 12 The lapse function α can be expressed as the length of the normal component of E 0 : Here, the decomposition of E 0 to the tangential and normal components is given by where Π Σt is the projector onto T z Σ t : 13 Note that the following relation holds: Then, by using (3.9), (3.12), (3.15) and (3.16), we see that the projector from T z R 2N onto T z R is given by In the ADM parametrization, the volume element of R is given by (see Fig. 4) Since the complex measure on Σ t is given by dz t = det J dx, we find that the reweighting Figure 4: E ⊥ 0 and the volume element.
factor (1.18) takes the form Note that the inverse lapse, α −1 (z), plays the role of the radius of A(z).
In appendix B, in order to show the typical behaviors of various geometrical quantities near critical points at large flow times, we give explicit expressions of these quantities for the Gaussian case with the action There, we find that α −1 (z) increases exponentially in flow time t as z k = z k (t, x) approaches the Lefschetz thimble at Im z k = 1.

Molecular dynamics on the worldvolume
We first rewrite the Lagrange multiplier term λ r ∂φ r in (2.8) in a more convenient form. Note that λ r ∂φ r is normal to R, and thus it satisfies Since the vectors span the normal vector space N z Σ t at z ∈ Σ t , 14 the second equation in (3.21) means that λ r ∂φ r can be written as a linear combination of F a with new Lagrange multipliers λ a ∈ R (a = 1, . . . , N): 15 The first equation in (3.21) is then treated as a constraint on λ a F a : 16 From the above argument, we find that the RATTLE algorithm (2.11)-(2.15) can be . They can be written as F a = iE a as complex vectors. 15 We here put the summation symbols to stress the summation ranges for r and a. 16 It is possible to solve the constraint (3.24) as follows. We first take a subset {F r } (r = 1, . . . , N − 1) of {F a }, whose elements are not parallel to E 0 . Then, we construct a basis of N z R byF r ≡ F r − (F r · E 0 /(E 0 ) 2 )E 0 , and replace λ a F a in (3.24) by µ rF r with new Lagrange multipliers (µ r ) ∈ R N −1 .
written as where λ a and λ ′ a are determined, respectively, so that the following constraints are satisfied: The gradient of the potential, ∂V (z), now takes the form In order to define the gradient ∂t(z) at z ∈ R, we regard (φ r ) as coordinates in the extra dimensions and construct 2N coordinates (ξ µ , φ r ) in the vicinity of R in R 2N . Then, one can show (see appendix C) that the gradient ∂t(z) is given by Since the last term is a linear combination of the gradients ∂φ r (z) and thus can be absorbed into the Lagrange multiplier terms in (3.25) and (3.27), we can (and will) set ∂t(z) to the form

Solving the constraints in molecular dynamics
In this subsection, we present numerical algorithms to solve the constraints (3.28) and (3.29).
Solving (3.28) The condition z ′ ∈ R for a given z = z(ξ) ∈ R is equivalent to the existence of an for 2N + 1 unknowns w = (w P ) = (ε µ , λ a ) ∈ R 2N +1 (see Fig. 5), where Adopting Newton's method to find a solution, we iteratively update the vector w = (w P ) = (ε µ , λ a ) as w → w + ∆w, where ∆w is a solution of the linear equation The matrix elements ∂f P /∂w Q are easily found to be When the DOF (= N) is small, (3.37) can be solved by a direct method such as the LU decomposition of (3.38), for which we integrate the second flow equation (1.12) to know the value of J. When the DOF is large, the computation of J becomes expensive, and we can instead use an iterative method such as GMRES [33] or BiCGStab [34], for which we do not need to compute the matrix elements of J as in [18]. To see this, we first note that the right hand side of (3.37) can be written in terms of complex vectors as The left hand side of (3.37) can also be written as We thus see that in the above equations, J appears only in the form : The latter is obtained in a similar way, by replacing t → t + h and x a → x a + u a . We thus find that the both hand sides of (3.37) can be calculated without computing the matrix elements of J.

Solving (3.29)
We first note that solving the constraint (3.29) is equivalent to projecting the vector Here, E ⊥ 0 (z ′ ) can be computed as a complex vector to be The second term in (3.45) can also be computed as The expressions (3.46) and (3.47) can again be evaluated either by a direct method with the computation of J(z ′ ), or by an iterative method without computing J(z ′ ) as in [18]. When the iterative method is used, the inversion J −1 (z ′ ) c is obtained for a given complex vector c = (c i ) ∈ C N by looking for vectors a = (a a ), b = (b a ) ∈ R N iteratively such that where J(z ′ ) a and J(z ′ ) b are evaluated by integrating the flow equation (3.43) with the initial condition v t=0 = a and v t=0 = b, respectively. The multiplication J(z ′ ) v are again calculated by integrating (3.43). Therefore, the projection (3.45) can be performed without computing J(z ′ ).

Construction of W (t)
In this subsection, we present a prescription to construct a weight function e −W (t) in (1.13) [or in (1.17)] so that it gives an almost uniform distribution with respect to t. The key is that, for a given weight e −W (t) , the probability to find a configuration at t is proportional to Thus, when a weight e −W (t) does not give a uniform distribution of t, the desired weight can be obtained by (see e.g., [35]) because then Z(t; W (new) ) becomes constant in t: Of course, the above procedure is possible only when we know the values of Z(t; W ) explicitly, which is usually not the case. However, we can estimate Z(t; W ) from the histogram of flow times {t}. To be more specific, we first divide the interval [T 0 , T 1 ] into p + 1 bins, I ℓ ≡ [ℓh, (ℓ + 1)h] (ℓ = 0, . . . , p) with h ≡ (T 1 − T 0 )/(p + 1), and generate a certain number (≡ n tune ) of configurations by using V (z) = Re S(z) + W (t(z)) as the potential. The numbers h ℓ of configurations inside the bins I ℓ give a rough estimate of the functional form of Z(t; W ) up to a normalization factor (see Fig. 6). Then, from the histogram h ℓ (ℓ = 0, . . . , p), we calculate with a ℓ ≡ (ℓ + 1/2)h.
In general, the minimum-order polynomial that have values b ℓ at a ℓ = (ℓ + 1/2)h is given by the Lagrange interpolation of the form where, for an array Using this polynomial, we define 17 Since the estimate of Z(t; W ) from the histogram {h ℓ } includes statistical errors, we use an iterative algorithm to update {W ℓ } until an almost uniform distribution is obtained: • Generate n tune configurations with the potential V (z) = Re S(z) + W (k) (t(z)), and record the numbers h (k) ℓ of configurations in the intervals I ℓ . • Here, ǫ c is a cutoff to avoid the divergence arising when h (k) ℓ = 0.
• Terminate the iteration when the histogram becomes almost flat. We use the following stopping condition: (3.56) In the calculation below, we set p = 7, n tune = (p + 1) ×200 = 1, 600, ǫ c = 0.01, and δ 2 = 0.2. 17 In the calculation below, we put two additional terms in (3.53) to prevent the function from changing drastically near boundaries. The above L(t; {b ℓ }) is then replaced by

Summary of the HMC algorithm on the worldvolume
We summarize the HMC algorithm for a given initial configuration z ∈ R.
In the course of molecular dynamics (Step 2), it sometimes happens that the equation (z ′ , π ′ ) = Φ ∆s (z, π) does not have a solution because z + ∆z passes over the boundary of R (see Fig. 7). Here, the boundary in the t direction is given by T 0 , T 1 , while that in the x direction by zeros of e −S(z) . When a solution is not found near a boundary, we replace the operator Φ ∆s by the momentum reflection T : T (z, π) ≡ (z, π ′ ), (3.58) where for π which is expanded with E µ ≡ g µν E ν as π = η 0 E 0 +η a E a , the reflected momentum π ′ is defined by π ′ ≡ −η 0 E 0 + η a E a = π − 2η 0 E 0 , i.e., This preserves the reversibility and the phase-space volume element because the induced symplectic form is given by ω = dη µ ∧dξ µ = dη 0 ∧dξ 0 + dη a ∧dξ a (see appendix A). However, this can change the value of the Hamiltonian. The change comes only from the difference between the norms of momenta π and π ′ , and its effect is absorbed in the probability at the Metropolis test in Step 3 above, so that the detailed balance condition (2.20) still holds. If the change is larger than a prescribed value (e.g., if e −|∆H| = e −|π ′2 −π 2 |/2 < 0.8), we instead use the momentum flip Ψ [20]: Since the replacement of Φ ∆s by T or Ψ preserves the phase-space volume element and the reversibility, the detailed balance condition (2.20) still holds. 18

Estimation of observables
We first recall that the boundary flow times (T 0 and T 1 ) can be chosen arbitrarily due to Cauchy's theorem. In practice, T 0 must be set sufficiently small in order to keep in R a region that is free from multimodality (to be set to T 0 = 0 when the multimodal problem is absent there). On the other hand, T 1 must be taken sufficiently large in order to keep a region where the sign problem is resolved, but, at the same time, T 1 should not be set too large in order to avoid introducing an unnecessarily large computational time.
subsample, 19Ō T 0 now should be set sufficiently large in order to exclude a region that is contaminated by the sign problem. Note thatT 0 andT 1 should be set enough apart in order to maintain a sufficient size for the subsample. Then, if the original range [T 0 , T 1 ] is properly chosen as above, and if the system is well close to global equilibrium, there must be a region in twoparameter space (T 0 ,T 1 ) such that the estimationsŌ(T 0 ,T 1 ) are stable against the variation of the estimation ranges (i.e., estimates change only within statistical errors).
The whole process of the WV-TLTM thus proceeds as follows: 1. Choose a sufficiently small T 0 and a sufficiently large T 1 to tame both sign and multimodal problems.
2. Construct a weight function e −W (t) such that the distribution of t becomes almost uniform (see subsection 3.4 for more details).

Application to a chiral random matrix model
In this section, to confirm that the WV-TLTM works correctly, we apply the WV-TLTM to a chiral random matrix model, the Stephanov model [28,29]. We show that the algorithm correctly reproduces exact results, solving both sign and multimodal problems.

The model
The Stephanov model is a large N matrix model that approximates QCD at finite density. For N f quarks with equal mass m, the partition function is given by the following integral over n × n complex matrices X = (X ij = x ij + i y ij ): Here, D + m represents the Dirac operator in the chiral representation and takes the form The parameters µ and τ correspond to the chemical potential and the temperature, respectively [28,29]. The number of DOF is N = 2n 2 , which may be compared with the DOF of the SU(N c ) gauge field on the lattice of linear size L as N = 4(N 2 c − 1)L 4 . For the case N f = 1, the partition function at finite n can be written as an integral over a single variable: where I k (x) (k = 0, 1, 2, · · · ) are the modified Bessel functions of the first kind. Then, the chiral condensate is expressed as Similarly, the number density is expressed as We apply the WV-TLTM to this model, by complexifying the real and imaginary parts (x ij and y ij ) separately, and by considering the antiholomorphic gradient flow with respect to the action given in (4.1). We estimate the chiral condensate and the number density using the formulas ψ ψ = 1 2n tr (D + m) −1 , (4.7) It is convenient to introduce the matrices

Setup in the simulation
We summarize the setup in the simulation. We set n = 10, m = 0.004, τ = 0, and estimate the chiral condensate ψ ψ and the number density ψ † ψ as functions of µ = 0.4, . . . , 0.8. 21 We set T 0 = 0 while we choose T 1 depending on µ as in Table 1. Other simulation parameters are also given in Table 1. There, N init is the number of initial configurations, and N conf is the number of configurations in the simulation range [T 0 , T 1 ], while N conf (T 0 ,T 1 ) is that in the estimation range [T 0 ,T 1 ], corresponding to the point (T 0 ,T 1 ) chosen from a plateau. Note thatT 0 and T 1 depend on the choice of observables. We set the initial configuration to the final configuration in the test run determining W (t). The tuning of W (t) turns out to take two iterations to realize the condition (3.56). In Fig. 8  It sometimes happens that R = t Σ t is not well explored for large t because of the complicated geometrical structure there. To facilitate transitions, at every start of the HMC algorithm we change the step size ∆s and the step number n by randomly taking them from a set C = {(∆ c , n c } (c = 1, . . . , c max ). 22 In the calculation below, we set c max = 3 and choose C as in Table 2.  We comment that, if we use the original TLTM based on the parallel tempering, we need about 70 replicas for n = 10. We list in Table 3 the numbers of replicas at µ = 0.6 for various n. Here, we first determine the maximum flow time T so that the sign problem is   well resolved there, and then determine the number of replicas so that the acceptance rate of the swapping is in the range 0.2-0.5. Figure 9 shows the average reweighting factors from the naive reweighting method (blue) and from the WV-TLTM (orange), the former exhibiting the existence of the sign problem around µ = 0.6. Figure 10 gives the estimates of ψ ψ from the WV-TLTM at µ = 0.625 μ |〈 〉| Figure 9: Average phase factors A = e −i Im S(x) rewt from the naive reweighting method (blue) and the average reweighting factors A = A(z) R from the WV-TLTM (orange). The estimation range [T 0 ,T 1 ] in the WV-TLTM is set to that for the chiral condensate (see Table 1).

Results and analysis
with various estimation ranges [T 0 ,T 1 ]. We see a plateau with a value close to the exact one Figure 10: Estimates of ψ ψ at µ = 0.625 with variousT 0 andT 1 . The red filled circle is the point taken from a plateau to be used for the estimation of ψ ψ , and the horizontal dashed line is the estimate. 0.012. Figure 11 exhibits the estimated values thus obtained for the chiral condensate ψ ψ and the number density ψ † ψ . As a comparison, we also display in the same figure the results from the naive reweighting method and the complex Langevin method, both with the sample size N conf = 10, 000. We see that the WV-TLTM correctly reproduces exact values, while the complex Langevin method suffers from the wrong convergence even for a parameter region free from the sign problem.
One may find it strange that correct estimates are still obtained from the WV-TLTM even for such parameters that give small average reweighting factors A(z) R (see Fig.9). To understand this, let us see Figs. 12 and 13, which show the histogram of A(z) = α −1 (z) e −i Im S(z)+iϕ(z) , and those of its modulus and phase, in the estimation range [T 0 ,T 1 ] at µ = 0.625. We observe that the distribution of α −1 (z) has a peak around α −1 (z) = 0.12. The point is that this small value reduces not only the mean value of A, but also the statistical errors. This is in sharp contrast to the situation in the naive reweighting (see the right panel of Fig. 12). In fact, in the latter (the naive reweighting), the reweighting factor is actually a phase factor, and is distributed uniformly on a unit circle, giving a vanishingly small average phase factor. The statistical errors are then of O(1/ √ N con ), because the standard deviation of phase factors for uniformly distributed phases is of O(1). One thus needs a huge sample size of e O(N ) to make the statistical errors relatively small to the mean value. In the WV-TLTM, in contrast, the reweighting factor A(z) is distributed in a two-dimensional way (not on a circle), and the contributions of the radius α −1 enter both the mean value and the statistical errors, and also both the numerator and the denominator. Thus, the effect of small radius cancels out in a ratio of reweighted averages. Therefore, no additional problem is caused by the smallness of the reweighting factor, and the extent of the sign problem is still governed by the phase factor, which is reduced by taking sufficiently large flow times.

Conclusion and outlook
In this paper, we proposed a HMC algorithm on the worldvolume R of an integration surface Σ t , where the flow time t changes in the course of molecular dynamics, and thus the multimodal problem is resolved without introducing replicas. Furthermore, the computation of the Jacobian is not necessary in generating a configuration. We applied this algorithm to a chiral random matrix model (the Stephanov model) and confirmed that it reproduces correct results, solving both sign and multimodal problems simultaneously.
The validity of this algorithm should be further investigated by applying it to other systems that also have the sign problem, including finite density QCD, strongly correlated electron systems and real-time quantum field theories as well as frustrated spin systems like the antiferromagnetic Heisenberg model on the triangular lattice and the Kitaev model on the honeycomb lattice.
It is important to keep developing the algorithm as well in order to perform large scale calculations for such systems listed above with less computational cost. For example, it should be nice if we can find a more efficient algorithm to tune W (t). 23 At the same time, it is worth developing an algorithm where the weight e −W (t) needs not be introduced, as what happens when one switches from the simulated tempering [36] to the parallel tempering [22,23,24]. It is also desirable if one can construct an algorithm to evaluate the phase e iϕ = det J/| det J| without computing the matrix elements of J explicitly. Furthermore, in order to make a more accurate statistical analysis, it is important to develop a systematic method to estimate numerical errors that are necessarily introduced in integrating the antiholomorphic gradient flow and in solving Newton's method iteratively (Step 2 in subsection 3.5).
The modification of the flow equation (1.6) should also deserve intensive investigation for various reasons. To see this, note that (1.6) is not the only possible equation deforming the original integration surface R N so as to approach a union of Lefschetz thimbles. For example, it can be modified with a positive hermitian matrix G ij (z, z * ) to the form without changing the structure of thimbles. However, this modification changes flows of configurations off the thimbles, and can be designed so that flowed configurations approach zeros of e −S(z) only very slowly (see, e.g., [37]). We have investigated this type of modification, proposing to take G ij of the following simple form [38]: This actually removes zeros from R for finite flow times, and sometimes is helpful in iteratively solving the constraint (3.28). However, it seems that the obtained gain does not exceed the increased complexity of the algorithm, and also that the functional form of G ij needs to be fine-tuned, depending on parameters on each model. This is the reason why we did not pursue this possibility in this paper. However, it will be essentially important when one develops a Metropolis-Hastings algorithm described in appendix D, because the configuration spaceR = {ξ = (t, x a ) | T 0 ≤ t ≤ T 1 } comes to have a simple structure if points to be mapped to zeros do not exist in the region.
Another possible application of modifying the flow equation is to provide a mechanism to solve the so-called global sign problem (cancellation among contributions from different thimbles). In fact, since α −1 (z) increases exponentially in the vicinity of a Lefschetz thimble [see a comment below (B.8)], a change of flows caused by the modification may significantly shift the distribution of A(z) and distort the balanced contributions from different thimbles, that was the origin of the global sign problem.
A study along these lines is now in progress and will be reported elsewhere.

A. Geometry of the RATTLE algorithm
In this appendix, we clarify the geometrical aspects of the RATTLE algorithm and prove a few statements necessary for discussions in the main text.
form a basis of the tangent space T z R at z ∈ R, and give the induced metric ds 2 = g µν (ξ) dξ µ dξ ν as Furthermore, denoting the inverse of (g µν ) by (g µν ), and defining another basis of T z R by 25 we also introduce local coordinates η = (η µ ) on T z R as coefficients in an expansion with respect to E µ . 26 Namely, for π ∈ T z R, its coordinates η = (η µ ) are defined through the relation whose explicit forms are given by When R is the worldvolume of an integration surface in C N = R 2N , we set M = 2N and m = N + 1. 25 Note that E µ · E ν = g µν . 26 As in the main text, we denote a function on R by f (z) and f (ξ), interchangeably, with the understanding that z = z(ξ). The transition matrix is also written as P (z ′ |z) and P (ξ ′ |ξ) for z = z(ξ), z ′ = z(ξ ′ ) ∈ R.
Similarly, a function on T R is written as f (z, π) and f (ξ, η), interchangeably.
The line element on T z R then takes the form and thus the volume elements of T R is given by We think of the tangent bundle T R M = {(z I , π I )} (not the cotangent bundle) as the phase space of motions in R M with a symplectic form Ω ≡ dπ I ∧ dz I . The sub-bundle T R = {(z I , π I ) | z ∈ R, π ∈ T z R} is then regarded as the phase space of constrained motions on R. Its symplectic form is given by 27 which defines the Poisson bracket as {ξ µ , η ν } = δ µ ν , {ξ µ , ξ ν } = {η µ , η ν } = 0. The volume element (A.7) agrees with the phase-space volume element associated with ω: because ω m /m! = dξ dη = ( √ g dξ) (dη/ √ g) = Dξ Dη.
The HMC algorithm then consists of the following three steps for a given initial configuration z ∈ R: Step 1. Generate a vectorπ = (π I ) ∈ T z R M from the Gaussian distribution 1 (2π) M/2 e −π 2 /2 , (A. 35) and project it onto T z R to obtain an initial momentum π = (π I ) ∈ T z R.
Step 2. Calculate Φ ∆s (z, π) from (A.27)-(A.31). We repeat this step n times to obtain (z ′ , π ′ ) = Φ n ∆s (z, π) Step 3. Update the configuration z to z ′ with a probability min 1, e −H(z ′ ,π ′ )+H(z,π) . (A.36) The above process defines a stochastic process on R with the following transition matrix for z ′ = z: The diagonal (z ′ = z) components are determined from the probability conservation. P (z ′ |z) can be shown to satisfy the detailed balance condition as follows: where we have used (A.34) n times to get the second line, and have made the change of integration variables, π → −π and π ′ → −π ′ , with the relation H(z, −π) = H(z, π) to obtain the third line.

B. Analytical expressions for the Gaussian case
We present the analytical expressions for some geometrical quantities defined in subsection 3.1 for the action This has a single critical point at z σ = (z k σ = i), and the corresponding Lefschetz thimble is given by J σ = {z = (z k ) ∈ C k | Im z k = 1 (∀k)}. Complex vectors will be used throughout this appendix.
We see that the inverse lapse is given by α −1 = e βt /(β √ N) and increases exponentially in flow time t as z(t, x) approaches the Lefschetz thimble.
The ideal weight function e −W (t) giving a uniform distribution of t is given by [see (3.49 We have ignored t-independent constants. We see that the weight factor also increases exponentially, e −W (t) ≃ e βt , at large flow times.
C. Proof of eq. (3.31) In this appendix, we prove the equality (3.31). First, we construct 2N coordinates (ζ A ) ≡ (ξ µ , φ r ) in the vicinity of R in R 2N , by regarding (φ r ) as coordinates in the extra dimensions, and introduce at each point z ∈ R a basis {E A } of the tangent space T z R 2N as Note thatÊ 0 andÊ r equal the gradients ∂t(z) and ∂φ r (z), respectively. Then, since the vectors E ⊥ 0 ,Ê a andÊ r also form a basis of T z R 2N ,Ê 0 can be expanded in the form The coefficients can be calculated by using the relations (C.3) and E 0 · E ⊥ 0 = (E ⊥ 0 ) 2 to be and thus we find thatÊ 0 = ∂t(z) takes the form .

(D.5)
The weight e −W (t) is determined so that the functioñ is almost independent of t, as in subsection 3.4.
The distribution e −Ṽ (ξ) /ZR (ZR = R dξ e −Ṽ (ξ) ) can be obtained from a Markov chain without evaluating J explicitly, if one uses the Metropolis-Hastings algorithm to update a configuration. 29 Namely, from a configuration ξ we first propose a new configuration ξ ′ with a probability where we have treated t and x anisotropically. We then accept ξ ′ with a probability In a generic case, Re S(z(t, x)) changes rapidly at large flow times t, and thus we should better change the proposal depending on ξ = (t, x a ). One way is to change (σ 2 t , σ 2 x ) by randomly taking them from a setC = {(σ 2 t,c , σ 2 x,c )} (c = 1, . . . , c max ) as in subsection 4.2. Another way is to use an asymmetric proposal Prop(ξ ′ |ξ) by making σ 2 t and σ 2 x t-dependent functions: In the latter case, the functional form of σ 2 t (t) and σ 2 x (t) are fixed manually or adaptively from test runs.
After a sample is obtained for the region [T 0 , T 1 ], we consider subsamples for various estimation ranges [T 0 ,T 1 ], and estimate an observable by looking at a plateau in the twodimensional parameter space {(T 0 ,T 1 )}, as in subsection 3.6. 29 One can also use the HMC algorithm in principle, but this requires the computation of the Jacobian J = (J i a (ξ)) because Hamilton's equation in molecular dynamics involves the gradient ∂ x a S(z(ξ)) = ∂ z i S(z) J i a (ξ). 30 The diagonal components are determined by the probability conservation, dξ ′P (ξ ′ |ξ) = 1.