Generalized free energy and dynamical state transition of the dyonic AdS black hole in the grand canonical ensemble

We study the generalized free energy of the dyonic AdS black hole in an ensemble with varying electric charge qE and fixed magnetic charge qM. When we adjust the temperature T and the electric potential ΦE of the ensemble, the Ricci scalar curvature R and electromagnetic potential Au usually diverge at the horizon. We regularize them and incorporate the off-shell corrections into the Einstein-Hilbert action. Alternatively, we find that the off-shell corrections can also be obtained by adding a boundary near the horizon to exclude the singularities. Ultimately, we derive the generalized free energy which is consistent with the definition of the thermodynamic relations. Based on the generalized free energy landscape, we can describe the dynamics of state transition as a stochastic process quantified by the Langevin equation. The path integral framework can be formulated to derive the time-dependent trajectory of the order parameter and the time evolution of the transition probability. By comparing the probability with the result of the classical master equation, we attribute the contribution to the probability of one pseudomolecule or antipseudomolecule (the instanton and anti-instanton pairs) to the rate of state transition. These results are consistent with the qualitative analysis of the free energy landscape.


Introduction
Since the establishment of the four black hole thermodynamic laws [1][2][3][4], phase transition of the AdS black hole has attracted much attention in the past decades.Two famous examples are the Hawking-Page phase transition which can be interpreted as the confinement/deconfinement phase transition in the context of AdS/CFT correspondence [5,6], and the charged AdS black hole phase transition which was found to be similar to the liquid/gas phase transition [7,8].Recently, the study of phase transition has been generalized to the extended phase space, where the cosmological constant is interpreted as the thermodynamic pressure to hold the consistency between the first law of black hole thermodynamics and the Smarr relation from the scaling argument [9][10][11][12][13][14][15][16][17][18][19].In the extended phase space, the similarities between the charged AdS black hole phase transition and the liquid/gas phase transition become more complete with similar equations of state and the same critical exponents [12].Furthermore, many novel phenomena such as reentrant phase transition [13], triple point [14,15], multiple critical points [16], and λ-line phase transition [17] have been observed in the extended phase space.
Although there are extensive studies on the phase behaviors in different black hole systems, the dynamics of state transition have not been investigated adequately until very recently.A recent study suggests that the thermal fluctuations play a vital role in the state transition, and the dynamics can be described as a stochastic process quantified by the Fokker-Planck equation [20,21].Such a viewpoint has attracted significant attention and has been extended to studies on various black hole systems [22][23][24][25][26][27][28][29][30][31][32][33].We should note that we have used the term "state transition" in our paper instead of "phase transition" in previous studies [20][21][22][23][24][25][26][27][28][29][30][31][32][33], because it better describes the dynamical process.In the case of a first-order phase transition, it occurs at a specific temperature when two locally stable states have the same free energy.However, the state transition is not limited solely to the phase transition temperature.The globally stable state, which has lower free energy, still has the probability to switch to the locally stable state with higher free energy due to thermal fluctuations.In other words, state transitions have a chance to occur at other temperatures as well.
As we know, the Langevin equation is an equivalent description of the Fokker-Planck equation, and the dynamics of state transition can also be quantified by the Langevin equation.In [34], we utilized the Langevin equation to formulate the path integral framework and investigated the dynamics of charged AdS black hole state transition in the canonical ensemble.Compared with the method of solving the Fokker-Planck equation, there are three advantages.Firstly, we can quantify the path showing visually how the state transition proceeds.The unstable transition states can be easily identified on the path as they do not have resident time.Secondly, our framework can give the analytical expression of the time evolution of the probability rather than the numerical results.Thirdly, the transition rate between the two stable states has a clear significance, it is the contribution to the probability of one pseudomolecule or antipseudomolecule.
Whether we use the description of the Fokker-Planck equation or the Langevin equation, the driving force of the stochastic process is provided by the generalized free energy landscape.In the generalized free energy landscape, the free energy is a continuous function of the order parameters (See Fig. 2 for the generalized free energy landscape).Only the extreme points on the landscape correspond to the on-shell black hole states whose manifolds are regular, all other states are off-shell states whose manifolds are conical singular.Therefore, the standard definition of free energy should be generalized to apply not only to the on-shell states but also to the off-shell states.In addition to composing the free energy landscape, the off-shell states also serve as intermediate transition states that reveal the process of the path during the state transition.Thus, it is necessary for us to introduce the off-shell states and the generalized free energy.Recently, generalized free energy has another interesting application in black hole thermodynamics, where the authors have used generalized free energy to treat black hole solutions as topological defects [35].One can see Ref. [36][37][38][39][40][41][42][43][44][45][46][47][48][49][50][51][52][53] for the latest studies.
Initially, the generalized free energy is defined by the thermodynamic relations for the canonical ensemble [20,21].Considering the AdS black hole as a system in contact with a thermal bath located at infinity, the temperature of the canonical ensemble is treated as an external parameter that can be adjusted arbitrarily.However, the black hole is on-shell only when the ensemble temperature is equal to the Hawking temperature.The generalized free energy can then be obtained by replacing the Hawking temperature T H in the standard definition of the free energy G = M − T H S with the ensemble temperature T .Subsequently, a more concrete and solid foundation for the generalized free energy in the canonical ensemble has been derived by utilizing the Hawking-Gibbons gravitational path integral on the Euclidean manifold with a conical singularity [54].
However, previous studies on the generalized free energy and the dynamical state transition have mainly focused on the canonical ensemble, with the black hole radius being the only order parameter.In this paper, we will investigate the generalized free energy and the dynamical state transition of the dyonic AdS black hole in the grand canonical ensemble using the Langevin equation.We will keep the magnetic charge fixed while varying the electric charge of the dyonic AdS black hole, making the electric charge and the radius the chosen order parameters.Although a very recent study shows that the generalized free energy in a grand canonical ensemble can be obtained by the Legendre transformation of the generalized free energy in the canonical ensemble [55], we aim to find a more fundamental derivation of the generalized free energy in the grand canonical ensemble, i.e., starting from the Euclidean action and using the Hawking-Gibbons gravitational path integral.We provide two methods for calculating the Euclidean action and its related generalized free energy.These approaches involve the regularization of divergences at the horizon and the addition of a boundary to exclude the singularities, respectively.Interestingly, both approaches produce identical outcomes.Furthermore, the framework of the dynamical state transition in the grand canonical ensemble differs from that in the canonical ensemble, and our studies are presented as follows.

