Quanlse/QHamiltonian.py
def subSystemIndicesInverse(self) -> Dict[int, int]:
        """
        In self.subSystem, users can extract a subsystem of the original system,
        thus, the qubit indices will change. For example, for a system with indices [0, 1, 2, 3],
        we extract the subsystem constituted by subsystems 1 and 3, then the index of
        subsystem 1 changes to 0; 3 changes to 1; the mapping in self.subSystemIndexMapping is:
        {1: 0, 3: 1}.
        We can use this function to obtain the inverse mapping, the inverse mapping of the mapping
        above is:
        {0: 1, 1: 3}

        :return: a dictionary containing the 'inverse mapping'
        """
        inverseMapping = {}
        for key in self.subSystemIndexMapping:
            inverseMapping[self.subSystemIndexMapping[key]] = key
        return inverseMapping

        In self.subSystem, users can extract a subsystem of the original system,
        thus, the qubit indices will change. For example, for a system with indices [0, 1, 2, 3],
        we extract the subsystem constituted by subsystems 1 and 3, then the index of
        subsystem 1 changes to 0; 3 changes to 1; the mapping in self.subSystemIndexMapping is:
        {1: 0, 3: 1}.
        We can use this function to obtain the inverse mapping, the inverse mapping of the mapping
        above is:
        {0: 1, 1: 3}

        :return: a dictionary containing the 'inverse mapping'
        
In self.subSystem, users can extract a subsystem of the original system,
thus, the qubit indices will change. For example, for a system with indices [0, 1, 2, 3],
we extract the subsystem constituted by subsystems 1 and 3, then the index of
subsystem 1 changes to 0; 3 changes to 1; the mapping in self.subSystemIndexMapping is:
{1: 0, 3: 1}.
We can use this function to obtain the inverse mapping, the inverse mapping of the mapping
above is:
{0: 1, 1: 3}
In self . subSystem users can extract a subsystem of the original system thus the qubit indices will change . For example for a system with indices [ 0 1 2 3 ] we extract the subsystem constituted by subsystems 1 and 3 then the index of subsystem 1 changes to 0 ; 3 changes to 1 ; the mapping in self . subSystemIndexMapping is : { 1 : 0 3 : 1 } . We can use this function to obtain the inverse mapping the inverse mapping of the mapping above is : { 0 : 1 1 : 3 }
def subSystemIndicesInverse(self) -> Dict[int, int]:
        inverseMapping = {}
        for key in self.subSystemIndexMapping:
            inverseMapping[self.subSystemIndexMapping[key]] = key
        return inverseMapping
def subSystemIndicesInverse ( self ) -> Dict [ int , int ] : inverseMapping = { } for key in self . subSystemIndexMapping : inverseMapping [ self . subSystemIndexMapping [ key ] ] = key return inverseMapping
In self.subSystem, users can extract a subsystem of the original system,
thus, the qubit indices will change.
In self . subSystem users can extract a subsystem of the original system thus the qubit indices will change .
"""
        In self.subSystem, users can extract a subsystem of the original system,
        thus, the qubit indices will change. For example, for a system with indices [0, 1, 2, 3],
        we extract the subsystem constituted by subsystems 1 and 3, then the index of
        subsystem 1 changes to 0; 3 changes to 1; the mapping in self.subSystemIndexMapping is:
        {1: 0, 3: 1}.
        We can use this function to obtain the inverse mapping, the inverse mapping of the mapping
        above is:
        {0: 1, 1: 3}

        :return: a dictionary containing the 'inverse mapping'
        """
a dictionary containing the 'inverse mapping'
a dictionary containing the ' inverse mapping '
self