qlazy/DensOp.py
def patrace(self, qid=[]):
        """
        get the partial trace of density operator.

        Parameters
        ----------
        qid : list of int
            qubit id's list to show.

        Returns
        -------
        densop : instance of DensOp
            density operator after partial trace.

        """
        # densop = densop_patrace(self, qid=qid)
        # return densop
        obj = densop_patrace(self, qid=qid)
        de = ctypes.cast(obj.value, ctypes.POINTER(self.__class__)).contents
        return de

        get the partial trace of density operator.

        Parameters
        ----------
        qid : list of int
            qubit id's list to show.

        Returns
        -------
        densop : instance of DensOp
            density operator after partial trace.

        
get the partial trace of density operator.
Parameters

qid : list of int
qubit id's list to show.

Returns

densop : instance of DensOp
density operator after partial trace.
get the partial trace of density operator . Parameters qid : list of int qubit id ' s list to show . Returns densop : instance of DensOp density operator after partial trace .
def patrace(self, qid=[]):
        obj = densop_patrace(self, qid=qid)
        de = ctypes.cast(obj.value, ctypes.POINTER(self.__class__)).contents
        return de
def patrace ( self , qid = [ ] ) : obj = densop_patrace ( self , qid = qid ) de = ctypes . cast ( obj . value , ctypes . POINTER ( self . __class__ ) ) . contents return de
get the partial trace of density operator.
get the partial trace of density operator .
"""
        get the partial trace of density operator.

        Parameters
        ----------
        qid : list of int
            qubit id's list to show.

        Returns
        -------
        densop : instance of DensOp
            density operator after partial trace.

        """ # densop = densop_patrace(self, qid=qid) # return densop
self
qid