The on-shell thermodynamics of the dyonic AdS black hole
The action of the Einstein-Maxwell theory in four-dimensional AdS space can be written as where the Hawking-Gibbons boundary term is added for a well-defined action principle [56].h is the determinant of the induced metric on the boundary Σ + at infinity, and K = h µν K µν is the trace of the extrinsic curvature of Σ + as embedded in M .The variation of the action in Eq. (2.1) can be calculated as where n µ in the last term is the outward pointing unit normal vector of the boundary Σ + at infinity.As we can see, the first two terms provide the equations of motion for the gravitational field and the electromagnetic field.To have a well-defined action principle, we must impose δA µ = 0 on the boundary Σ + to eliminate the last term.Therefore, Eq. (2.1) can be used to study the ensemble with a fixed electric potential and a fixed magnetic charge.
With static spherical symmetry, the electromagnetic gauge potential and the metric of the dyonic AdS black hole can be obtained by solving the equations of motion for the electromagnetic and gravitational fields.This will yield: and with Here, q E and q M are the electric and magnetic charges, M is the mass, l 2 = − 3 Λ and r h is the on-shell electric potential.In Eq. ( 2.3), the first and second terms have been chosen with the gauges which are regular on the horizon and the axis θ = 0, respectively.
The horizon radius r h is determined by f (r h ) = 0, so the mass M can be expressed by r h as The Hawking temperature is given by ). (2.7) In the extended phase space, the cosmological constant is considered as a variable that is related to pressure P by P = − Λ 8π [9][10][11][12].Furthermore, to associate the charged AdS black hole with the van der Waals fluids, the specific volume v of the charged AdS black hole is identified as v = 2r h [12].This identification is also valid for the dyonic AdS black hole, Eq. (2.7) can then be rewritten as the equation of state where we have used Φ EH = q E r h .Eq. (2.8) is similar to the equation of state for van der Waals fluids, as well as to the equation of state for charged AdS black hole.The critical point (P c , v c , T c ) of the dyonic AdS black hole can be found by solving ∂P ∂v = 0 and Below the critical point, a phase transition of the liquid-gas type can occur.
We then proceed to study the action in Eq. (2.1).In the framework of Hawking-Gibbons gravitational path integral, an analytic continuation t → iτ can be used to derive the Euclidean action I E , which is related to the partition function Z grav through the saddle point approximation as [56] I E = − ln Z grav . (2.10) In other words, the Euclidean action can be used to derive the thermodynamic quantities in the ensemble.
In Appendix A and B, we have shown two methods to calculate the Euclidean action.The first method is called "counterterm subtraction", where the counterterm is added to cancel the divergence at infinity [57][58][59][60].The second method is called "background subtraction", which involves calculating the difference in Euclidean action between the dyonic AdS black hole and the pure AdS space [61][62][63].The pure AdS space is identified as turning off the mass, electric charge, and magnetic charge of the dyonic AdS black hole.Furthermore, the metric of AdS space is adjusted so that it matches that of the dyonic AdS black hole at a cutoff distance R, and we finally take the limit of R → ∞.In this method, the Hawking-Gibbons boundary term is canceled out and the counterterm is not necessary.
We should note that what we calculate in the Appendix is I M/Σ − at an arbitrary temperature T and electric potential Φ E rather than at the Hawking temperature T H and the on-shell potential Φ EH .I M/Σ − is the action of the Euclidean manifold M excluding the surface Σ − located at the horizon, i.e,I M/Σ − = I M − I Σ − .Because T and Φ E are arbitrary, I M is now called the reduced action [64,65].In the next section, we will see that the off-shell corrections are I Σ − , such a term vanishes for the on-shell black hole solutions.Thus, when T = T H and Φ E = Φ EH , the reduced action I M will recover the on-shell action I os , which is also equal to I M/Σ − .As we can see in Appendix A and B, both methods yield the same result as where β = 1 T is the period of imaginary time τ .Taking β = β H and Φ E = Φ EH in Eq. (2.11), we can obtain I os .By substituting I os into Eq.(2.10), we can derive the partition function Z grav .Then, the free energy for the on-shell black hole can be calculated as where S = πr 2 h is the entropy of the black hole.It should be noted that the free energy G os is only effective for the on-shell black hole solutions.
In Fig. 1, we have plotted the free energy G os as a function of the Hawking temperature T H for different magnetic charges q M .When q M > 0 and P is below the critical pressure P c , three black hole branches can appear: a stable small black hole, an unstable Figure 1.The figures show the relationship between the free energy G os and the Hawking temperature T H for Φ EH = 0.5, with varying magnetic charge in each subfigure labeled as: (a)q M = 0, (b)q M = 0.01, (c)q M = 0.1, and (d)q M = 1.In subfigure (a), the red, green, and blue lines represent the thermal AdS space, the unstable small black hole, and the stable large black hole, respectively.In subfigure (b), (c), and (d), the red, green, and blue lines represent the stable small black hole, the unstable intermediate black hole, and the stable large black hole, respectively.The pressures P for curves 1, 2, and 3 differ as follows: P < P c for curve 1, P = P c for curve 2, and P > P c for curve 3.
intermediate black hole, and a stable large black hole.There can also be a first-order phase transition between the small and large black holes, similar to that of van der Waals fluids.As we decrease the magnetic charge, the free energy of the stable small black hole generally decreases to zero.When q M = 0, i.e. the dyonic AdS black hole recovers to the charged AdS black hole, the stable small black hole will disappear and become the thermal AdS space with a free energy equal to 0. Then, there will only be two black hole branches, which can also be seen from Eq. (2.8) by setting q M = 0. Thus, the phase transition between the small and large black holes becomes the Hawking-Page phase transition between the thermal AdS space and the large black hole.Actually, such a Hawking-Page phase transition can occur at any positive pressure.In our paper, we will focus on the case where q M > 0. Without loss of generality, we set q M = 0.1 in the following paper.In section 5, we will give some discussions about the case of q M = 0.
As mentioned in the introduction, in order to describe the dynamics of the black hole state transition, we should generalize the definition of the on-shell free energy so that it is also applicable to the off-shell black holes.The generalization is directly from the perspective of thermodynamics.We can consider the dyonic AdS black hole as a system in contact with a thermal and particle bath located at infinity in AdS space.Therefore, the temperature and the potential of the ensemble are external parameters that can be adjusted arbitrarily.By replacing the on-shell quantities T H and Φ EH in Eq. (2.12) with the ensemble parameters T and Φ E , we can obtain the generalized free energy as (2.13) Here, T and Φ E are now free parameters and represent two physical degrees of freedom.
If we take the derivative of G gen with respect to r h and q E , both equal to 0, we can recover the on-shell black hole solutions and lose the two degrees of freedom T and Φ E .
In the following section, we will derive the generalized free energy landscape from a more fundamental perspective by adding the off-shell corrections of T ̸ = T H and Φ E ̸ = Φ EH to the Euclidean action.

