Esempio n. 1
0
def get_C4z_symmetry_map(config):
    assert config.n_sublattices == 1
    geometry = 'square'

    mapping = np.zeros((config.total_dof // 2, config.total_dof // 2)) + 0.0j  # trivial mapping
    rotation_matrix = np.array([[np.cos(2 * np.pi / 4.), np.sin(2 * np.pi / 4.)], \
                                [-np.sin(2 * np.pi / 4.), np.cos(2 * np.pi / 4.)]])
    if config.n_orbitals == 2:
        rotation_matrix_orbital = rotation_matrix
    else:
        rotation_matrix_orbital = np.eye(1)

    for preindex in range(config.total_dof // 2):
        orbit_preimage, sublattice_preimage, x_preimage, y_preimage = \
            models.from_linearized_index(preindex, config.Ls, config.n_orbitals, config.n_sublattices)

        orbit_preimage_vector = np.zeros(config.n_orbitals); orbit_preimage_vector[orbit_preimage] = 1.
        r_preimage = models.lattice_to_physical([x_preimage, y_preimage, sublattice_preimage], geometry)

        orbit_image_vector = np.einsum('ij,j->i', rotation_matrix_orbital, orbit_preimage_vector)

        r_image = np.einsum('ij,j->i', rotation_matrix, r_preimage)
        
        x_image, y_image, sublattice_image = models.physical_to_lattice(r_image, geometry)

        x_image = int(np.rint(x_image)); y_image = int(np.rint(y_image))
        x_image = (x_image % config.Ls); y_image = (y_image % config.Ls)

        for orbit_image in range(config.n_orbitals):
            coefficient = orbit_image_vector[orbit_image]
            index = models.to_linearized_index(x_image, y_image, sublattice_image, orbit_image, \
                                               config.Ls, config.n_orbitals, config.n_sublattices)
            mapping[preindex, index] += coefficient
    assert np.sum(np.abs(mapping.dot(mapping).dot(mapping).dot(mapping) - np.eye(mapping.shape[0]))) < 1e-5  # C_4z^4 = I
    return mapping + 0.0j
Esempio n. 2
0
    def get_TRS_symmetry_map_chiral_jastrow(config):
        assert config.n_sublattices == 2
        geometry = 'hexagonal'

        mapping = np.zeros(
            (config.total_dof // 2, config.total_dof // 2))  # trivial mapping

        for preindex in range(config.total_dof // 2):
            orbit_preimage, sublattice_preimage, x_preimage, y_preimage = \
                models.from_linearized_index(preindex, config.Ls, config.n_orbitals, config.n_sublattices)

            r_preimage = models.lattice_to_physical(
                [x_preimage, y_preimage, sublattice_preimage], geometry)
            r_image = r_preimage

            x_image, y_image, sublattice_image = models.physical_to_lattice(
                r_image, geometry)

            x_image = int(np.rint(x_image))
            y_image = int(np.rint(y_image))
            x_image = (x_image % config.Ls)
            y_image = (y_image % config.Ls)

            index = models.to_linearized_index(x_image, y_image, sublattice_image, 1 - orbit_preimage, \
                                               config.Ls, config.n_orbitals, config.n_sublattices)
            mapping[preindex, index] = 1.
        assert np.sum(np.abs(mapping.dot(mapping) -
                             np.eye(mapping.shape[0]))) < 1e-12  # T^2 = I
        return mapping
Esempio n. 3
0
    def get_C2y_symmetry_map_chiral_jastrow(config):
        mapping = np.zeros((config.total_dof // 2, config.total_dof // 2))

        for preindex in range(config.total_dof // 2):
            orbit_preimage, sublattice_preimage, x_preimage, y_preimage = \
                models.from_linearized_index(preindex, config.Ls, config.n_orbitals, config.n_sublattices)
            orbit_image = 1 - orbit_preimage

            r_preimage = np.array(
                models.lattice_to_physical(
                    [x_preimage, y_preimage, sublattice_preimage],
                    'hexagonal'))
            r_preimage -= np.array([1. / np.sqrt(3) / 2, 0.0])
            r_image = np.array([-r_preimage[0], r_preimage[1]]) + np.array(
                [1. / np.sqrt(3) / 2, 0.0])

            x_image, y_image, sublattice_image = models.physical_to_lattice(
                r_image, 'hexagonal')
            x_image = int(np.rint(x_image))
            y_image = int(np.rint(y_image))
            x_image = (x_image % config.Ls)
            y_image = (y_image % config.Ls)

            index = models.to_linearized_index(x_image, y_image, sublattice_image, orbit_image, \
                                               config.Ls, config.n_orbitals, config.n_sublattices)

            mapping[preindex, index] += 1.

        assert np.sum(np.abs(mapping.dot(mapping) -
                             np.eye(mapping.shape[0]))) < 1e-12  # C_2y^2 = I
        return mapping
Esempio n. 4
0
    def get_C3z_symmetry_map_chiral_jastrow(config):
        assert config.n_sublattices == 2
        geometry = 'hexagonal'

        mapping = np.zeros(
            (config.total_dof // 2, config.total_dof // 2))  # trivial mapping
        rotation_matrix = np.array([[np.cos(2 * np.pi / 3.), np.sin(2 * np.pi / 3.)], \
                                    [-np.sin(2 * np.pi / 3.), np.cos(2 * np.pi / 3.)]])

        for preindex in range(config.total_dof // 2):
            orbit_preimage, sublattice_preimage, x_preimage, y_preimage = \
                models.from_linearized_index(preindex, config.Ls, config.n_orbitals, config.n_sublattices)

            r_preimage = models.lattice_to_physical(
                [x_preimage, y_preimage, sublattice_preimage], geometry)
            r_image = np.einsum('ij,j->i', rotation_matrix, r_preimage)

            x_image, y_image, sublattice_image = models.physical_to_lattice(
                r_image, geometry)

            x_image = int(np.rint(x_image))
            y_image = int(np.rint(y_image))
            x_image = (x_image % config.Ls)
            y_image = (y_image % config.Ls)

            index = models.to_linearized_index(x_image, y_image, sublattice_image, orbit_preimage, \
                                               config.Ls, config.n_orbitals, config.n_sublattices)
            mapping[preindex, index] = 1.
        assert np.sum(
            np.abs(
                mapping.dot(mapping).dot(mapping) -
                np.eye(mapping.shape[0]))) < 1e-12  # C_3z^3 = I
        return mapping
Esempio n. 5
0
def get_C2y_symmetry_map(config, chiral = False):
    if config.n_sublattices == 2:
        geometry = 'hexagonal'
    else:
        geometry = 'square'

    mapping = np.zeros((config.total_dof // 2, config.total_dof // 2)) + 0.0j  # trivial mapping

    for preindex in range(config.total_dof // 2):
        orbit_preimage, sublattice_preimage, x_preimage, y_preimage = \
            models.from_linearized_index(preindex, config.Ls, config.n_orbitals, config.n_sublattices)     

        if config.n_orbitals == 2:
            if not chiral:
                orbit_image = orbit_preimage
                coefficient = -1.0 if orbit_image == 0 else 1.0
            else:
                orbit_image = 1 - orbit_preimage
                coefficient = -1.0
        else:
            orbit_image = orbit_preimage
            coefficient = 1.0

        r_preimage = np.array(models.lattice_to_physical([x_preimage, y_preimage, sublattice_preimage], geometry))
        if geometry == 'hexagonal':
            r_preimage -= np.array([1. / np.sqrt(3) / 2, 0.0])
            r_image = np.array([-r_preimage[0], r_preimage[1]]) + np.array([1. / np.sqrt(3) / 2, 0.0])
        else:
            r_image = np.array([-r_preimage[0], r_preimage[1]])

        x_image, y_image, sublattice_image = models.physical_to_lattice(r_image, geometry)
        x_image = int(np.rint(x_image)); y_image = int(np.rint(y_image))
        x_image = (x_image % config.Ls); y_image = (y_image % config.Ls)
        
        index = models.to_linearized_index(x_image, y_image, sublattice_image, orbit_image, \
                                           config.Ls, config.n_orbitals, config.n_sublattices)

        mapping[preindex, index] += coefficient

    assert np.sum(np.abs(mapping.dot(mapping) - np.eye(mapping.shape[0]))) < 1e-5  # C_2y^2 = I
    return mapping + 0.0j