1 Introduction

In recent years, there has been a growing interest in the topic of “quantum complexity” which is defined as the minimum number of gates required to obtain a target state starting from a reference state [1, 2]. In the holographic viewpoint, Brown et al suggested that the quantum complexity of the state in the boundary theory corresponds to some bulk gravitational quantities which are called “holographic complexity”. Then, the two conjectures: “complexity equals volume” (CV) [1, 3] and “complexity equals action” (CA) [4, 5], were proposed. These conjectures have attracted many researchers to investigate the properties of both holographic complexity and circuit complexity in quantum field theory, e.g., [6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43].

We only focus on the CA conjecture, which states that the complexity of a particular state \(|\psi (t_L,t_R)\rangle \) on the AdS boundary is given by

$$\begin{aligned} \mathcal {C}\left( |\psi (t_L,t_R)\rangle \right) \equiv \frac{S}{\pi \hbar }, \end{aligned}$$
(1)

where S is the on-shell action in the corresponding Wheeler–DeWitt (WDW) patch, which is enclosed by the past and future light sheets sent into the bulk spacetime from the timeslices \(t_L\) and \(t_R\). In particular, it was found that there is a bound of the complexity growth rate at the late time

$$\begin{aligned} \dot{\mathcal {C}}\le \frac{2 M}{\pi \hbar }, \end{aligned}$$
(2)

which may be thought of as the Lloyd’s bound on the quantum complexity [44]. As presented previously, at late times, the rate of the complexity will saturate this bound. However, by the full-time analysis [14], we can see that this late time limit is approached from above, which will violate this bound.

Chapman et al. [45, 46] investigated the CA and CV conjectures for AdS-Vaidya spacetime which is sourced by the collapse of a spherically symmetric thin shell of null fluid [47,48,49]. They found that the standard definition of the WDW action is not appropriate for these dynamical spacetimes. In order to obtain an expected property of the complexity, we need to add a particular counterterm on the null boundaries. This counterterm also keeps the invariance under the reparametrization of the null generator on the null boundary. Moreover, they also demonstrated that the switchback effect for light shocks are imprinted in the complexity of formation and the full-time evolution of complexity when this counterterm is introduced.

In this paper, we follow the discussions in [45, 46] to investigate the holographic complexity for a charged AdS-Vaidya black hole which is sourced by an uncharged thin shell. This thin shell will generate a shape transition from a black hole with total mass \(M_1\) and charge Q to another one with mass \(M_2\) and same charge Q. With the approach proposed by Lehner et al. [11], we will evaluate the time evolution of complexity growth rate as well as the slope of the complexity of formation in the presence of the light and heavy shock wave. Using these results, we will argue that our results are also in agreement with the switchback effect for the light shock wave case.

The structure of this paper is as follows. In Sect. 2, we review the charged AdS-Vaidya background geometries. In Sect. 3, we first use the method proposed by Lehner et al. to calculate the complexity of formation as well as the action growth rate of the charged AdS-Vaidya black hole. Then, we investigate the action growth rate without the counterterm and compare our holographic results to the circuit behaviors. Concluding remarks are given in Sect. 4.

2 Charged AdS-Vaidya spacetime

In this paper, we consider the \((d+1)\)-dimensional Einstein–Maxwell gravity. Following the convention in Refs. [50, 51], the total action can be expressed as

$$\begin{aligned} S_\text {total}=S_\text {grav}+S_\text {E.M.}+S_\text {ct}+S_\text {fluid}. \end{aligned}$$
(3)

Here, the first two terms are the Einstein–Maxwell action which can be written as

$$\begin{aligned} \begin{aligned}&S_\text {grav}+S_\text {E.M.}\\&\quad =\frac{1}{16\pi G}\int _{\mathcal {M}} d^{d+1}x\sqrt{-g}\left[ (R-2\varLambda )-F_{ab}F^{ab}\right] \\&\qquad +\frac{1}{8\pi G}\int _{\mathcal {B}} d^dx\sqrt{|h|} K+\frac{1}{8\pi G}\int _{\varSigma }d^{d-1}x\sqrt{\gamma }\eta \\&\qquad +\frac{1}{8\pi G}\int _{\mathcal {B}'} d\lambda d^{d-1}\theta \sqrt{\gamma }\kappa +\frac{1}{8\pi G}\int _{\varSigma '}d^{d-1}x\sqrt{\gamma }a, \end{aligned} \end{aligned}$$
(4)

where this action includes not only the bulk action of the Einstein–Maxwell theory but the surface terms and corner terms as well. The third term is the counterterm for the null boundaries [11]. It can be expressed as

