*3.4. Extended Keldysh Diagrams*

In all the above diagrams, quantum states have been represented as labels on the contours. By definition, we know that the density matrix contains both ket and bra states. The second order interactions can, in fact, only take place either between two kets, two bras, or between a ket and a bra. This internal degree of freedom makes it necessary to add more details to our diagrams and represent each replica with the well-known Keldysh contour diagrams [35]. The Keldysh technique permits a natural formulation of the density matrix dynamics in terms of path integrals, which is a generalization of the Feynman–Vernon formalism.

Considering that the time evolution of a quantum system takes place by the Hamiltonian *H*, kets evolve as |*ψ* (*t*) = exp (*iHt*)|*ψ* (0) and bras evolve with the opposite phase: *ψ* (*t*)| = *ψ* (0)| exp (*iHt*). Based on this simple observation, bras (kets) evolve in the opposite (same) direction of time along the Keldysh contour.

The evolution of the density matrix *R* from the initial time to the present time can diagrammatically be represented in the following way: one can start at a bra at the present time, move down along the contour to the initial time, pass there through the initial density matrix thereby changing from a bra to a ket, and finally move upwards to end with a ket at the present time. Taking a trace from the density matrix can be shown diagrammatically by closing the contours at the present time: i.e., we connect the present ket to the present bra. It is of course awkward to do this for the total density matrix, as this will simply yield one at any time; however, taking a trace is meaningful for multiple interacting subsystems.

The two subsystems *A* and *B* each require a contour, resulting in a double contour. We assume separability of *A* and *B* at the initial time: *R* (0) = *RA* (0) *RB* (0). Interaction results in energy exchange, which we represent by a cross between the two contours, somewhere between initial and present times, i.e., 0 < *t* < *t*. In the case we are interested in the evolution of one of the subsystems, say *B*, the partial trace over *A* should be taken, which in the diagram can be done by connecting the present bra and ket of system *A*, see the right diagram in Figure 4. Further details about this Keldysh representation of quantum dynamics can be found in [16].

**Figure 4.** The Keldysh diagram for the time evolution of: (**left**) one world made of one subsystem, (**right**) a world made of two interacting subsystems. Each contour represents a subsystem and the crosses denote interactions.

In order to evaluate the time evolution of the von Neumann and Renyi entropies, we need extended Keldysh contours in multiple parallel worlds (replicas). For this purpose, we consider multiple copies of the Keldysh diagram, one for each world, and add the initial state of the density matrix in each world along the contour at the initial time. The overall trace will ge<sup>t</sup> the contours of different worlds connected.

In the second order, one can find:

$$
\begin{split}
\frac{d}{dt}S\_M^{(B)} &= \quad -\frac{1}{S\_M^{(B)}} \text{Tr}\_B \left\{ \boldsymbol{\Delta}\_B^{(2)} \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-1} + \boldsymbol{R}\_B \boldsymbol{\Delta}\_B^{(2)} \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-2} + \cdots + \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-1} \boldsymbol{\Delta}\_B^{(2)} \right\} \\ & \quad - \frac{1}{S\_M^{(B)}} \text{Tr}\_B \left\{ \boldsymbol{\Delta}\_B^{(1)} \left[ \boldsymbol{R}\_B^{(1)} \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-2} + \cdots + \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-2} \boldsymbol{R}\_B^{(1)} \right] \right. \\ & \left. + \boldsymbol{R}\_B \left( \boldsymbol{0} \right) \boldsymbol{\Delta}\_B^{(1)} \left[ \boldsymbol{R}\_B^{(1)} \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-3} + \cdots + \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-3} \boldsymbol{R}\_B^{(1)} \right] + \cdots \cdots \\ & \quad + \left[ \boldsymbol{R}\_B^{(1)} \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-21} + \cdots + \boldsymbol{R}\_B \left( \boldsymbol{0} \right)^{M-2} \boldsymbol{R}\_B^{(1)} \right] \boldsymbol{\Delta}\_B^{(1)} \right\}. \tag{21}
\end{split}
$$

The first line contains terms with second-order interactions taking place in only one world. A typical such diagram for *M* = 3 has been shown in Figure 5.

**Figure 5.** A diagram with two energy exchanges in one replica and no interaction in others.

The rest of the lines other than the first line in Equation (21) denote maximally no more than first-order interaction in a replica. The diagram in Figure 6 shows a typical such term.

**Figure 6.** A diagram with two replicas taking over 1st order interactions and the others remain intact.