The off-shell corrections
The Euclidean metric of the dyonic AdS black hole is written as where As we know, the period of the imaginary time τ is always equal to the inverse of the ensemble temperature.If the ensemble temperature T is not equal to the Hawking temperature T H , a conical singularity will appear at the horizon [66][67][68][69].To better understand this, we introduce a transformation of coordinates dρ dr, which can be rewritten as Then, we calculate the Taylor expansion of f (r) near the horizon r h as follows: where we have used f (r h ) = 0 and take the approximation up to first order.Substituting Eq. (3.4) into Eq.(3.3) and imposing ρ = 0 at r = r h , we can obtain Substituting Eq. (3.5) into Eq.(3.4), we can obtain where is actually the inverse of the Hawking temperature T H in Eq. (2.7).Thus, the Euclidean metric of the dyonic AdS black hole near the horizon can now be rewritten as where ξ = 2πτ β H .As mentioned in the previous section, the temperature T and the electric potential Φ E of the ensemble are the external adjustable parameters.If we arbitrarily adjust the ensemble temperature, it corresponds to a change in the period β of imaginary time τ given by β = 1 T .When β = β H , the (ρ, ξ) space has the topology of a disk and the manifold is regular.When β ̸ = β H , the (ρ, ξ) space has the topology of a cone with a nonzero deficit angle 2π(1 − β β H ). It should be noted that r = r h corresponds to ρ = 0, which is the vertex of the cone.Thus, the scalar curvature R diverges at the horizon and the standard formulas of the Riemannian geometry are not applicable here.
Regarding the part of the electromagnetic field, if we choose the electric potential as Φ E ̸ = Φ EH , the electromagnetic gauge potential in Eq. ( 2.3) will be rewritten as After a simple calculation of |g tt A t A t |, we can find that A t also diverges at the horizon.
Because the divergences of R and A µ are located at the horizon Σ − , the off-shell corrections to the Euclidean action are actually I Σ − mentioned in the previous section.Before dealing with the two kinds of divergences at the horizon, we impose the gravitational Hamiltonian constraint G τ τ + Λg τ τ = 8πT τ τ to eliminate the cosmological constant Λ in the Euclidean action.Such a procedure has been used in Ref. [65] to derive the reduced action of the charged AdS black hole.In our case, the Euclidean action is now rewritten as During the calculations of the off-shell corrections by the scheme of regularization, we have both used the gravitational Hamiltonian constraint and the electromagnetic Gauss'slaw constraint [64,65].As said in [64,65], the solutions of the two constraints depend on two free parameters r h and q E , which represent two physical degrees of freedom.By inserting the solutions of the two constraints into the Einstein-Maxwell action, one can obtain the reduced action.However, in [64,65], the black hole is enclosed in a cavity with a finite radius r B , and the specified temperature and electric potential are determined by an observer at rest at r B .Additionally, the manifold is always regular in [64,65].

The contribution of T ̸ = T H
In this subsection, we will calculate the off-shell correction to the Euclidean action when T ̸ = T H . Due to the presence of the conical singularity, it is necessary to regularize the divergence stemming from this singularity.Our procedure is shown as follows.
At first, we rewrite Eq. (3.5) and Eq.(3.7) as and where ψ = 2πτ β has a period of 2π.The objective is to smooth out the conical deficit by replacing ρ 2 β 2 β 2 H with a regular function a 2 (ρ), which fulfills a ′ (0) = 1 and a ′ (ϵ) = β β H [55,69].It means that the topology of (ρ, ψ) space is now a disk at the horizon but a cone at ρ = ϵ, so a limit ϵ → 0 should be taken to recover the conical singularity finally.The metric in Eq. (3.11) is then rewritten as In the vicinity of the horizon, we now use this metric to calculate the scalar curvature R and the component of the Einstein tensor G ψ ψ as and where we have used r(ϵ) = r h in the limit of ϵ → 0, and the vicinity of horizon represents that 0 < ρ < ϵ with ϵ → 0. Furthermore, we should note that y ′′ (x) represents the derivative of y with respect to x.For example, f ′ (r h ) in Eq. (3.10) is the derivative of f (r) with respect to r at r = r h .a ′′ (ρ) in Eq. (3.13) is the second derivative of a(ρ) with respect to ρ. Substituting Eq. (3.13) and Eq.(3.14) into the gravitational part of the action in Eq. (3.9), the correction to the Euclidean action resulting from the conical singularity can be calculated as (3.15) We can find that the correction to the Euclidean action is independent of the choice of the regular function a(ρ).