$$\begin{aligned} S_\text {ct}=\frac{1}{8\pi G}\int _{\mathcal {B}'} d\lambda d^{d-1}\theta \sqrt{\gamma }\varTheta \log \left( l_{ct}\varTheta \right) , \end{aligned}$$
(5)

where \(\varTheta =\partial _\lambda \ln \sqrt{\gamma }\) is the expansion scalar of the null surface generator, and \(l_\text {ct}\) is an arbitrary constant length scale. This counterterm is added to keep the invariance under the reparametrization of the null generator.

The last term in (3) is the null fluid action. In order to construct an uncharged null fluid collapse, following the discussion in [45], we can build the action by

$$\begin{aligned} S_{_\text {fluid}}=\int d^{d+1}x\sqrt{-g}\left( \lambda g_{ab}l^al^b+sl^a\nabla _a\phi \right) \end{aligned}$$
(6)

with some real tensor fields. According to the bulk action in (3), the equations of the motion can be expressed as

$$\begin{aligned} \begin{aligned} G_{ab}{-}\frac{2}{L^2}g_{ab}&=2 G \left( F_{ac}F_b{}^{c}{-}\frac{1}{4}F^2g_{ab}\right) +8\pi G T_{ab},\\ \nabla _aF^{ab}&=0, \end{aligned} \end{aligned}$$
(7)

with \(T_{ab}=2\lambda l_a l_b\) which is the on-shell stress tensor of the null fluid. One solution is the charged AdS-Vaidya spacetime whose line element is given by

$$\begin{aligned} ds^2=-F(r,v)dv^2+2dr dv +r^2d\varSigma ^2_{k,d-1} \end{aligned}$$
(8)

with the blackening factor

$$\begin{aligned} F(r,v)= & {} k+\frac{r^2}{L^2}-\frac{f_p(v)}{r^{d-2}}+\frac{q^2}{r^{2(d-2)}}. \end{aligned}$$
(9)

Moreover, the corresponding Maxwell field and null fluid can be described by

$$\begin{aligned} \begin{aligned} A_a&=\sqrt{\frac{d-1}{2(d-2)}}\left( \frac{q}{r_h^{d-2}} -\frac{q}{r^{d-2}}\right) (dv)_a,\\ \lambda&=\frac{(d-1)}{64\pi G}\frac{ f_p'(v)}{r^{d-1}},\\ l_a&=(dv)_a. \end{aligned} \end{aligned}$$
(10)

where \(r_h\) is the radius of the outer horizon. This solution describes a spacetime which is sourced by the collapse of an uncharged spherically symmetric shell of null fluid. In particular, when the width of the shell shrinks to zero, this scalar function can be written as

$$\begin{aligned} f_p(v)=w_1^{d-2}\left[ 1-\mathcal {H}(v-v_s)\right] +w_2^{d-2} \mathcal {H}(v-v_s), \end{aligned}$$
(11)

where \(\mathcal {H}(v)\) is the Heaviside step function. This function describes an infinitely thin shell collapse which generates a shape transition from a black hole with total mass \(M_1\) and charge Q to another one with mass \(M_2\) and same charge Q, in which

$$\begin{aligned} \begin{aligned} M_i&=\frac{(d-1)\varOmega _{k,d-1}}{16\pi G}\omega _i^{d-2},\\ Q&=\frac{\sqrt{2(d-1)(d-2)}\varOmega _{k,d-1}}{8\pi G}q, \end{aligned} \end{aligned}$$
(12)

where \(\varOmega _{k,d-1}\) denotes the volume of the corresponding spatial geometry.

3 Holographic complexity in charged AdS-Vaidya black hole

In this section, we turn to investigate the “complexity equals action” conjecture. Following the standard procedures, we focus on the change rate of the action in the WDW patch of the charged AdS-Vaidya black hole with an uncharged thin shell of null fluid collapse. In this case, the WDW patch can be divided into three regions: the stationary region before the collapse, the null shell with a finite width, and the stationary region after the collapse. As shown in [45], with the width of the shell shrinking to zero, the contributions from the null shell will vanish. Thus, the full action only depends on other two stationary regions. According to the line element (8), the on-shell bulk action can be expressed as

$$\begin{aligned} S_\text {bulk}=\frac{1}{16\pi G}\int _V d^{d+1}x \sqrt{-g}\left( -\frac{2 d}{L^2}+\frac{2(d-2)}{r^{2(d-1)}}q^2\right) .\nonumber \\ \end{aligned}$$
(13)

When the width of this shell shrinks to zero, the bulk metric can be described by (8) with (11). Then, the spacetime is divided into two regions by the null shell \(v=v_s\). And the blackening factor can be written as

$$\begin{aligned} v< & {} v_s: F(r,v)=f_1(r)=k+\frac{r^2}{L^2}-\frac{\omega _1^{d-2}}{r^{d-2}}+\frac{q^2}{r^{2(d-2)}},\nonumber \\ v> & {} v_s: F(r,v)=f_2(r)=k+\frac{r^2}{L^2}-\frac{\omega _2^{d-2}}{r^{d-2}}+\frac{q^2}{r^{2(d-2)}}.\nonumber \\ \end{aligned}$$
(14)

For the convenience of later calculations, we would like to introduce the tortoise coordinates as

$$\begin{aligned} v< & {} v_s:\ \ \ \ \ r_1^*(r)=-\int _r^\infty \frac{dr}{f_1(r)}, \end{aligned}$$
(15)
$$\begin{aligned} v> & {} v_s:\ \ \ \ \ r_2^*(r)=-\int _r^\infty \frac{dr}{f_2(r)}. \end{aligned}$$
(16)

We choose this range of integration to make that both expressions satisfy \(\lim _{r\rightarrow \infty }r^*_{1,2}(r)\rightarrow 0\). According to Ref. [14], with the blackening factors Eq. (14), one can obtain

$$\begin{aligned} \begin{aligned} r^*_i(r)&=\frac{\ln (|r-r_{+,i}|/r)}{g_i(r_{+,i})(r_{+,i}-r_{-,i})}{-}\frac{\ln (|r-r_{-,i}|/r)}{g_i(r_{-,i})(r_{+,i}-r_{-,i})}\\&\quad -\frac{1}{r_{+,i}-r_{-,i}}\int ^{\infty }_{r}G_i(r)dr, \end{aligned} \end{aligned}$$
(17)

where

$$\begin{aligned} \begin{aligned} g_i(r)&=\frac{f_i(r)}{(r-r_{+,i})(r-r_{-,i})},\\ G_i(r)&=\frac{g_i(r_{+,i})r-g_i(r)r_{+,i}}{g_i(r_{+,i})g_i(r)r(r-r_{+,i})}\\&\quad -\frac{g_i(r_{-,i})r-g_i(r)r_{-,i}}{g_i(r_{-,i})g_i(r)r(r-r_{-,i})} \end{aligned} \end{aligned}$$
(18)

with \(i=1,2\). Using these coordinates, one can also define an “outgoing” null coordinate u and auxiliary time coordinate t as

$$\begin{aligned} u_{i}\equiv v-2r^*_i(r),\ \ \ \ \ \ \ t_i\equiv v-r^*_i(r). \end{aligned}$$
(19)

Next, we apply these coordinates to label the null surface which crosses the null shell at the point \(r=r_w\). In the region \(v>-t_w\), this surface can be described by \(u_2=\bar{u}_2\). And in \(v<-t_w\), it becomes \(u_1=\bar{u}_1\). Since all of them cross the same point \((-t_w,r_w)\), we have

$$\begin{aligned} \bar{u}_2= & {} -t_w-2r^*_2(r_w), \end{aligned}$$
(20)
$$\begin{aligned} \bar{u}_1= & {} -t_w-2r^*_1(r_w). \end{aligned}$$
(21)

By performing an infinitesimal transformation \(\bar{u}_1\rightarrow \bar{u}_1+\delta \bar{u}_1\) to this null surface and using (20) and (21), one can further obtain

$$\begin{aligned} f_2(r_w) \delta \bar{u}_2=f_1(r_w) \delta \bar{u}_1. \end{aligned}$$
(22)

Then, we introduce four positions which are important in defining the WDW patch in our case. As shown in Figs. 1 and 2, \(r_b\) is where the left future boundary of the WDW patch meets the shock wave inside the future black hole, \(r_s\) is where the right past boundary of the WDW patch meets the shock wave out of the black hole; \(r_{1,2}\) is where the past/future null boundary segments of the WDW patch meet inside the horizon. In order to regulate the divergence near the AdS boundary, a cut-off surface \(r=r_{\varLambda }\) is introduced.

By using the tortoise coordinates, one can find that the coordinates \(r_s,r_b,r_1\) and \(r_2\) yield

$$\begin{aligned} \begin{aligned} t_w+2r_2^*(r_s)&=-t_R,\\ t_w+2r_1^*(r_b)&=t_L,\\ t_w+2r_1^*(r_s)&=t_L+2r_1^*(r_1),\\ t_w+2r_2^*(r_b)&=-t_R+2r_2^*(r_2).\\ \end{aligned} \end{aligned}$$
(23)

In what follows, we will use the methods in [11] to evaluate the derivative of the complexity of formation with respect to \(t_w\) as well as the growth rate of the complexity in the charged Vaidya spacetime.

First of all, we consider the additional complexity, commonly referred to the complexity of formation, comes from the comparison of two circuit complexities, one is from thermofield double state (TFD), the other is two unentangled copies of the vacuum state, i.e.,

$$\begin{aligned} \varDelta \mathcal {C}=\mathcal {C}(|TFD\rangle )-\mathcal {C}(|0\rangle _L\otimes |0\rangle _R). \end{aligned}$$
(24)

Using the CA conjecture, the holographic calculation is to evaluate the WDW action for \(t_L=t_R=0\) in the black hole and subtract that for two copies of the AdS vacuum geometry. Note that the complexity of the formation can be studied as a function of \(t_w\). In order to show the switchback effect, next, we consider the derivative of the complexity of formation with respect to \(t_w\) (the slop of the complexity of formation). Through the shift symmetry to the antisymmetric time evolution of the complexity, we have

$$\begin{aligned} \frac{d\varDelta S}{d t_w}=\left[ \frac{dS}{d t_R}-\frac{dS}{d t_L}\right] _{t_L=t_R=0}, \end{aligned}$$
(25)

where \(S=S(t_L,t_R)\) is denoted as the action for the WDW patch determined by the time slices on the left and right AdS boundaries [4, 5]. Thus, the key to evaluate the slope of the complexity of formation is to obtain the time derivative of the action with respect to \(t_R\) and \(t_L\).

Then, we consider the growth rate of the complexity with respect to a symmetric time \(t_L=t_R=t/2\). To evaluate this quantity, we turn attention to the change of the action which can be defined as

$$\begin{aligned} \delta S\equiv S(t_L+\delta t/2,t_R+\delta t/2)-S(t_L,t_R) \end{aligned}$$

in the WDW patch. Following the standard prescription proposed by Refs. [45, 46], we shall apply the affine parameter for null generator of null segments. As a consequence, the contributions from the corners at \(r_{s/b}\), as well as all of the null segments will vanish. For simplicity, we rewrite the change of the action as \(\delta S=\delta S_L+\delta S_R\), with

$$\begin{aligned} \delta S_L&=S(t_L+\delta t/2,t_R)-S(t_L,t_R), \end{aligned}$$
(26)
$$\begin{aligned} \delta S_R&=S(t_L,t_R+\delta t/2)-S(t_L,t_R). \end{aligned}$$
(27)

Therefore, in order to obtain the slope of the complexity of formation as well as the growth rate of the complexity, we need derive the change of the action \(\delta S_R\) and \(\delta S_L\).

Fig. 1
figure 1

The change of the Wheeler–DeWitt patches in a charged Vaidya-AdS black hole, where we fix the left boundary time \(t_L\) and vary \(t_R\) in the right boundary

3.1 The change of the action

3.1.1 \(\delta S_R\)

We first calculate \(\delta S_{R}\) where we fix the left boundary time \(t_L\) and vary \(t_R\) in the right boundary as shown in Fig. 1. Considering the local symmetries of this spacetime, the nonvanish terms are contributed by the regions \(\mathcal {M}_1\), \(\mathcal {M}_2\), \(\mathcal {M}_2'\), as well as the joints \(\mathcal {J}_{1}'\), \(\mathcal {J}_{1}\), \(\mathcal {J}_{2}'\), \(\mathcal {J}_{2}\). Then, we have

$$\begin{aligned} \begin{aligned} \delta S_R=S_{\mathcal {M}_2'}-S_{\mathcal {M}_2}+S_{\mathcal {J}_2'}-S_{\mathcal {J}_2} -S_{\mathcal {M}_1}+S_{\mathcal {J}_1'}-S_{\mathcal {J}_1}. \end{aligned} \end{aligned}$$

Here, \(\mathcal {M}_2\) is bounded by the null surfaces \(v=t_R\), \(v=-t_w\), \(u_2=t_R\) and \(u_2=t_R+\delta t_R\). \(\mathcal {M}_2'\) is bounded by \(u_2=t_R+\delta t_R,u_2=u_L\), \(v_2=t_R\) and \(v_2=t_R+\delta t_R\). And \(\mathcal {M}_1\) is bounded by \(v=-t_L\), \(v=-t_w\), \(u_1=\bar{u}_1\) and \(u_1=\bar{u}_1+\delta \bar{u}_1\) with

$$\begin{aligned} \begin{aligned} \delta \bar{u}_1=\frac{f_2(r_s)}{f_1(r_s)}\delta \bar{u}_2=\frac{f_2(r_s)}{f_1(r_s)}\delta t_R, \end{aligned} \end{aligned}$$
(28)

where we have used Eq. (22).

To evaluate the action contributed by \(\mathcal {M}_2'\), using the coordinate (vr) and keeping the first order of \(\delta t_R\), one can obtain

$$\begin{aligned} \begin{aligned} S_{\mathcal {M}_2'}&=\frac{\varOmega _{k,d-1}}{16\pi G}\int _{t_R}^{t_R+\delta t_R}dv\\&\quad \times \int _{\rho _2'(v)}^{\rho _2(v)}dr r^{d-1}\left( -\frac{2 d}{L^2}+\frac{2(d-2)}{r^{2(d-1)}}q^2\right) \\&=-\frac{\varOmega _{k,d-1}\delta t_R}{8\pi G}\left( \frac{r_\varLambda ^d}{L^2}-\frac{r_{2}^d}{L^2}+ \frac{q^2}{r_\varLambda ^{d-2}}-\frac{q^2}{r_{2}^{d-2}}\right) , \end{aligned} \end{aligned}$$
(29)

where \(r=\rho _2(v)\) is the solution of the equation \(u_2(v,r)=t_R+\delta t_R\) and \(r=\rho _2'(r)\) is the solution of the equation \(u_2(v,r)=u_L\). Similarly, with \((u_2,r)\) coordinates, we have

$$\begin{aligned} \begin{aligned} S_{\mathcal {M}_2}=-\frac{\varOmega _{k,d-1}\delta t_R}{8\pi G} \left( \frac{r_\varLambda ^d}{L^2}-\frac{r_{s}^d}{L^2}+\frac{q^2}{r_\varLambda ^{d-2}}-\frac{q^2}{r_{s}^{d-2}}\right) , \end{aligned} \end{aligned}$$
(30)

where \(r=\rho (u_2),r=\rho _s(u_2)\) are the solutions of the equation \(v(u_2,r)=t_R\) and \(v(u_2,r)=-t_w\), respectively. Let us turn to the bulk region \(\mathcal {M}_1\). With similar calculation, one can further obtain

$$\begin{aligned} \begin{aligned} S_{\mathcal {M}_1}=-\frac{\varOmega _{k,d-1}}{8\pi G}\delta \bar{u}_1\left( \frac{r_s^d}{L^2}-\frac{r_{1}^d}{L^2}+ \frac{q^2}{r_s^{d-2}}-\frac{q^2}{r_{1}^{d-2}}\right) \end{aligned} \end{aligned}$$
(31)

with \(\delta \bar{u}_1=\frac{f_2(r_s)}{f_1(r_s)}\delta t_R\). Combining these bulk contributions, we have

$$\begin{aligned} \begin{aligned}&S_{\mathcal {M}_2'}-S_{\mathcal {M}_2}-S_{\mathcal {M}_1}\\&\quad =-\frac{\varOmega _{k,d-1}\delta t_R}{8\pi G}\left\{ \left( 1-\frac{f_2(r_s)}{f_1(r_s)}\right) \frac{r_s^d}{L^2}-\frac{r_{2}^d}{L^2}+\frac{f_2(r_s)}{f_1(r_s)}\frac{r_{1}^d}{L^2}\right. \\&\qquad \left. +\left[ \left( 1-\frac{f_2(r_s)}{f_1(r_s)}\right) \frac{1}{r_s^{d-2}}-\frac{1}{r_{2}^{d-2}}+\frac{f_2(r_s)}{f_1(r_s)}\frac{1}{r_{1}^{d-2}}\right] q^2\right\} . \end{aligned} \end{aligned}$$

We next consider the contributions from the joints in the \(\delta S_R\). Using the expression of the corner term, one can obtain

$$\begin{aligned} S_{\mathcal {J}_{i}}= \frac{1}{8\pi G} \int _{\mathcal {J}_{i}}d^{d-1}x\sqrt{\gamma }\eta _{i} =\frac{\varOmega _{k,d-1}r_{i}^{d-1}}{8\pi G}\eta _{i}, \end{aligned}$$
(32)

where \(\mathcal {J}_{i}\in \{\mathcal {J}_{1,2}, \mathcal {J}_{1,2}'\}\) and \(r_{i}\in \{r_{1,2}, r_{1,2}'\}\). To obtain the corner parameter \(\eta _i\), we need define the generator of the null boundary of WDW patch with affine parameters. The relevant null normals to the past right null boundary can be defined as

$$\begin{aligned} k_a^p = \left\{ \begin{array}{lcl} \alpha \left( -(dv)_a+\frac{2}{f_2(r)}(dr)_a\right) \ \ \ \text {for} \ \ \ r>r_s \\ \tilde{\alpha } \left( -(dv)_a+\frac{2}{f_1(r)}(dr)_a\right) \ \ \ \text {for} \ \ \ r<r_s \end{array}. \right. \end{aligned}$$
(33)

For the future left null boundary, we have

$$\begin{aligned} k_a^f = \left\{ \begin{array}{lcl} \alpha \left( -(dv)_a+\frac{2}{f_1(r)}(dr)_a\right) \ \ \ \text {for} \ \ \ r>r_b \\ \hat{\alpha } \left( -(dv)_a+\frac{2}{f_2(r)}(dr)_a\right) \ \ \ \text {for} \ \ \ r<r_b \end{array}. \right. \end{aligned}$$
(34)

By demanding that the null boundary is affinely parameterized across the shock wave, we have [50]

$$\begin{aligned} \frac{\tilde{\alpha }}{\alpha }=\frac{f_1(r_s)}{f_2(r_s)}\ \ \ \text {and}\ \ \ \ \frac{\hat{\alpha }}{\alpha }=\frac{f_2(r_b)}{f_1(r_b)}. \end{aligned}$$
(35)

We can also introduce the null normal to the future right/past left null boundary,

$$\begin{aligned} k_a=\alpha (dv)_a. \end{aligned}$$
(36)

In what follows, we consider the contributions from \(\mathcal {J}_2,\mathcal {J}_2'\). Using \(\eta =\ln |\frac{1}{2}k_1\cdot k_2|\), one can obtain

$$\begin{aligned} \begin{aligned} \eta _2'&= -\ln \left( -\frac{f_2(r_2')f_1(r_b)}{\alpha ^2f_2(r_b)}\right) ,\\ \eta _2&= -\ln \left( -\frac{f_2(r_2)f_1(r_b)}{\alpha ^2f_2(r_b)}\right) . \end{aligned} \end{aligned}$$
(37)

Thus, we have

$$\begin{aligned} \begin{aligned}&S_{\mathcal {J}_2'}-S_{\mathcal {J}_2}\\&\quad =\frac{\varOmega _{k,d-1}r_{2}'^{d-1}}{8\pi G}\eta _{{}_{2}}'-\frac{\varOmega _{k,d-1}r_{2}^{d-1}}{8\pi G}\eta _{{}_{2}}\\&\quad =-\delta t_R\left[ \frac{\varOmega _{k,d-1}}{16\pi G}r_{2}^{d-1} f_2'(r_{2})\right. \\&\qquad \left. +\frac{\varOmega _{k,d-1}(d-1)}{16\pi G} r_{2}^{d-2} f_2(r_{2})\ln \left( -\frac{f_2(r_{2})f_1(r_b)}{\alpha ^2f_2(r_b)}\right) \right] , \end{aligned} \end{aligned}$$
(38)

where we have used

$$\begin{aligned} \delta r_2=r_2'-r_2=\frac{1}{2}f_2(r_2)\delta t_R, \end{aligned}$$
(39)

Then, we consider the contributions from \(\mathcal {J}_1,\mathcal {J}_1'\). Using the relations

$$\begin{aligned} \begin{aligned} \delta r_s&=-\frac{f_2(r_s)}{2}\delta t_R,\\ \delta r_1&=-\frac{f_1(r_1)}{2}\delta \bar{u}_1=-\frac{f_1(r_1)}{2}\frac{f_2(r_s)}{f_1(r_s)}\delta t_R, \end{aligned} \end{aligned}$$
(40)

and

$$\begin{aligned} \begin{aligned} \eta _1'&= -\ln \left( -\frac{f_1(r_1')f_2(r_s')}{\alpha ^2f_1(r_s')}\right) ,\\ \eta _1&= -\ln \left( -\frac{f_1(r_1)f_2(r_s)}{\alpha ^2f_1(r_s)}\right) , \end{aligned} \end{aligned}$$
(41)

one can obtain

$$\begin{aligned} \begin{aligned}&S_{\mathcal {J}_1'}-S_{\mathcal {J}_1}\\&\quad =\frac{\varOmega _{k,d-1}r_{1}'^{d-1}}{8\pi G}\eta _{{}_{1}}'-\frac{\varOmega _{k,d-1}r_{1}^{d-1}}{8\pi G}\eta _{{}_{1}}\\&\quad =\frac{\varOmega _{k,d-1}\delta t_R}{16\pi G}\left[ r_1^{d-1}\frac{f_2(r_s)f_1'(r_1)}{f_1(r_s)}\right. \\&\qquad \left. +(d-1)r_1^{d-2}\frac{f_2(r_s)f_1(r_1)}{f_1(r_s)}\ln \left( -\frac{f_1(r_1)f_2(r_s)}{\alpha ^2 f_1(r_s)}\right) \right] \\&\qquad +\frac{\varOmega _{k,d-1}\delta t_Rr_1^{d-1}}{16\pi G}\left( f_2'(r_s)-f_1'(r_s)\frac{f_2(r_s)}{f_1(r_s)}\right) . \end{aligned} \end{aligned}$$
(42)

Combining these expressions, we have

$$\begin{aligned} \begin{aligned} \delta S_R&=S_{\mathcal {M}_2'}-S_{\mathcal {M}_2}-S_{\mathcal {M}_1}+S_{\mathcal {J}_2'}-S_{\mathcal {J}_2}+S_{\mathcal {J}_1'}-S_{\mathcal {J}_1}\\&=-\frac{\varOmega _{k,d-1}}{16\pi G}\left\{ 2\left( 1-\frac{f_2(r_s)}{f_1(r_s)}\right) \left( \frac{r_s^d}{L^2}+\frac{q^2}{r_s^{d-2}}\right) \right. \\&\quad \left. +\left( d-2\right) \left( \omega _2^{d-2}-\frac{f_2(r_s)}{f_1(r_s)}\omega _1^{d-2}\right) \right\} \delta t_R\\&\quad -\frac{(d-1)\varOmega _{k,d-1}}{8\pi G}\left( \frac{f_2(r_s)}{f_1(r_s)}\frac{q^2}{r_1^{d-2}}-\frac{q^2}{r_2^{d-2}}\right) \delta t_R\\&\quad +\frac{\varOmega _{k,d-1}r_1^{d-1}}{16\pi G}\left( f_2'(r_s)-f_1'(r_s)\frac{f_2(r_s)}{f_1(r_s)}\right) \delta t_R\\&\quad -\frac{(d{-}1)\varOmega _{k,d{-}1}}{16\pi G}\left[ r_{2}^{d-2} f_2(r_{2})\ln \left( {-}\frac{f_2(r_{2})f_1(r_b)}{\alpha ^2f_2(r_b)}\right) \right. \\&\quad \left. -r_1^{d-2}\frac{f_2(r_s)f_1(r_1)}{f_1(r_s)}\ln \left( -\frac{f_1(r_1)f_2(r_s)}{\alpha ^2 f_1(r_s)}\right) \right] \delta t_R \end{aligned} \end{aligned}$$
(43)

3.1.2 \(\delta S_L\)

We turn to calculate \(\delta S_{L}\) where we fix the right boundary time \(t_R\) and vary \(t_L\) in left boundary as illustrated in Fig. 2. The nonvanish terms are contributed by the regions \(\mathcal {V}_1\), \(\mathcal {V}_2\), \(\mathcal {V}_2'\), as well as the joints \(\mathcal {C}_{1}'\), \(\mathcal {C}_{1}\), \(\mathcal {C}_{2}'\), \(\mathcal {C}_{2}\). Then, we have

$$\begin{aligned} \delta S_L=S_{\mathcal {V}_2'}+S_{\mathcal {V}_1'}-S_{\mathcal {V}_1}+S_{\mathcal {C}_2'} -S_{\mathcal {C}_2}+S_{\mathcal {C}_1'}-S_{\mathcal {C}_1}. \end{aligned}$$
(44)

Turning to the bulk contributions, with similar calculation, one can obtain

$$\begin{aligned} \begin{aligned} S_{\mathcal {V}_1'}&=-\frac{\varOmega _{k,d-1}\delta t_L}{8\pi G}\left( \frac{r_\varLambda ^d}{L^2}-\frac{r_b^d}{L^2}+\frac{q^2}{r_\varLambda ^{d-2}}-\frac{q^2}{r_b^{d-2}}\right) ,\\ S_{\mathcal {V}_1}&=-\frac{\varOmega _{k,d-1}\delta t_L}{8\pi G}\left( \frac{r_\varLambda ^d}{L^2}-\frac{r_1^d}{L^2}+\frac{q^2}{r_\varLambda ^{d-2}}-\frac{q^2}{r_1^{d-2}}\right) ,\\ S_{\mathcal {V}_2'}&=-\frac{\varOmega _{k,d-1}\delta t_L}{8\pi G}\frac{f_1(r_b)}{f_2(r_b)}\left( \frac{2r_b^d}{L^2}-\frac{2r_2^d}{L^2}+\frac{q^2}{r_b^{d-2}}-\frac{q^2}{r_2^{d-2}}\right) . \end{aligned} \end{aligned}$$

Using the relations

$$\begin{aligned} \delta r_b = \frac{f_1(r_b)}{2}\delta t_L,\ \ \ \delta r_2 =\frac{f_2(r_2)}{2}\frac{f_1(r_b)}{f_2(r_b)}\delta t_L, \end{aligned}$$
(45)

the corner terms which are contributed by the joints \(\mathcal {C}_1'\) ,\(\mathcal {C}_1\), \(\mathcal {C}_2'\) and \(\mathcal {C}_2\) can be expressed as

$$\begin{aligned} \begin{aligned} S_{\mathcal {C}_1'}{-}S_{\mathcal {C}_1}&{=}\frac{\varOmega _{k,d-1}\delta t_L}{16\pi G}\left[ r_1^{d{-}1}f_1'(r_1)\right. \\&\quad \left. +(d{-}1)r_1^{d-2}f_1(r_1)\ln \left( {-}\frac{f_1(r_1)f_2(r_s)}{\alpha ^2 f_1(r_s)}\right) \right] \\ S_{\mathcal {C}_2'}{-}S_{\mathcal {C}_2}&{=}-\frac{\varOmega _{k,d-1}\delta t_L}{16\pi G}\frac{f_1(r_b)}{f_2(r_b)}\left[ r_2^{d-1}f_2'(r_2)\right. \\&\quad \left. +(d{-}1)r_2^{d-2}f_2(r_2)\ln \left( {-}\frac{f_2(r_2)f_1(r_b)}{\alpha ^2 f_2(r_b)}\right) \right] \\&\quad -\frac{\varOmega _{k,d{-}1}\delta t_Lr_1^{d{-}1}}{16\pi G}\left( f_1'(r_b)-f_2'(r_b)\frac{f_1(r_b)}{f_2(r_b)}\right) , \end{aligned} \end{aligned}$$
(46)

Combining these expressions, we have

$$\begin{aligned} \begin{aligned} \delta S_L&=\frac{\varOmega _{k,d-1}}{16\pi G}\left[ 2\left( 1-\frac{f_1(r_b)}{f_2(r_b)}\right) \left( \frac{r_b^d}{L^2}+\frac{q^2}{r_b^{d-2}}\right) \right. \\&\quad \left. +\left( d-2\right) \left( \omega _1^{d-2}-\frac{f_1(r_b)}{f_2(r_b)}\omega _2^{d-2}\right) \right] \delta t_L\\&\quad +\frac{(d-1)\varOmega _{k,d-1}}{8\pi G}\left( \frac{f_1(r_b)}{f_2(r_b)}\frac{q^2}{r_2^{d-2}}-\frac{q^2}{r_1^{d-2}}\right) \delta t_L\\&\quad -\frac{\varOmega _{k,d-1}r_2^{d-1}}{16\pi G}\left( f_1'(r_b)-f_2'(r_b)\frac{f_1(r_b)}{f_2(r_b)}\right) \delta t_L\\&\quad +\frac{(d{-}1)\varOmega _{k,d-1}}{16\pi G}\left[ r_1^{d{-}2} f_1(r_1)\ln \left( -\frac{f_1(r_1)f_2(r_s)}{\alpha ^2f_1(r_s)}\right) \right. \\&\quad \left. -r_2^{d-2}\frac{f_1(r_b)f_2(r_2)}{f_2(r_b)}\ln \left( -\frac{f_2(r_2)f_1(r_b)}{\alpha ^2 f_2(r_b)}\right) \right] \delta t_L. \end{aligned} \end{aligned}$$
(47)

3.1.3 Counterterm contributions

Fig. 2
figure 2

The change of the Wheeler–DeWitt patches in a charged Vaidya-AdS black hole, where we fix the right boundary time \(t_R\) and vary \(t_L\) in the left boundary

In this subsection, we calculate the contributions from the counterterm as mentioned above. In our case, we need to consider the contributions from all of the null boundaries of the WDW patch. First, we consider the past null boundary on the right side of the WDW patch. As illustrated in Fig. 2, this boundary crosses the shock wave at \(r=r_s\). From Eq. (33), the null normal of this null surface can be re-expressed by

$$\begin{aligned} k^p_a=H(r,v)\left( -(dv)_a+\frac{2}{F(r,v)}(dr)_a\right) \end{aligned}$$
(48)

with affine parameters, where we denote

$$\begin{aligned} H(r,v)=\alpha \mathcal {H}(r-r_s)+\tilde{\alpha }\left( r-r_s\right) . \end{aligned}$$
(49)

Due to \(k^a=\left( \frac{\partial }{\partial \lambda }\right) ^a\), one can obtain \(dr/d\lambda =H(r,v)\). Using the expression \( \varTheta =k^a\nabla _a \ln \sqrt{\gamma }, \) the expansion scalar of this null surface generators can be further expressed by

$$\begin{aligned} \varTheta =\frac{(d-1)H(r,v)}{r}. \end{aligned}$$
(50)

Whence, the counterterm contribution for the past null boundary on the right side can be written as

$$\begin{aligned} \begin{aligned} S_\text {ct}^{(1)}&{=}\frac{\varOmega _{k,d-1}(d{-}1)}{8\pi G}\int _{r_1}^{r_\varLambda }dr\,r^{d{-}2}\ln \left( \frac{(d{-}1)l_{ct}H(r,v)}{r}\right) \\&=\frac{\varOmega _{k,d-1}}{8\pi G}\left[ r_{\varLambda }^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_{\varLambda }}\right) \right. \\&\quad \left. -r_1^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_1}\right) +\frac{r_\varLambda ^{d-1}-r_1^{d-1}}{d-1}\right] \\&\quad +\frac{\varOmega _{k,d-1}}{8\pi G}\left( r_s^{d-1}-r_1^{d-1}\right) \ln \left( \frac{f_1(r_s)}{f_2(r_s)}\right) . \end{aligned} \end{aligned}$$
(51)

where we replaced \(d\lambda =dr/H(r,v)\). Next, we consider the left future boundary of the WDW patch. By replacing \(r_s, r_1\) with \(r_b,r_2\) respectively, the corresponding conterterm can be further obtained

$$\begin{aligned} \begin{aligned} S_\text {ct}^{(2)}&=\frac{\varOmega _{k,d-1}}{8\pi G}\left[ r_{\varLambda }^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_{\varLambda }}\right) \right. \\&\quad \left. -r_2^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_2}\right) +\frac{r_\varLambda ^{d-1}-r_2^{d-1}}{d-1}\right] \\&\quad +\frac{\varOmega _{k,d-1}}{8\pi G}\left( r_b^{d-1}-r_2^{d-1}\right) \ln \left( \frac{f_2(r_b)}{f_1(r_b)}\right) . \end{aligned} \end{aligned}$$
(52)

