Quanlse/QHamiltonian.py
def mapping(index: Union[int, List[int]]) -> Union[int, List[int]]:
            """
            Map the `onQubits` index(es) from the original Ham to the extracted Ham.

            :param index: 'onQubits' index(es) from the original Ham
            :return: mapped index(es) onto the extracted Ham
            """
            if isinstance(index, int):
                return indexMapping[index]
            else:
                mappedList = []
                for item in index:
                    mappedList.append(indexMapping[item])
                return mappedList

            Map the `onQubits` index(es) from the original Ham to the extracted Ham.

            :param index: 'onQubits' index(es) from the original Ham
            :return: mapped index(es) onto the extracted Ham
            
Map the `onQubits` index(es) from the original Ham to the extracted Ham.
Map the ` onQubits ` index ( es ) from the original Ham to the extracted Ham .
def mapping(index: Union[int, List[int]]) -> Union[int, List[int]]:
            if isinstance(index, int):
                return indexMapping[index]
            else:
                mappedList = []
                for item in index:
                    mappedList.append(indexMapping[item])
                return mappedList
def mapping ( index : Union [ int , List [ int ] ] ) -> Union [ int , List [ int ] ] : if isinstance ( index , int ) : return indexMapping [ index ] else : mappedList = [ ] for item in index : mappedList . append ( indexMapping [ item ] ) return mappedList
Map the `onQubits` index(es) from the original Ham to the extracted Ham.
Map the ` onQubits ` index ( es ) from the original Ham to the extracted Ham .
"""
            Map the `onQubits` index(es) from the original Ham to the extracted Ham.

            :param index: 'onQubits' index(es) from the original Ham
            :return: mapped index(es) onto the extracted Ham
            """
mapped index(es) onto the extracted Ham
mapped index ( es ) onto the extracted Ham
index
Union[int, List[int]]
'onQubits' index(es) from the original Ham
' onQubits ' index ( es ) from the original Ham