The contribution of Φ E ̸ = Φ EH
In this subsection, we will calculate the off-shell correction to the Euclidean action when Φ E ̸ = Φ EH .Since only the component A t of the electromagnetic gauge potential diverges at the horizon, we will only consider the electric part of the electromagnetic gauge potential here.After we use the analytic continuation t → iτ in Eq. (3.8), the electromagnetic gauge potential can be rewritten as where ψ = 2πτ β has a period of 2π and is the part that we care about.Then, the nonvanishing components of the Maxwell field strength tensor F µν and T ψ ψ can be calculated as and where is the Maxwell stress-energy tensor.Substituting Eq. (3.17) and Eq.(3.18) into the electromagnetic part of the Euclidean action in Eq. (3.9), we can write the off-shell correction to the Euclidean action resulting from the divergence of A µ as Then, we impose the Gauss's-law constraint as done in the procedure of calculating the reduced action in [64,65].This is actually the nontrivial Maxwell equation as or equivalently, Now, we will use a regularization scheme that is similar to the procedure used to handle the conical singularity.Specifically, we replace A ψ with a function b(ρ) such that b Different from A ψ , the function b(ρ) does not diverge at the horizon, and we finally take the limit ϵ → 0 to recover the singularity.However, the derivation of b(ρ) diverges near the horizon as Then, Eq. (3.22) can be rewritten as where we have used r(ϵ) = r h in the limit of ϵ → 0, and the result of I ce is independent of the choice for b(ρ).
One may note that if we use Eq.(3.21) twice in Eq. (3.19), we will obtain However, if we use the regularization scheme twice by replacing A ′2 ψ (ρ) with b ′2 (ρ) in Eq. (3.19), we will obtain because ϵ 0 dρb ′ (ρ) is finite and non-zero, but b ′ (ρ) ρ diverges when ϵ → 0. Recalling the procedure for dealing with the conical singularity.If we use the metric in Eq. (3.11) instead of the metric in Eq. (3.12), i.e., if we do not employ the regularization scheme, we find that the value of I cc in Eq. (3.15) is also 0. Consequently, the regularization is deemed too weak if Eq. (3.21) is used twice, or too strong if A ′ ψ (ρ) is replaced by b ′ (ρ) twice.Additionally, it can be proven that in order to obtain a finite and non-zero value for I ce , we can only replace A ′ ψ (ρ) by b ′ (ρ) once.Furthermore, if we substitute Eq. (3.21) twice in Eq. (3.19), the reduced action will be independent of the free parameter Φ E .This indicates that the physical degree of freedom Φ E is lost.
In conclusion, the generalized free energy can be calculated as and we have obtained the same generalized free energy as the result from the thermodynamic perspective in Eq. (2.13).For the purpose of simplification, we will use the symbols r and Q to represent r h and q E in the following paper.In Appendix C, we present another possible approach for calculating the off-shell corrections to the Euclidean action and its associated generalized free energy.This approach includes adding a boundary near the horizon to exclude the singularities.Finally, both methods yield the same result.In Fig. 2, we have plotted the generalized free energy landscape of the dyonic AdS black hole as a function of r and Q in P = 0.042, Φ E = 0.5, and q M = 0.1.There are two locally stable states corresponding to the minima of the free energy landscape, and one unstable state corresponding to the saddle point of the free energy landscape.These three states are on-shell, while all other states on the landscape are off-shell.We refer to these three on-shell black holes by their sizes as small, intermediate, and large black holes, with radii denoted as r s , r m , and r l , respectively.When T = 0.15, the free energies of the small and large black holes are equal, and they are both globally stable states.When T < 0.15, the small black hole state is the globally stable state with a lower free energy.When T > 0.15, the large black hole state is the globally stable state with a lower free energy.4 The dynamical state transition for the dyonic AdS black hole in the grand canonical ensemble In the previous section, we have derived the generalized free energy of the dyonic AdS black hole in the grand canonical ensemble by the gravitational path integral approach.In the free energy landscape at a fixed temperature, as shown in Fig. 2, it seems impossible for a locally stable state to overcome the barrier of the unstable state and transform into another locally stable state.However, if we consider the black hole as a thermal entity, the thermal fluctuations are unavoidable and will induce the state transition between these two locally stable states.In analogy to the motion of a Brownian particle, the dynamics of state transition for the dyonic AdS black hole in the grand canonical ensemble are described by the Langevin equation that governs the stochastic evolution of the order parameters r and Q as where ⃗ x = (r, Q) and γ is the two-dimensional friction coefficient matrix.On the left side, we have the inertia term.On the right side, the first force is the friction opposing the direction of motion in the order parameter space, the second force is the driving force resulting from the free energy landscape, and the third force is the fluctuating stochastic force.For simplicity, we make the following assumptions: (1) The friction coefficient matrix γ is isotropic and homogeneous, so γij = γδ ij and γ is a constant.(2) ⃗ ξ(⃗ x, t) is Gaussian white noise and the dynamics of the state transition are Markovian.(3) γ is assumed to be very large, so d⃗ x dt and ⃗ x have significantly different characteristic time scales (See Appendix D for an illustrative example).Specifically, d⃗ x dt is the fast variable that rapidly converges to a quasi-stable value compared to the slow variable ⃗ x.In the case of a stochastic system, the behavior on a very short time scale is often not of interest.A prime example is the Brownian particle, where only the position is observed, while the momentum is not of interest.Consequently, the adiabatic approximation allows us to neglect the inertia term η i (r, Q, t) are the Gaussian white noises, which satisfy D is the diffusion coefficient associated with the friction coefficient γ by the fluctuationdissipation theorem which states that the friction is actually determined by the correlation of the fluctuating stochastic force.
We can now formulate the stochastic dynamics described by the Langevin equation with the Onsager-Machlup functional, and the probability from the initial state (r i , Q i ) at time t 0 = 0 to the final state (r f , Q f ) at time t can be quantified as [74,75] where , L is the stochastic Lagrangian and D⃗ x represents the sum of all the paths connecting the initial state and the final state.Because the friction coefficient γ is very large in our case, the corresponding diffusion coefficient D is very small and the last term in stochastic Lagrangian can be ignored as From Eq. (4.5), we can see that the various paths contribute to different weights, which are on the exponentials.This indicates that the dominant path has the largest weight, which is significantly larger than the weights of other paths.Thus, we can just consider the contribution of the dominant path, which satisfies the Euler-Lagrange equation from the maximization of the weights or minimization of the action as Substituting Eq. (4.6) into Eq.(4.7) and integrating them, we can obtain where E is an integration constant.Eq. (4.8) can be considered as an energy conservation equation, where ) is the effective potential, and E is the total energy.Thus, the stochastic dynamics can be regarded as the dynamics of a particle with mass 1 2D moving in the two-dimensional potential V (r, Q).
In principle, we can solve Eq. (4.7) to obtain the dominant path.However, it is not an easy task for such two-dimensional differential equations with boundary-value conditions rather than initial-value conditions.Fortunately, the dynamics are energy-conserving and time-reversible, so we can switch the dynamics from the time-dependent Newtonian description to the energy-dependent Hamilton-Jacobi description [76][77][78].In other words, we will not solve the time-dependent trajectories r(t) and Q(t), but rather solve the timeindependent path Q(r).The Lagrangian L is associated with the Hamiltonian H by the Legendre transformation as where (q 1 , q 2 ) = (r, Q) and p k is given by Substituting Eq. (4.9) and the energy conservation equation (4.8) into the effective action S = Ldt, we can obtain where dl = dr 2 + dQ 2 is an infinitesimal displacement along the path and we have abandoned the boundary terms because they do not play a role in the calculations of the dominant path with minimal action.In our case, we take E as E = V ( ⃗ x i ) = V ( ⃗ x f ) = 0, which corresponds to the longest transition time in Eq. (4.8).Without loss of generality, we set D = 1 throughout the paper.
The dominant path Q(r) can be obtained by minimizing the discretized action where The last term in Eq. (4.12) is a numerical technique used to introduce a penalty function, which keeps all the length elements close to their average and becomes irrelevant in the continuum limit [76][77][78].Then, we apply the simulated annealing and conjugate gradient algorithm to iterate and obtain the dominant path Q(r) with minimal action.When P = 0.042, T = 0.15, Φ E = 0.5, and q M = 0.1, we plot the dominant path in Fig. 3 as the blue circles.Actually, the dominant path we obtain is described by a set of discrete points.However, we can approximate these points using a polynomial, and a suitable choice is the polynomial given by In Fig. 3, we have plotted Q = h(r) by red line, which matches well with the blue circles.We should note that the weight of the dominant path is significantly larger than the weights of other paths, and the state transition can be considered along Q = h(r).Therefore, only r is a free parameter and the two-dimensional dynamics r(t) and Q(t) can be transformed into the one-dimensional dynamics r(t).We replace Q in Eq. (4.6) with h(r) and solve the Euler-Lagrange equation again, it yields Integrating Eq. (4.15), we can obtain the energy conservation equation as where E is set to zero corresponding to the longest transition time.Interestingly, the mass of the equivalent particle moving in one-dimensional effective potential is r-dependent as 1+h ′2 (r) 2D .
In Fig. 4, we have plotted the one-dimensional effective potential V (r) = − . The three on-shell black holes are located at the maxima where their effective potentials are equal to zero.The dynamics of state transition between the small and large black holes can be regarded as the dynamics of an effective particle moving between the left and right points marked by the red stars in Fig. 4. In the long time limit, the state transition between the small and large black holes can take place many times, indicating that the equivalent particle can move forth and back many times between the points r s and r l .Consequently, the dominant path will consist of a series of the smallest units called pseudomolecules (or instanton and anti-instanton pairs shown in Fig. 5), with their initial and final states located at the locally stable states and the other states of the pseudomolecules being unstable.There are four kinds of pseudomolecules in total as whose contributions to the probability are denoted as w a , w b , w c , and w d , respectively.In Fig. 5, we have plotted some sections of the domain path r(t) based on Eq. (4.15).The dynamical trajectory of state transition is revealed by the domain path, which is composed of three on-shell states and many off-shell states.Therefore, it is necessary for us to introduce the off-shell states.From the path, it can be observed that there is no residence time for the off-shell states, indicating that they are unstable transient states.One might question why the unstable on-shell intermediate state with radius r m has a residence time.In fact, this is due to a numerical fault.When considering the stochastic Lagrangian in Eq. (4.5), we have neglected the last term.Although this term is very small, it is not zero and results in the effective potential of r m being smaller than r s and r l in Fig. 4. Consequently, strictly speaking, there will be no residence time for the intermediate black hole.
Although the domain path has shown how the process proceeds during the state transition, a complete description of the dynamics should also encompass the rate that quantifies the time scale of the state transition between the small and large black holes.To calculate this rate, we initially calculate the probability P (r f , t; r i , t 0 ) as follows.
In our case, we choose the initial state as the small black hole state, and the final state can be either the small or large black hole state.We make the assumption that there are no interactions among the pseudomolecules, allowing us to calculate the probability P (r f , t; r i , t 0 ) by separating it into the contribution of each part in the dilute gas approximation.The contribution of one pseudomolecule to the probability P (r f , t; r i , t 0 ) is given by We should note that the downhill part of the free energy landscape along the trajectory of the pseudomolecule does not contribute to the probability.In other words, the Lagrangian is always zero during r m → r s and r m → r l of the pseudomolecule.This can be proven as follows.Firstly, we rewrite the energy conservation equation (4.16) as Then, we substitute Eq. ( 4.20) into Eq.( 4. 19), and L = 0 can be simplified as If we square the two sides of Eq. (4.21) and substitute Eq. ( 4.20) into it, we can obtain We should note that Eq. (4.22) gives (4.21).Then, we introduce a function y(r) = f Q (r)−h ′ (r)f r (r) and plot it in Fig. 6.From the figure, we can see that Eq. (4.22) is always satisfied when r is within the range of the radius of small black hole r s and the radius of large black hole r l .However, the relation may be violated when r is outside of this range.It is reasonable because the polynomial fitting of Q by h(r) in Eq. (4.14) is only valid for r s ≤ r ≤ r l .If we analyze the sign of ṙ and the free energy landscape, we can find that L is always equal to 0 during r m → r s and r m → r l in the trajectory of pseudomolecule.Therefore, the contributions to probability for four kinds of pseudomolecules satisfy where W 1 and W 2 are given by Eq. (4.18) whose integral domain is now taken as t s → t m and t l → t m , respectively.The minus signs appearing in Eq. (4.23) result from the presence of a turning point on the trajectory of the pseudomolecules, one can read Ref. [79,80] if interested in the origin.Eq. (4.23) tells us that there are actually two independent categories of pseudomolecules, we classify a and b as the pseudomolecules and c and d as the antipseudomolecules.Then, we choose the small black hole state as the final state and calculate the probability P (r s , t; r s , t 0 ), which is a sum of all possible cases with the number of pseudomolecules from 0 to infinity.When there is zero pseudomolecule, it means that the system always stays is plotted with a blue line at P = 0.042, T = 0.15, Φ E = 0.5 and q M = 0.1.The left red line corresponds to r = r s , and the right red line corresponds to r = r l .
at the small black hole state for t 0 ∼ t.Eq. (4.5) tells us that the residence time t 0 ∼ t for the small black hole state will give a contribution to the probability P (r s , t; r s , t 0 ) as e V (rs)(t−t 0 ) .When there is one pseudomolecule, it can only be a pseudomolecule, and the contribution is given by where a pseudomolecule takes place at time t 1 .
When there are two pseudomolecules, they can either be two a pseudomolecules or b → d where the arrow represents the time sequence.The contribution is given by where two pseudomolecules take place at time t 1 and t 2 .The first and second terms in the equation correspond to a → a and b → d, respectively.
When there are three pseudomolecules, they can be three a pseudomolecules, We continue such procedures and use V (r s ) = V (r l ) = V , the total probability P (r s , t; r s , t 0 ) can be calculated by the sum of all possible cases with the number of pseudomolecules from 0 to infinity as dt n e V (t 1 −t 0 ) ...e V (t−tn) .
(4.26)By using the Laplace transform, we obtain where the effective potential V is equal to 0. Inverting the Laplace transform, we can obtain A similar procedure can be applied to the calculation of P (r l , t; r s , 0), which yields In Fig. 7, we have plotted the time dependencies of P (r s , t; r s , 0) and P (r l , t; r s , 0) at different temperatures.Due to thermal fluctuations, both the small and large black hole states can occur with different steady probabilities.The steady probability is governed by the free energy according to the Boltzmann distribution, and it can indicate thermodynamic stability.In Fig. 8 .The temperature dependencies of the barrier heights in the free energy landscape are plotted at P = 0.042, Φ E = 0.5, and q M = 0.1.The blue line represents the barrier height G m − G s between the intermediate and the small black hole states, while the red line represents the barrier height G m − G l between the intermediate and the large black hole states.Except for the leftmost point with T = 0.141, the temperature interval between other points is 0.005.If the temperature goes beyond the range of the curve, there will not be three on-shell states, and the phase transition will no longer occur.Actually, this can be observed from the barrier heights, as they gradually approach zero at T = 0.141 and 0.215.This indicates that one on-shell black hole state will disappear.energy landscape.When T = 0.15, the small and large black holes have the same free energy, and their steady probabilities are both equal to 0.5 as shown in Fig. 7.When T < 0.15, the steady probability of the small black hole is greater than that of the large black hole due to its lower free energy, making the small black hole globally stable.When T > 0.15, the steady probability of the small black hole is smaller than that of the large hole due to its higher free energy, making the large black hole globally stable.
As we know, the master equation is a powerful tool to describe the time evolution of the probability distribution for the Markov process.In our system, there are two locally stable states, and the classical master equation can be written as dP (r s , t; r s , 0) dt = −k 1 P (r s , t; r s , 0) + k 2 P (r l , t; r s , 0), where k 1 is the transition rate from the small to large black hole state, and k 2 is the transition rate from the large to small black hole state.Combining Eq. (4.30) with the probability conserved equation P (r s , t; r s , 0) + P (r l , t; r s , 0) = 1, we can obtain the transition rates from the small to large and large to small black hole states, respectively.That is, k 1 = W 1 and k 2 = W 2 .
In Fig. 9, we have plotted the kinetic rates of state transitions between the small and large black hole states.It should be noted that although the steady probabilities of the small and large black hole states are determined by the values of their free energies, the transition rates between them are determined by the barrier heights in the free energy landscape.As the temperature increases, the transition rate from the small to large black hole state increases, while the transition rate from the large to small black hole state decreases.This is consistent with the change in the barrier height of the free energy with temperature shown in Fig. 8, where G m − G s decreases and G m − G l increases as the temperature increases.This indicates that the small black hole state needs to overcome a lower barrier height to switch to the large black hole state, resulting in an increased transition rate.On the other hand, the large black hole state needs to overcome a higher barrier height to switch to the small black hole state, resulting in a decreased transition rate.Additionally, when T = 0.15, both the small and large black hole states are globally stable with equal free energy basin depth, and the transition rates W 1 and W 2 are equal.For T < 0.15, the transition rate from the large to small black hole state is larger than that from the small to large black hole state, indicating that the system is finally dominated by the small black hole state.For T > 0.15, the transition rate from the small to large black hole state is larger than that from the large to small black hole state, indicating that the system is finally dominated by the large black hole state.If we gradually increase the temperature, the system will dynamically switch from being finally dominated by the small black hole state to being finally dominated by the large black hole state.This is a signature of the liquid-gas type phase transition for the dyonic AdS black hole in the phase diagram.