With similar calculation, counterterm contributions of the past boundary on the left side and the future boundary on the right can be expressed as

$$\begin{aligned} \begin{aligned} S_\text {ct}^{(3)}&=\frac{\varOmega _{k,d-1}}{8\pi G}\left[ r_{\varLambda }^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_{\varLambda }}\right) \right. \\&\quad \left. -r_{1}^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_{1}}\right) +\frac{r_\varLambda ^{d-1}-r_1^{d-1}}{d-1}\right] .\\ S_\text {ct}^{(4)}&=\frac{\varOmega _{k,d-1}}{8\pi G}\left[ r_{\varLambda }^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_{\varLambda }}\right) \right. \\&\quad \left. -r_{2}^{d-1}\ln \left( \frac{(d-1)\alpha l_{ct}}{r_2}\right) +\frac{r_\varLambda ^{d-1}-r_2^{d-1}}{d-1}\right] . \end{aligned} \end{aligned}$$
(53)

Then, we consider the change of the action where we fix the right boundary time \(t_R\) and vary \(t_L\) in the left boundary. Using (39) and (40), one can obtain

$$\begin{aligned} \begin{aligned} \delta S_\text {ctR}&=\frac{(d-1)\varOmega _{k,d-1}}{16\pi G}\left\{ r_1^{d-2}f_1(r_1)\frac{f_2(r_s)}{f_1(r_s)}\ln \left( \frac{f_1(r_s)}{f_2(r_s)}\right) \right. \\&\quad +2r_1^{d-2}f_1(r_1)\frac{f_2(r_s)}{f_1(r_s)}\ln \left( \frac{(d-1)\alpha l_{ct} }{r_1}\right) \\&\quad -r_2^{d{-}2}f_2(r_2)\left[ \ln \left( \frac{f_2(r_b)}{f_1(r_b)}\right) {+}2\ln \left( \frac{(d{-}1)\alpha l_{ct}}{r_2}\right) \right] \\&\quad \left. -r_s^{d-2}f_2(r_s)\ln \left( \frac{f_1(r_s)}{f_2(r_s)}\right) \right\} \delta t_R\\&\quad +\left( r_1^{d{-}1}{-}r_s^{d{-}1}\right) \frac{\varOmega _{k,d-1}}{16\pi G}\left[ \frac{f_2(r_s)f_1'(r_s)}{f_1(r_s)}{-}f_2'(r_s)\right] \delta t_R. \end{aligned} \end{aligned}$$
(54)

When we fix the left boundary time \(t_L\) and vary \(t_R\), the corresponding change of the action can be shown as

$$\begin{aligned} \begin{aligned} \delta S_\text {ctL}&=\frac{(1-d)\varOmega _{k,d-1}}{16\pi G}\left\{ r_2^{d-2}f_2(r_2)\frac{f_1(r_b)}{f_2(r_b)}\ln \left( \frac{f_2(r_b)}{f_1(r_b)}\right) \right. \\&\quad +2r_2^{d-2}f_2(r_2)\frac{f_1(r_b)}{f_2(r_b)}\ln \left( \frac{(d-1)\alpha l_{ct} }{r_2}\right) \\&\quad -r_1^{d{-}2}f_1(r_1)\left[ \ln \left( \frac{f_1(r_s)}{f_2(r_s)}\right) {+}2\ln \left( \frac{(d{-}1)\alpha l_{ct}}{r_1}\right) \right] \\&\quad \left. -r_b^{d-2}f_1(r_b)\ln \left( \frac{f_2(r_b)}{f_1(r_b)}\right) \right\} \delta t_L\\&\quad -\left( r_2^{d{-}1}{-}r_b^{d{-}1}\right) \frac{\varOmega _{k,d{-}1}}{16\pi G}\left[ \frac{f_1(r_b)f_2'(r_b)}{f_2(r_b)}{-}f_1'(r_b)\right] \delta t_L. \end{aligned} \end{aligned}$$
(55)
Fig. 3
figure 3

The derivative of the complexity of formation with respect to \(t_w\). The left panel illustrates the behaviour for a light shock wave, with \(d=3, k=0, l_\text {ct}=1, L=1,q=0.6,\omega _1=1\), where the dishes lines describe the corresponding scrambling time \(t=t^*_\text {scr}\). The right panel illustrates the behaviour for the heavy shock wave with \(d=3, k=0, l_\text {ct}=1, L=1,\omega _1=1,w_2=2\)

3.2 Complexity of Formation

In this subsection, we consider the complexity of formation. By using Eqs. (25), (43), (47), (54), and (55), one can obtain

$$\begin{aligned} \begin{aligned}&\frac{32\pi G}{{(d-1)}\varOmega _{k,d-1}}\frac{d\varDelta S}{d t_w}\\&\quad =2\left( \frac{q^2}{r_2^{d-2}}+\frac{q^2}{r_1^{d-2}}-\frac{q^2}{r_b^{d-2}}-\frac{q^2}{r_s^{d-2}}\right) \\&\qquad -2\frac{f_1(r_b)}{f_2(r_b)}\left( \frac{q^2}{r_2^{d{-}2}}{-}\frac{q^2}{r_b^{d{-}2}}\right) {-}2\frac{f_2(r_s)}{f_1(r_s)}\left( \frac{q^2}{r_1^{d-2}}{-}\frac{q^2}{r_s^{d{-}2}}\right) \\&\qquad -\left[ r_b^{d{-}2}f_1(r_b)\ln \left( \frac{f_2(r_b)}{f_1(r_b)}\right) {+}r_s^{d{-}2}f_2(r_s)\ln \left( \frac{f_1(r_s)}{f_2(r_s)}\right) \right] \\&\qquad +r_1^{d-2}f_1(r_1)\left( \frac{f_2(r_s)}{f_1(r_s)}-1\right) \ln \left( -\frac{(d-1)^2l_{ct}^2f_1(r_1)}{r_1^2}\right) \\&\qquad -r_2^{d-2}f_2(r_2)\left( 1-\frac{f_1(r_b)}{f_2(r_b)}\right) \ln \left( -\frac{(d-1)^2l_{ct}^2f_2(r_2)}{r_2^2}\right) . \end{aligned} \end{aligned}$$

Using Eqs. (17) and (23), the slope of the complexity of formation can be directly evaluated. In the left panel of Fig. 3, we show the effect of a light shock wave on the slope of the complexity of formation as a function of \(t_w\). As shown in this figure, one can find that there exists a scrambling time \(t_{\text {scr}}^*\) which is characterized by the energy of the shock wave \(\delta \omega =\omega _2-\omega _1\). And the slope is approximately zero until the \(t\simeq t_{\text {scr}}^*\) at which point it rapidly rises to the final constant value. This implies that for the order of the scrambling time \(t_{\text {scr}}^*\), the complexity of formation is same as the case of unperturbed state. In the regime of \(t_w>t_{\text {scr}}^*\), it grows linearly with respect to the time \(t_w\). This shares the similar behavior with the uncharged black hole in [46]. And it is also in agreement with the switchback effect which we will discuss in Sect. 3.5.

In the right panel of Fig. 3, we show the effect of heavier shock waves. In this regime, the slope starts at a finite value and suddenly drop to a minimal value, after that, it rapidly rises to the final constant value. It implies that the complexity of formation starts changing immediately and rapidly approach a regime of linear growth with increasing \(t_w\). This is very different with the light shock wave case.

Now, we would like to analytically investigate the behaviour of these figures in the case of the light shock wave with \(\frac{\omega ^{d-2}_2}{\omega _1^{d-2}}=1+2\epsilon \). In order to find the scrambling time for the light shock wave, we consider the limit where the shock wave enters at very early time, i.e., \(t_w\gg 1\). According to Eq. (17), one can obtain

$$\begin{aligned} r_s/r_+\approx 1+e^{-8\pi T_1 t_w},\ \ r_b/r_+\approx 1-e^{-8\pi T_1 t_w}. \end{aligned}$$
(56)

In this limit, there are two interesting regimes: \(\epsilon \ll e^{-8\pi T_1 t_w}\) and \(\epsilon \gg e^{-8\pi T_1 t_w}\). Then, the scrambling time \(t_\text {scr}=-\frac{1}{8\pi T_1}\ln \epsilon \) is determined by the transition condition \(\epsilon \approx e^{-8\pi T_1 t_w}\).

3.2.1 Large and small time behaviors

According to these figures, one can see that there exist two interesting regimes: \(t_w\ll t_{\text {scr}}^*\) and \(t_w\gg t_{\text {scr}}^*\), i.e., the small and large limit of \(t_w\). First, we consider the small time limit. In this limit, we have \(t_w\rightarrow 0\), which will give \(r_s\rightarrow \infty \) and \(r_b,r_1,r_2\rightarrow r_m\), where \(r_m\) is determinate by \(r_1^*(r_m)=0\). Then, we have

$$\begin{aligned} \begin{aligned}&\frac{32\pi G}{{(d-1)}\varOmega _{k,d-1}}\left. \frac{d\varDelta S}{d t_w}\right| _{t_w\rightarrow 0^+}\\&\quad =\omega _1^{d-2}{-}\omega _2^{d-2} {-}r_m^{d-2}f_2(r_m)\ln \left( {-}\frac{(d-1)^2f_2(r_m)l_{ct}^2}{r_m^2}\right) \\&\qquad +r_m^{d-2}f_1(r_m)\ln \left( -\frac{(d-1)^2f_1(r_m)l_{ct}^2}{r_m^2}\right) , \end{aligned} \end{aligned}$$
(57)

In the limit of the light shock wave, we have \(\omega _2\simeq \omega _1\). Then, the slope will approach zero, which is in agreement with the behavior as illustrated in the left panel of Fig. 3.

Then, we consider the small charge limit \(q\rightarrow 0\) under the heavy shock wave case at \(t_w=0\). For simplicity, here we focus on the 4-dimensional planar black hole, i.e., \(d=3, k=0 ,l_{ct}=0\). According to Eq. (17), we can obtain \(r_m=r_{-,1}\). Then, we have

$$\begin{aligned} \begin{aligned}&\frac{16\pi G}{{(d-1)}\varOmega _{0,2}}\left. \frac{d\varDelta S}{d t_w}\right| _{t_w\rightarrow 0^+}\\&\quad =-\delta m-r_{-,1}f_2(r_{-,1})\ln \left( -\frac{4f_2(r_{-,1})l_{ct}^2}{r_{-,1}^2}\right) \\&\quad \approx \delta m\left[ \ln \left( 4l_{ct}^2\delta m \omega _1^3\right) -1-6 \ln q\right] +\mathcal {O}(q). \end{aligned} \end{aligned}$$
(58)

This equation illustrates that the complexity of formation at \(t_w=0\) is divergent under the limit \(q\rightarrow 0\), which implies that, for the complexity of formation, the result of the uncharged case can not be obtained by setting \(q\rightarrow 0\) from the charged case. However, as is shown in Fig. 4, we can see that the smaller of the charge q, the shorter of time \(t_w\) dropping the minimal value, which means that this divergent peak only exists at \(t=0\) under the limit \(q\rightarrow 0\).

Fig. 4
figure 4

The complexity of formation with respect to \(t_w\) for the small time region with some small charges, where we set \(d=3, k=0, l_\text {ct}=1, L=1,\omega _1=1,\omega _2=2\)

Fig. 5
figure 5

The action growth rate for the light shock wave with the symmetric time evolution as \(t_L=t_R=t/2\) with \(t_w=5\) (left) and \(t_w=14\) (right). We have set \(d=3, k=0, l_\text {ct}=1, L=1,q=0.6,\omega _1=1,\omega _2=1+10^{-4}\)

Next, we consider the large time limit \(t_w\rightarrow \infty \). In this limit, \(r_s\) and \(r_b\) approach \(r_{+,2}\) and \(r_{+,1}\) respectively. With these in mind, we have

$$\begin{aligned} \begin{aligned}&\frac{32\pi G}{{(d-1)}\varOmega _{k,d-1}}\left. \frac{d\varDelta S}{d t_w}\right| _{t_w\rightarrow \infty }\\&\quad =\left. 2\left( \frac{q^2}{r_2^{d-2}}+\frac{q^2}{r_1^{d-2}}-\frac{q^2}{r_{+,1}^{d-2}}-\frac{q^2}{r_{+,2}^{d-2}}\right) \right. \\&\qquad -r_1^{d-2}f_1(r_1)\ln \left( -\frac{(d-1)^2l_{ct}^2f_1(r_1)}{r_1^2}\right) \\&\qquad \left. -r_2^{d-2}f_2(r_2)\ln \left( -\frac{(d-1)^2l_{ct}^2f_2(r_2)}{r_2^2}\right) \right. , \end{aligned} \end{aligned}$$
(59)

In limit of the light shock wave, by replacing the label 2 to 1, we can further obtain

$$\begin{aligned} \begin{aligned}&\frac{32\pi G}{{(d-1)}\varOmega _{k,d-1}}\left. \frac{d\varDelta S}{d t_w}\right| _{t_w\rightarrow \infty }\\&\quad =4\left( \frac{q^2}{r_m^{d-2}}-\frac{q^2}{r_{+}^{d-2}}\right) \\&\qquad -2r_m^{d-2}f(r_m)\ln \left( -\frac{(d-1)^2l_{ct}^2f(r_m)}{r_m^2}\right) . \end{aligned} \end{aligned}$$
(60)

Here, we also used the relation \(r_1=r_2=r_m\) under the light shock wave limit.

3.3 Time evolution of the complexity

In this subsection, we consider the time evolution of the holographic complexity. By summing the various expressions above, the actiom growth rate with the counterterm can be written as

$$\begin{aligned} \begin{aligned}&\frac{32\pi G}{{(d-1)}\varOmega _{k,d-1}}\frac{d S}{d t}\\&\quad =2\left( \frac{q^2}{r_2^{d-2}}-\frac{q^2}{r_1^{d-2}}+\frac{q^2}{r_b^{d-2}}-\frac{q^2}{r_s^{d-2}}\right) \\&\qquad +2\frac{f_1(r_b)}{f_2(r_b)}\left( \frac{q^2}{r_2^{d{-}2}}{-}\frac{q^2}{r_b^{d{-}2}}\right) {-}2\frac{f_2(r_s)}{f_1(r_s)}\left( \frac{q^2}{r_1^{d-2}}{-}\frac{q^2}{r_s^{d-2}}\right) \\&\qquad +\left[ r_b^{d{-}2}f_1(r_b)\ln \left( \frac{f_2(r_b)}{f_1(r_b)}\right) {-}r_s^{d{-}2}f_2(r_s)\ln \left( \frac{f_1(r_s)}{f_2(r_s)}\right) \right] \\&\qquad +r_1^{d-2}f_1(r_1)\left( 1+\frac{f_2(r_s)}{f_1(r_s)}\right) \ln \left( -\frac{(d-1)^2l_{ct}^2f_1(r_1)}{r_1^2}\right) \\&\qquad -r_2^{d-2}f_2(r_2)\left( 1+\frac{f_1(r_b)}{f_2(r_b)}\right) \ln \left( -\frac{(d-1)^2l_{ct}^2f_2(r_2)}{r_2^2}\right) .\\ \end{aligned} \end{aligned}$$

Under the limit of the light shock wave, the time dependent action growth rate will return to that of the eternal RN black hole [14].

Considering Eqs. (17) and (23), we can numerically calculate the action growth rate in Eq. (61). Then, we show the action growth rate as the function of t for the light and heavy shock wave in Figs. 5 and 6 separately. In these figures, we can see that the action growth rate develops a minimum or maximum at some finite time in very small charge case. These minimum or maximum becomes deeper and sharper for smaller charges. Therefore, the behaviors for the charged cases can smoothly approach that of the neutral cases. And the minimum or maximum is corresponding to the critical time in uncharged black hole [46].

Fig. 6
figure 6

The action growth rate for the heavy shock waves with the symmetric time evolution as \(t_L=t_R=t/2\), where we set \(d=3, k=0, l_\text {ct}=1, L=1,\omega _1=1,\omega _2=2\), and \(t_w=5\). Here \(q=0.687\) is a special case where the initial black hole is a extremal black hole

In the left panel of Fig. 5, we show the action growth rate for a very light shock wave with \(\delta \omega =\omega _2-\omega _1=10^{-4}\) at \(t_w=5\). These figures show the same pictures with that of the internal RN black hole, which can be understood by the switch back effect since \(t_w=5<t_\text {scr}^*\) in this case. In the right panel, we show the growth rate at \(t_w=14\) such that \(t_w>t^*_\text {scr}\). After the scrambling time, the action of the light shock wave will be clearly illustrated. Therefore, in this case, it will share the similar behaviours with the case of heavy shock wave as shown in Fig. 6. Moreover, for the small charge case, a minimum value of the action growth rate appears at a finite time. Under the uncharged limit, this minimum point will reduce to the critical time in the neutral case as shown in Fig. 2 of Ref. [46].

In Fig. 6, we show the action growth rate for a heavier shock wave with \(\delta \omega =1\) at \(t_w=5\). We can see that there might exist two critical times under the uncharged limit, which will coincide with the neutral case for the heavier shock wave in Fig.3 of Ref. [46]. In addition, as shown in Fig. 6, for the non-extremal case, there exists at least two horizontal periods, in which the rate can be regarded as constant. However, for the extremal case, there only exists one horizontal period, i.e., the late time period.

3.3.1 Early and late time behaviors

Here, we consider some simple limits for the growth rate of the complexity. First, we begin by examining the early time behavior, where \(t_w\) is sufficiently large. Then \(r_s\) approaches \(r_{+,2}\) and \(r_b\) approach \(r_{+,1}\). Then, the growth rate of the complexity becomes

$$\begin{aligned} \begin{aligned}&\frac{32\pi G}{{(d-1)}\varOmega _{k,d-1}}\left. \frac{d S}{d t}\right| _{t_w\rightarrow \infty }\\&\quad =2\left( \frac{q^2}{r_2^{d-2}}-\frac{q^2}{r_1^{d-2}}+\frac{q^2}{r_{+,1}^{d-2}}-\frac{q^2}{r_{+,2}^{d-2}}\right) \\&\qquad +r_1^{d-2}f_1(r_1)\ln \left( -\frac{(d-1)^2l_{ct}^2f_1(r_1)}{r_1^2}\right) \\&\qquad -r_2^{d-2}f_2(r_2)\ln \left( -\frac{(d-1)^2l_{ct}^2f_2(r_2)}{r_2^2}\right) . \end{aligned} \end{aligned}$$
(61)

One can find that this limit depends on the value of the times \(t_R\) and \(t_L\), which is different from the uncharged case where this limit is simply proportional to the difference of the masses.

Next, we consider the late time behaviors. In the late time limit, the points \(r_b, r_s ,r_1\) and \(r_2\) approach to \(r_{-,1}\),\(r_{+,2}\),\(r_{+,1}\) and \(r_{-,2}\) respectively. As a consequence, we have \(f_1(r_b), f_1(r_1), f_2(r_s), f_2(r_2)\rightarrow 0 \). Using these expressions, the action growth rate can be written as

$$\begin{aligned} \begin{aligned}&\frac{32\pi G}{{(d-1)}\varOmega _{k,d-1}}\left. \frac{dS}{dt}\right| _{t\rightarrow \infty }\\&\quad =2\left( \frac{q^2}{r_{-,1}^{d-2}}-\frac{q^2}{r_{+,1}^{d-2}} +\frac{q^2}{r_{-,2}^{d-2}}-\frac{q^2}{r_{+,2}^{d-2}}\right) . \end{aligned} \end{aligned}$$
(62)

The late time rate is proportional to the average value of the two eternal RN-AdS rate without shockwave with parameter 1 and 2. It would be convenient to work in terms of the following dimensionless quantities:

$$\begin{aligned} \begin{aligned}&y=\frac{r_{-,2}}{r_{+,2}},\ \ \ \ \ \alpha =\frac{r_{+,2}}{r_{+,1}}, \ \ \ \ \ \beta =\frac{r_{-,1}}{r_{-,2}},\\&z=\frac{L}{r_{+,2}},\ \ \ \ \ x=\frac{r}{r_{+,1}}. \end{aligned} \end{aligned}$$
(63)

Using the black hole mass and these dimensionless quantities, according to (62), one can obtain

$$\begin{aligned} \left. \frac{dC_A}{dt}\right| _{t\rightarrow \infty }=\frac{\varLambda _1M_1+\varLambda _2M_2}{\pi } \end{aligned}$$
(64)

with

$$\begin{aligned} \varLambda _1= & {} \frac{\left( 1-y_1^{d-2}\right) \left[ \left( 1-y_1^d\right) +k z_1^2\left( 1-y_1^{d-2}\right) \right] }{\left( 1-y_1^{2(d-1)}\right) +kz_1^2\left( 1-y_1^{2(d-2)}\right) }, \end{aligned}$$
(65)
$$\begin{aligned} \varLambda _2= & {} \frac{\left( 1-y^{d-2}\right) \left[ \left( 1-y^d\right) +k z^2\left( 1-y^{d-2}\right) \right] }{\left( 1-y^{2(d-1)}\right) +kz^2\left( 1-y^{2(d-2)}\right) }, \end{aligned}$$
(66)

in which

$$\begin{aligned} y_1=\frac{r_{-,1}}{r_{+,1}}=\alpha \,\beta \, y,\ \ \ \ \ z_1=\frac{L}{r_{+,1}}=\alpha \, z. \end{aligned}$$
(67)

In these variables, when we set \(\omega _2\rightarrow \omega _1\), i.e., \(\alpha ,\beta \rightarrow 1\), this result will return to the case with the light shock wave. Meanwhile, it is also equal to the value of the eternal RN black hole [14]. When we set \(y\rightarrow 0\), this result will return to that of the uncharged case [46]. For the cases \(k=0,1\), it’s not difficult to see that our late time value is less than the uncharged case, i.e., this result saturates the bound

$$\begin{aligned} \left. \frac{dC_A}{dt}\right| _{t\rightarrow \infty }\le \frac{M_1+M_2}{\pi }. \end{aligned}$$
(68)

3.4 Complexity without counterterm

In this subsection, we consider the growth rate of the complexity where we drop the counterterm from the full action. Without the inclusion of the counterterm, the growth rate is only contributed by \(\delta S_R\) and \(\delta S_L\). Considering the late time limit, from Eqs. (47) and (43), one can obtain

$$\begin{aligned} \begin{aligned}&\left. \frac{d\tilde{S}}{dt}\right| _{t\rightarrow \infty }\\&\quad =\frac{\varOmega _{k,d-1}}{32\pi G}\left[ 2\left( \frac{r_{-,1}^d-r_{+,2}^d}{L^2}+\frac{q^2}{r_{-,1}^{d-2}}-\frac{q^2}{r_{+,2}^{d-2}}\right) \right. \\&\qquad \left. +r_{+,1}^{d-1}f'_2(r_{+,2})-r_{-,2}^{d-1}f'_1(r_{-,1})\right. \\&\qquad \left. +\left( d-2\right) \left( \omega _1^{d-2}-\omega _2^{d-2}+\frac{2q^2}{r_{-,2}^{d-2}}-\frac{2q^2}{r_{+,1}^{d-2}}\right) \right] .\\ \end{aligned} \end{aligned}$$
(69)

First, we consider the limit of light but still non-zero shocks. In this limit, we have \(\omega _2\simeq \omega _1\), \(r_{+,2}\simeq r_{+,1}\), \(f_2\simeq f_1\) and \(r_{-,2}\simeq r_{-,1}\). Then, the late time limit becomes

$$\begin{aligned} \frac{d\tilde{S}}{dt}=\frac{\varOmega _{k,d{-}1}}{32\pi G} \left[ \frac{(3d{-}4)q^2}{r^{d{-}2}}{-}(d{-}2)\left( k+\frac{r^2}{L^2}\right) r^{d-2}\right] ^{r_{-,1}}_{r_{+,1}}. \end{aligned}$$
(70)

Next, we consider the shock wave with exactly zero energy. In this situation, we have \(\omega _2=\omega _1\) and \(f_2= f_1\). According to (47) and (43), the action growth rate can be shown as

$$\begin{aligned} \begin{aligned} \frac{d\tilde{S}}{dt}&=\frac{(d-1)\varOmega _{k,d-1}}{8\pi G}\left( \frac{q^2}{r_2^{d-2}}-\frac{q^2}{r_1^{d-2}}\right) \\&\quad +\frac{(d-1)\varOmega _{k,d-1}}{16\pi G}\left[ r_1^{d-2}f_1(r_1)\ln \left( -\frac{f_1(r_1)}{\alpha ^2 }\right) \right. \\&\quad \left. -r_{2}^{d-2} f_2(r_{2})\ln \left( -\frac{f_2(r_{2})}{\alpha ^2}\right) \right] \end{aligned} \end{aligned}$$
(71)

which is exactly the growth rate of the eternal RN black hole as discussed in [14]. Then, the late time limit can be given by

$$\begin{aligned} \begin{aligned} \frac{d{\tilde{S}}}{dt}=&\frac{(d-1)\varOmega _{k,d-1}}{8\pi G}\left( \frac{q^2}{r_{-,1}^{d-2}}-\frac{q^2}{r_{+,1}^{d-2}}\right) . \end{aligned} \end{aligned}$$
(72)

Comparing (70) and (72), one can find that the late time growth rate in the limit of light shocks can’t return to the case without shock wave. Therefore, in order to obtain an expected property of the complexity, it is necessary to add the counterterm into the full action for the CA conjecture.

3.5 Circuit analogy

In this subsection, we would like to investigate the connection between the behaviours of our holographic results and the switchback effect of the circuit model. As discussed in Refs. [3, 45], evolving the perturbed state independently in the left and right times yield the expression

$$\begin{aligned} |TFD(t_L,t_R)\rangle _\text {pert}=U_R(t_R+t_w)\mathcal {O}_RU_R(t_L-t_w)|TFD\rangle , \end{aligned}$$

where the perturbed operator \(\mathcal {O}_R\) is a localized simple operator. \(U_R(t)\mathcal {O}_R U_R(-t)=I\) with the identity operator I when \(t<t^*_\text {scr}\). This feature is connected to the switchback effect [3, 7] and can provide a deeper explanation of our holographic results.

We denote the rate of the complexity to \(c_1\) before the operator \(\mathcal {O}_R\) is inserted and \(c_2\) after it [45]. Under the limit of light shock, we have \(c_1\approx c_2\approx c\).

First of all, we consider the case \(t_w<t^*_\text {scr}\). When \(t_L<t_w\), the process in Eq. (73) can be illustrated in (b) of Fig. 7. In this situation, the switchback effect produces a cancellation for the process below the dashed line. Therefore, the complexity is given by

$$\begin{aligned} \mathcal {C}_\text {pert}\approx 2 c\, t, \end{aligned}$$
(73)

where we set \(t_L=t_R=t/2\). One can note that this complexity is exactly the result of the eternal case where the cancellation is always valid for the process below the dashed line. When \(t_L>t_w\), the process can be illustrated by (c) in Fig. 7. We can see that there is no opportunity for the switchback effect. Hence, the complexity is also the result of the eternal case which can be described by Eq. (73). As a summary, we find that when \(t_w<t^*_\text {scr}\), by virtue of the switch back effect, the complexity is same as that of the unperturbed state. This behavior is in agreement with our holographic result represented by the left panel of Fig. 5.

Then, we consider the case \(t_w>t^*_\text {scr}\). When \(t_L-t_w>-t^*_\text {scr}\), the complexity shares the same result with the case \(t_w<t^*_\text {scr}\). When \(t_w-t_L>t^*_\text {scr}\), the process can be illustrated by (a) in Fig. 7. In this case, the two time-evolution operators cancel out only during the scrambling time. Therefore, the complexity can be written as

$$\begin{aligned} \mathcal {C}_\text {pert}\approx 2c\,(t_w-t^*_\text {scr}). \end{aligned}$$
(74)

This result shows that the growth rate is very close to zero in the region \(t<2(t_w-t^*_\text {scr})\). This feature is in agreement with our holographic result as shown in right panel of Fig. 6.

Fig. 7
figure 7

A representation of the insertion of a perturbed operator \(\mathcal {O}_R\) at the time \(-t_w\) for the TFD state, in analogy to the construction in figure 25 of [45] as well as figure 6 of [3]

Next, we consider the complexity of formation. By setting \(t=0\) an using the above equations, one can obtain

$$\begin{aligned} \frac{d\varDelta \mathcal {C}_\text {pert}}{d t_w}=2c\mathcal {H}(t_w-t^*_\text {scr}). \end{aligned}$$
(75)

Again, this formula also matchs the our holographic case as illustrated in left panel of Fig. 3 in which when \(t<t^*_\text {scr}\), the rate of the complexity of formation is close to zero, and when \(t>t^*_\text {scr}\), it remains constant.

4 Conclusion and discussion

The action of AdS black hole within the WDW patch has been related to the quantum complexity of a holographic state. Following the procedure in [50], we calculated the action growth rate of the charged AdS-Vaidya black hole in \((d+1)\)-dimensional Einstein–Maxwell gravity. We first introduced a charged AdS-Vaidya geometry which is source by the collapse of an uncharged thin shell of null fluid. And this thin shell generates a shape transition from a black hole with total mass \(M_1\) and charge Q to another one with mass \(M_2\) and the same charge Q.

Using the approach proposed by Lehner et al. [11], we studied the complexity of the formation and discussed its small and large time behaviors in Sect. 3.2. We found that the slope of the complexity of formation shares the similar behaviors with the uncharged case. Meanwhile, these results are also in agreement with the switchback effect. After that, the growth rate of the complexity was evaluated in Sect. 3.3. By comparing it to the uncharged case, we found that the behaviors for the charged cases can smoothly approach that of the neutral cases. Furthermore, we also found that when \(t_w<t^*_\text {scr}\), the action growth rate is the same as the unperturbed case, and when \(t_w>t^*_\text {scr}\), it shares the similar behaviors with the heavy shock wave case. And these behaviors can be explained by the switchback effect. In addition, we show that the late time growth rate is given by the average value of the two RN rate without shockwave, which is consistent with the uncharged case. In Sect. 3.4, we investigated the early and late time behaviors of the complexity without the counterterm. We demonstrated that, in order to obtain an expected property of the complexity, it is also necessary to introduce the counterterm on the null boundaries for the charged Vaidya black hole. Finally, by analysing the circuit model, we showed our results our holographic results are in agreement with that of the circuit model.

In this paper, we only considered the CA conjecture in charged RN black hole sourced by the collapse of an uncharged thin shell of null fluid. It would also be interesting to further investigate the CV conjecture in the charged Vaidya black hole. As discussed in the uncharge case [50], the CV conjecture also shares the similar results with the CA conjecture, such as the late time behaviors and the switch back effect. Therefore, we have good reason to believe that the CV conjecture have same behaviors with the CA conjecture in the charged Vaidya black hole, such as the late time action growth rate can also be expressed as the sum of the average value of the two RN rate without shockwave. In addition, it would be interesting to investigate the charged Vaidya black hole with a charged shock wave, in which we might possible to study the one-side charged Vaidya spacetimes which formed by the collapse of an charged spherically symmetric shell to the AdS vacuum spacetime, and consider the process from the finite temperature black hole to extremal black hole.