@staticmethod
def paired_idx(idx):
    """
        Return the paired index

        Snapshots are stored in pairs (2n, 2n+1) where one is the reversed copy.
        This make storing CVs easier. This function allows to get the paired
        index or the index of snapshot.reversed

        The implementation uses the trick that all you have to do is flip the
        lowest bit that determines even or odd.

        Parameters
        ----------
        idx : int
            the one part of the paired index

        Returns
        -------
        int
            the other part of the paired index
        """
    return idx ^ 1