Conclusion and Discussion
In this paper, we have studied the generalized free energy and the dynamical state transition of the dyonic AdS black hole in the grand canonical ensemble.Considering the dyonic AdS black hole as a system in contact with a thermal and particle bath located at infinity, the temperature and the electric potential of the ensemble are external adjustable parameters.However, when we adjust them, the scalar curvature R and the electromagnetic gauge potential A µ are usually divergent.We provide two methods to deal with the divergences, and the reduced action is calculated to be the same for both methods.For the first method, we regularize them and incorporate the off-shell corrections into the Einstein-Hilbert action.Alternatively, we can also calculate the off-shell corrections by adding a boundary near the horizon to exclude the singularities on the horizon.Finally, the generalized free energy can be obtained from the reduced action using the Hawking-Gibbons gravitational path integral.The result is consistent with the thermodynamic definition and also provides a solid foundation for the recent studies on dynamical state transition [20][21][22][23][24][25][26][27][28][29][30][31][32][33] and black hole topology [35][36][37][38][39][40][41][42][43][44][45][46][47][48][49][50][51][52][53].
Based on the generalized free energy landscape, we consider the dynamical state transition of the dyonic AdS black hole in the grand canonical ensemble as a stochastic process quantified by the Langevin equation.Unlike previous studies in the canonical ensemble with only one order parameter, we treat the horizon radius and the electric charge as the order parameters in the grand canonical ensemble.As the order parameter increases, the framework in the grand canonical ensemble differs from that in the canonical ensemble because of the difficulty in solving differential equations with boundary-value conditions.Consequently, we switch the dynamics from the time-dependent Newtonian description to the energy-dependent Hamilton-Jacobi description, allowing us to obtain the dominant path Q(r) in the order parameter space with minimal action.We consider the state transition occurring along the dominant path Q(r), and the two-dimensional dynamics can be transformed into one-dimensional dynamics.Finally, we use the path integral framework to calculate the time-dependent dominant path r(t) and the rate of the state transition.The former shows how the process proceeds during the state transition, while the latter quantifies the time scale of the state transition.Moreover, we also derive the analytical expressions for the time evolution of the transition probabilities, which are found to be dependent on the transition rates between the small and large black hole states.These results are consistent with the qualitative analysis of the free energy landscape.Furthermore, because the time-independent dominant path in the order parameter space provided by the Hamilton-Jacobi description can always reduce the free order parameters to one dimension, our framework is applicable to ensembles with order parameters of arbitrary dimensions.
Finally, we discuss the applicability of our framework in the case of q M = 0.In this scenario, there are two black hole branches: the unstable small black hole and the stable large black hole.Moreover, the Hawking-Page phase transition can occur between the thermal AdS space and the stable large black hole.In our framework, we quantify the dynamics of state transition as a stochastic process described by the Langevin equation, with the driving force provided by the gradient of the generalized free energy.However, the generalized free energy is only defined for r h ≥ 0, and r h = 0 corresponds to the thermal AdS space state.Consequently, the driving force on the thermal AdS space state is not well-defined, and our framework cannot be applied when q M = 0. To overcome this limitation and ensure the applicability of our framework for q M = 0, further considerations are necessary to redefine the driving force on the thermal AdS space state.
Then, we will calculate I surf .The nonvanishing components of the induced metric h µν are given by In order to calculate K, we introduce the outpointing unit normal vector as r 2 , 0, 0).K can be calculated as By substituting Eq. (A.7) into Eq.(A.3), we can obtain Then, we calculate I count as ab R (3)ab = 2 R4 and finally abandoned all the inverse terms of R due to R → ∞.During the calculations, the Taylor expansion has been used as Finally, the Euclidean action can be calculated as

