qlazy/QState.py
def fidelity(self, qstate, qid=[]):
        """
        get the fidelity with quantum state.

        Parameters
        ----------
        qstate : instance of QState
            one of the two quantum state.
        qid : list of int
            qubit id's list.

        Returns
        -------
        fid : float
            fidelity of two quantum states. absolute value of the
            inner product of two quantum states.

        Notes
        -----
        If 'qid' is set, you can get the fidelity for partial quantum
        state. If the specified quantum system are entangled with the
        remaining system, output value is probabilistic, while
        original quantum states do not change.

        """
        return abs(self.inpro(qstate, qid=qid))

        get the fidelity with quantum state.

        Parameters
        ----------
        qstate : instance of QState
            one of the two quantum state.
        qid : list of int
            qubit id's list.

        Returns
        -------
        fid : float
            fidelity of two quantum states. absolute value of the
            inner product of two quantum states.

        Notes
        -----
        If 'qid' is set, you can get the fidelity for partial quantum
        state. If the specified quantum system are entangled with the
        remaining system, output value is probabilistic, while
        original quantum states do not change.

        
get the fidelity with quantum state.
Parameters

qstate : instance of QState
one of the two quantum state.
qid : list of int
qubit id's list.

Returns

fid : float
fidelity of two quantum states. absolute value of the
inner product of two quantum states.

Notes

If 'qid' is set, you can get the fidelity for partial quantum
state. If the specified quantum system are entangled with the
remaining system, output value is probabilistic, while
original quantum states do not change.
get the fidelity with quantum state . Parameters qstate : instance of QState one of the two quantum state . qid : list of int qubit id ' s list . Returns fid : float fidelity of two quantum states . absolute value of the inner product of two quantum states . Notes If ' qid ' is set you can get the fidelity for partial quantum state . If the specified quantum system are entangled with the remaining system output value is probabilistic while original quantum states do not change .
def fidelity(self, qstate, qid=[]):
        return abs(self.inpro(qstate, qid=qid))
def fidelity ( self , qstate , qid = [ ] ) : return abs ( self . inpro ( qstate , qid = qid ) )
get the fidelity with quantum state.
get the fidelity with quantum state .
"""
        get the fidelity with quantum state.

        Parameters
        ----------
        qstate : instance of QState
            one of the two quantum state.
        qid : list of int
            qubit id's list.

        Returns
        -------
        fid : float
            fidelity of two quantum states. absolute value of the
            inner product of two quantum states.

        Notes
        -----
        If 'qid' is set, you can get the fidelity for partial quantum
        state. If the specified quantum system are entangled with the
        remaining system, output value is probabilistic, while
        original quantum states do not change.

        """
self
qstate
qid