def get_remainder_set(self, j):
        """Return the set of children with indices less than j of all ancestors
        of j. The set C from (arXiv:1701.07072).

        :param int j: fermionic site index

        :return: children of j-ancestors, with indices less than j
        :rtype: list(FenwickNode)
        """
        result = []
        ancestors = self.get_update_set(j)

        # This runs in O(log(N)log(N)) where N is the number of qubits.
        for a in ancestors:
            for c in a.children:
                if c.index < j:
                    result.append(c)

        return result
def get_remainder_set ( self , j ) : result = [ ] ancestors = self . get_update_set ( j ) for a in ancestors : for c in a . children : if c . index < j : result . append ( c ) return result
Return the set of children with indices less than j of all ancestors
        of j. The set C from (arXiv:1701.07072).

        :param int j: fermionic site index

        :return: children of j-ancestors, with indices less than j
        :rtype: list(FenwickNode)