B Background subtraction
The metric g ′ µν of the AdS space takes the same form as Eq.(2.4), however, f (r) now becomes We should match the metric of the AdS space to that of the dyonic AdS black hole at a cutoff distance R, and we have This in turn gives the relationship between the time period β ′ of the AdS space and the time period β of the dyonic AdS black hole as ) )].
Finally, the Euclidean action can be calculated as where Eq. (B.3) is used to replace β ′ with β, and we should note that the lower limit of r in the integral of the even-dimensional AdS space is always 0 [63].In a word, we have obtained the same result with the method of "counterterm subtraction".
C A possible approach for calculating the off-shell corrections In the main body of the paper, we have calculated the off-shell corrections by regularizing the divergences of the Ricci scalar curvature R and the electromagnetic potential A µ at the horizon.Alternatively, we can also exclude some regions of spacetime near the horizon by adding a boundary near the horizon.Recalling the Euclidean path integral, Eq. (3.5) indicates that ρ = 0 corresponds to r = r h , which means that r takes values greater than or equal to the radius of the horizon.In the regular manifold with no singularity, the Euclidean section is bounded by the surface Σ + at infinity.However, our Euclidean section is singular at the horizon, and the boundary should be taken as Σ − near the horizon and Σ + at infinity.At first, we calculate the off-shell correction resulting from T ̸ = T H .After we add a boundary Σ − near the horizon, in order to have a well-defined action principle, we should where Σ 1 is a two-dimensional sphere near the horizon and h 1 is the induced metric on Σ 1 .
When we consider the variation of I c Σ 1 , we can find that I c Σ 1 does not contribute to the equations of motion for the gravitational field and electromagnetic field.Namely, this term will not affect the well-defined action principle.If we sum I c Σ − and I c Σ 1 for arbitrary β, the off-shell correction I cc in Eq. (3.15) will be recovered.
Then, we calculate the off-shell correction resulting from Φ E ̸ = Φ EH .Specifically, we add the boundary Σ − to exclude the singularity of A µ and impose the fixed electric charge condition on Σ − .It means another term is added to the Euclidean action as [70] Then, the boundary-related terms induced by the variation of the total action with respect to A µ are where h + and h − are the induced metrics on Σ + and Σ − , and n µ is the outward pointing unit normal vector for Σ + and inward pointing unit normal vector for Σ − .If we use the Maxwell equation, we can find that δ( h − F µν n µ ) is equivalent to δq E .Thus, Eq. (C.4) implies that the electric potential Φ E is fixed on Σ + , and the electric charge q E is fixed on Σ − .The calculations of I ce in Eq. (C.3) yields so the same result as Eq.(3.24) has been obtained.
In conclusion, we can obtain the same generalized free energy as Eq.(3.27) in the main body of the paper by adding a boundary near the horizon.

