Quanlse/QHamiltonian.py
def buildDissipationSuperCache(self) -> None:
        """
        Generate the dissipation super operator in the Liouville form.
        """
        cList = self._collapseOperators

        dim = None

        # Calculate the dimension of the Hilbert space
        if isinstance(self.sysLevel, int):
            dim = self.sysLevel ** self.subSysNum

        elif isinstance(self.sysLevel, list):
            dim = 1
            for i in self.sysLevel:
                dim = dim * i

        idn = identity(dim, dtype=complex)

        ld = zeros((dim * dim, dim * dim), dtype=complex)

        if cList is not None:
            cdagList = [transpose(conjugate(c)) for c in cList]
            for c, cdag in zip(cList, cdagList):
                ld += kron(c, c) - 0.5 * kron(cdag @ c, idn) - 0.5 * kron(idn, cdag @ c)

        self._dissipationSuperCache = ld

        Generate the dissipation super operator in the Liouville form.
        
Generate the dissipation super operator in the Liouville form.
Generate the dissipation super operator in the Liouville form .
def buildDissipationSuperCache(self) -> None:
        cList = self._collapseOperators
        dim = None
        if isinstance(self.sysLevel, int):
            dim = self.sysLevel ** self.subSysNum
        elif isinstance(self.sysLevel, list):
            dim = 1
            for i in self.sysLevel:
                dim = dim * i
        idn = identity(dim, dtype=complex)
        ld = zeros((dim * dim, dim * dim), dtype=complex)
        if cList is not None:
            cdagList = [transpose(conjugate(c)) for c in cList]
            for c, cdag in zip(cList, cdagList):
                ld += kron(c, c) - 0.5 * kron(cdag @ c, idn) - 0.5 * kron(idn, cdag @ c)
        self._dissipationSuperCache = ld
def buildDissipationSuperCache ( self ) -> None : cList = self . _collapseOperators dim = None if isinstance ( self . sysLevel , int ) : dim = self . sysLevel ** self . subSysNum elif isinstance ( self . sysLevel , list ) : dim = 1 for i in self . sysLevel : dim = dim * i idn = identity ( dim , dtype = complex ) ld = zeros ( ( dim * dim , dim * dim ) , dtype = complex ) if cList is not None : cdagList = [ transpose ( conjugate ( c ) ) for c in cList ] for c , cdag in zip ( cList , cdagList ) : ld += kron ( c , c ) - 0.5 * kron ( cdag @ c , idn ) - 0.5 * kron ( idn , cdag @ c ) self . _dissipationSuperCache = ld
Generate the dissipation super operator in the Liouville form.
Generate the dissipation super operator in the Liouville form .
"""
        Generate the dissipation super operator in the Liouville form.
        """ # Calculate the dimension of the Hilbert space
self