lime/superoperator.py
def correlation_3op_2t(self, rho0, ops, tlist, taulist, k=None):
        """
        Compute <A(t)B(t+tau)C(t)> by diagonalizing the Liouvillian.

        Returns
        -------
        1D array.
            correlation function.

        """
        a, b, c = ops
        rho0 = operator_to_vector(rho0)

        cor = np.zeros((len(tlist), len(taulist)), dtype=complex)

        # diagonalize the Liouvillian
        # evals, U1, U2 = self.eigenstates(k=k)
        evals = self.eigvals
        U1 = self.right_eigvecs
        U2 = self.left_eigvecs

        if k is None:
            k = self.dim

        # assert(np.allclose(evals1, evals2.conj()))
        # print(evals2)
        # assert(evals1.imag.all() > 0)
        # assert(np.allclose(evals1, evals2.conj(), atol=1e-4))

        #norm = [np.vdot(U2[:,n], U1[:,n]) for n in range(k)]
        norm = self.norm

        idv = self.idv

        coeff = np.zeros((k,k), dtype=complex)

        for m in range(k):
            for n in range(k):
                coeff[m, n] = np.vdot(idv, left(b).dot(U1[:, m])) * \
                    np.vdot(U2[:,m], right(a).dot(left(c).dot(U1[:,n])))/norm[m]\
                    * np.vdot(U2[:, n], rho0)/norm[n]


        # for i, t in enumerate(tlist):
        #     for j, tau in enumerate(taulist):

        tmp1 = exp(np.outer(evals, taulist))
        tmp2 = exp(np.outer(evals, tlist))

        cor = tmp1.T @ coeff @ tmp2

        return cor

        Compute <A(t)B(t+tau)C(t)> by diagonalizing the Liouvillian.

        Returns
        -------
        1D array.
            correlation function.

        
Compute  by diagonalizing the Liouvillian.
Returns

1D array.
correlation function.
Compute by diagonalizing the Liouvillian . Returns 1D array . correlation function .
def correlation_3op_2t(self, rho0, ops, tlist, taulist, k=None):
        a, b, c = ops
        rho0 = operator_to_vector(rho0)
        cor = np.zeros((len(tlist), len(taulist)), dtype=complex)
        evals = self.eigvals
        U1 = self.right_eigvecs
        U2 = self.left_eigvecs
        if k is None:
            k = self.dim
        norm = self.norm
        idv = self.idv
        coeff = np.zeros((k,k), dtype=complex)
        for m in range(k):
            for n in range(k):
                coeff[m, n] = np.vdot(idv, left(b).dot(U1[:, m])) * \
                    np.vdot(U2[:,m], right(a).dot(left(c).dot(U1[:,n])))/norm[m]\
                    * np.vdot(U2[:, n], rho0)/norm[n]
        tmp1 = exp(np.outer(evals, taulist))
        tmp2 = exp(np.outer(evals, tlist))
        cor = tmp1.T @ coeff @ tmp2
        return cor
def correlation_3op_2t ( self , rho0 , ops , tlist , taulist , k = None ) : a , b , c = ops rho0 = operator_to_vector ( rho0 ) cor = np . zeros ( ( len ( tlist ) , len ( taulist ) ) , dtype = complex ) evals = self . eigvals U1 = self . right_eigvecs U2 = self . left_eigvecs if k is None : k = self . dim norm = self . norm idv = self . idv coeff = np . zeros ( ( k , k ) , dtype = complex ) for m in range ( k ) : for n in range ( k ) : coeff [ m , n ] = np . vdot ( idv , left ( b ) . dot ( U1 [ : , m ] ) ) * np . vdot ( U2 [ : , m ] , right ( a ) . dot ( left ( c ) . dot ( U1 [ : , n ] ) ) ) / norm [ m ] * np . vdot ( U2 [ : , n ] , rho0 ) / norm [ n ] tmp1 = exp ( np . outer ( evals , taulist ) ) tmp2 = exp ( np . outer ( evals , tlist ) ) cor = tmp1 . T @ coeff @ tmp2 return cor
Compute <A(t)B(t+tau)C(t)> by diagonalizing the Liouvillian.
Compute <A ( t ) B ( t + tau ) C ( t ) > by diagonalizing the Liouvillian .
"""
        Compute <A(t)B(t+tau)C(t)> by diagonalizing the Liouvillian.

        Returns
        -------
        1D array.
            correlation function.

        """ # diagonalize the Liouvillian # evals, U1, U2 = self.eigenstates(k=k) # assert(np.allclose(evals1, evals2.conj())) # print(evals2) # assert(evals1.imag.all() > 0) # assert(np.allclose(evals1, evals2.conj(), atol=1e-4)) #norm = [np.vdot(U2[:,n], U1[:,n]) for n in range(k)] # for i, t in enumerate(tlist): #     for j, tau in enumerate(taulist):
self
rho0
ops
tlist
taulist
k