D A simple example for showing the different characteristic time scales
When the friction coefficient γ is very large, the inertia term can be neglected, regardless of the specific form of the driving force provided by the thermodynamic potential [71][72][73][74].Without loss of generality, we use the one-dimensional harmonic oscillator potential as a simple example to analyze the characteristic time scales of the variables.The deterministic part of the Langevin equation can be rewritten as: We will show that a large γ value leads to significantly different time scales for the relaxation of v in Eq. (D.1) and x in Eq. (D.2).At first, we can solve Eq. (D.1) and Eq.(D.2) for γ > 2, which yields (D.3) where and A 1 , A 2 are determined by the initial conditions.In Fig. 10, we have plotted x(t) and v(t) for different γ values.Both x(t) and v(t) eventually converge to a steady value of 0. As γ increases, the time for v to reach the steady value is shorter compared to x.When γ is very large, the characteristic time scales of v and x differ significantly, with v being the fast variable and x being the slow variable.

Figure 2 .
Figure 2. The generalized free energy landscape is plotted at P = 0.042, Φ E = 0.5 and q M = 0.1.We have truncated the free energy landscape at G = 0.16, and the portion where G > 0.16 is represented by G = 0.16 in the figure.The temperatures of the three subfigures are different, and they are T = 0.141, 0.15 and 0.16 from left to right.When T = 0.15, the two minima have equal depth in the well.

Figure 3 .
Figure3.The blue circles are the dominant path in the order parameter space obtained by the simulated annealing and conjugate gradient algorithm at P = 0.042, T = 0.15, Φ E = 0.5, and q M = 0.1.The three points marked by the red stars are the on-shell black holes with (r, Q) = (0.140, 0.070), (0.549, 0.275),(1.198,0.599).The red line represents the polynomial Q = h(r) in Eq. (4.14).

0587r 7 − 5 .1588r 6 + 10 .6026r 5 − 11 .Figure 4 .
Figure4.The one-dimensional effective potential is plotted with a blue line at P = 0.042, T = 0.15, Φ E = 0.5, and q M = 0.1.The three points marked by the red stars are the on-shell black holes, with radii r s , r m , and r from left to right.

Figure 5 .
Figure 5.Some sections of the time-dependent domain path r(t) are shown at P = 0.042, T = 0.15, Φ E = 0.5, and q M = 0.1.The left figure consists of many a pseudomolecules, while the right figure consists of many c pseudomolecules(or called antipseudomolecules). To demonstrate the formation of b pseudomolecule, one can combine the instanton trajectory from r s to r m in the a pseudomolecule with the instanton trajectory from r m to r l in the c pseudomolecule.Conversely, the d pseudomolecule is the time-reversed version of the b pseudomolecule.The domain path is composed of a sequence of a, b, c, and d pseudomolecules.

Figure 8
Figure 8.The temperature dependencies of the barrier heights in the free energy landscape are plotted at P = 0.042, Φ E = 0.5, and q M = 0.1.The blue line represents the barrier height G m − G s between the intermediate and the small black hole states, while the red line represents the barrier height G m − G l between the intermediate and the large black hole states.Except for the leftmost point with T = 0.141, the temperature interval between other points is 0.005.If the temperature goes beyond the range of the curve, there will not be three on-shell states, and the phase transition will no longer occur.Actually, this can be observed from the barrier heights, as they gradually approach zero at T = 0.141 and 0.215.This indicates that one on-shell black hole state will disappear.

(4. 31 )Figure 9 .
Figure 9.The kinetic rates of the state transitions between the small and large black hole states are plotted at P = 0.042, Φ E = 0.5, and q M = 0.1.Figure (a) on the left represents the transition rate from the small to large black holes, while figure (b) on the right represents the transition rate from the large to small black holes.The horizontal axis represents temperature, and the vertical coordinate represents the logarithm of the transition rate.Except for the leftmost point with T = 0.141, the temperature interval between other points is 0.005.
where K = h µν K µν = h µν ∇ µ n ν and n µ is the inward pointing unit normal vector for Σ − .If β = β H , the reduced action should recover the on-shell action I os .Therefore, another term I c Σ 1 needs to be added such thatI c Σ − + I c Σ 1 = 0 when β = β H .I cΣ 1 can be taken as