Mapping of Kagome structures (varipeps.mapping.kagome)

class varipeps.mapping.kagome.Kagome_Map_PESS3_To_Single_PEPS_Site(unitcell_structure: Sequence[Sequence[int]], chi: int, max_chi: int | None = None)

Bases: Map_To_PEPS_Model

Map a 3-site Kagome iPESS unit cell to a iPEPS structure.

Create a PEPS unitcell from a Kagome 3-PESS structure. To this end, the two simplex tensor and all three sites are mapped into PEPS sites.

The axes of the simplex tensors are expected to be in the order: - Up: PESS site 1, PESS site 2, PESS site 3 - Down: PESS site 3, PESS site 2, PESS site 1

The axes of the site tensors are expected to be in the order connection to down simplex, physical bond, connection to up simplex.

The PESS structure is contracted in the way that all site tensors are connected to the up simplex and the down simplex to site 1.

__call__(input_tensors: Sequence[Array], *, generate_unitcell: bool = True) List[Array] | Tuple[List[Array], PEPS_Unit_Cell]

Calculate the PEPS unitcell out of a list of input tensors depending on the original systems.

Parameters:

input_tensors (sequence of jax.numpy.ndarray) – The sequence of input tensors that should be converted.

Keyword Arguments:

generate_unitcell (bool, optional) – Flag if the only the PEPS tensors or additionally the unitcell should be calculated.

Default: True

Returns:

The mapped PEPS tensors and if generate_unitcell = True the unitcell for these tensors.

Return type:

list of jax.numpy.ndarray or tuple of list of jax.numpy.ndarray and PEPS_Unit_Cell

classmethod autosave_wrapper(filename: PathLike, tensors: Array, unitcell: PEPS_Unit_Cell, counter: int | None = None, max_trunc_error_list: float | None = None) None
chi: int
classmethod load_from_file(path: PathLike, *, return_config: bool = False, return_max_trunc_error_list: bool = False) Tuple[List[Array], PEPS_Unit_Cell] | Tuple[List[Array], PEPS_Unit_Cell, PEPS_AD_Config]

Load unit cell from a HDF5 file.

This function read the group “kagome_pess” from the file and pass this group to the method load_from_group then.

Parameters:
  • path (os.PathLike) – Path of the HDF5 file.

  • return_config (bool, optional) – Return a config object initialized with the values from the HDF5 files. If no config is stored in the file, just the data is returned. Missing config flags in the file uses the default values from the config object.

    Default: False

Returns:

The tuple with the list of the PESS tensors and the PEPS unitcell is returned. If return_config = True. the config is returned as well.

Return type:

tuple(list(jax.numpy.ndarray), PEPS_Unit_Cell) or tuple(list(jax.numpy.ndarray), PEPS_Unit_Cell, PEPS_AD_Config)

static load_from_group(grp: Group, *, return_config: bool = False) Tuple[List[Array], PEPS_Unit_Cell] | Tuple[List[Array], PEPS_Unit_Cell, PEPS_AD_Config]

Load the unit cell from a HDF5 group which is be passed to the method.

Parameters:
  • grp (h5py.Group) – HDF5 group object to load the data from.

  • return_config (bool, optional) – Return a config object initialized with the values from the HDF5 files. If no config is stored in the file, just the data is returned. Missing config flags in the file uses the default values from the config object.

    Default: False

Returns:

The tuple with the list of the PESS tensors and the PEPS unitcell is returned. If return_config = True. the config is returned as well.

Return type:

tuple(list(jax.numpy.ndarray), PEPS_Unit_Cell) or tuple(list(jax.numpy.ndarray), PEPS_Unit_Cell, PEPS_AD_Config)

max_chi: int | None = None
classmethod random(structure: Sequence[Sequence[int]], d: int, D: int, chi: int | Sequence[int], dtype: Type[number], max_chi: int, *, seed: int | None = None, destroy_random_state: bool = True) Tuple[List[Array], T_Kagome_Map_PESS3_To_Single_PEPS_Site]
classmethod save_to_file(path: PathLike, tensors: List[Array], unitcell: PEPS_Unit_Cell, *, store_config: bool = True, max_trunc_error_list: List[float] | None = None) None

Save unit cell to a HDF5 file.

This function creates a single group “kagome_pess” in the file and pass this group to the method save_to_group then.

Parameters:
  • path (os.PathLike) – Path of the new file. Caution: The file will overwritten if existing.

  • store_config (bool, optional) – Store the current values of the global config object into the HDF5 file as attrs of an extra group.

    Default: True

static save_to_group(grp: Group, tensors: List[Array], unitcell: PEPS_Unit_Cell, *, store_config: bool = True) None

Save unit cell to a HDF5 group which is be passed to the method.

Parameters:
  • grp (h5py.Group) – HDF5 group object to store the data into.

  • store_config (bool, optional) – Store the current values of the global config object into the HDF5 file as attrs of an extra group.

    Default: True

unitcell_structure: Sequence[Sequence[int]]
class varipeps.mapping.kagome.Kagome_Map_PESS3_To_Single_PEPS_Site_Upper_Triangle(unitcell_structure: Sequence[Sequence[int]], chi: int, max_chi: int | None = None)

Bases: Map_To_PEPS_Model

Map a 3-site Kagome iPESS unit cell to a iPEPS structure.

Create a PEPS unitcell from a Kagome 3-PESS structure. To this end, the two simplex tensor and all three sites are mapped into PEPS sites.

The axes of the simplex tensors are expected to be in the order: - Up: PESS site 1, PESS site 2, PESS site 3 - Down: PESS site 3, PESS site 2, PESS site 1

The axes of the site tensors are expected to be in the order connection to down simplex, physical bond, connection to up simplex.

The PESS structure is contracted in the way that all site tensors are connected to the up simplex and the down simplex to site 2.

__call__(input_tensors: Sequence[Array], *, generate_unitcell: bool = True) List[Array] | Tuple[List[Array], PEPS_Unit_Cell]

Calculate the PEPS unitcell out of a list of input tensors depending on the original systems.

Parameters:

input_tensors (sequence of jax.numpy.ndarray) – The sequence of input tensors that should be converted.

Keyword Arguments:

generate_unitcell (bool, optional) – Flag if the only the PEPS tensors or additionally the unitcell should be calculated.

Default: True

Returns:

The mapped PEPS tensors and if generate_unitcell = True the unitcell for these tensors.

Return type:

list of jax.numpy.ndarray or tuple of list of jax.numpy.ndarray and PEPS_Unit_Cell

chi: int
max_chi: int | None = None
unitcell_structure: Sequence[Sequence[int]]
class varipeps.mapping.kagome.Kagome_PESS3_Expectation_Value(upward_triangle_gates: Sequence[Array], downward_triangle_gates: Sequence[Array], normalization_factor: int = 3, operation_before_sum: Callable[[T_float_complex], T_float_complex] | None = None, is_spiral_peps: bool = False, spiral_unitary_operator: Array | None = None)

Bases: Expectation_Model

Class to calculate expectation values for a mapped Kagome 3-PESS structure.

Parameters:
  • upward_triangle_gates (sequence of jax.numpy.ndarray) – Sequence with the gates that should be applied to the upward triangles.

  • downward_triangle_gates (sequence of jax.numpy.ndarray) – Sequence with the gates that should be applied to the downward triangles.

  • normalization_factor (int, optional) – Factor which should be used to normalize the calculated values. If for example three sites are mapped into one PEPS site this should be 3.

    Default: 3

__call__(peps_tensors: Sequence[Array], unitcell: PEPS_Unit_Cell, spiral_vectors: Array | Sequence[Array] | None = None, *, normalize_by_size: bool = True, only_unique: bool = True, return_single_gate_results: bool = False) Array | List[Array]

Calculate the expectation value for PEPS unitcell depending on the gates set in the class.

Parameters:
  • peps_tensors (sequence of jax.numpy.ndarray) – The sequence of unique PEPS tensors in the unitcell.

  • unitcell (PEPS_Unit_Cell) – The PEPS unitcell.

  • spiral_vectors (single or sequence of jax.numpy.ndarray, optional) – If the expectation value is for a spiral iPEPS ansatz, in this argument the wavevectors are expected.

    Default: None

Keyword Arguments:
  • normalize_by_size (bool, optional) – Flag if the expectation value should be normalized by the number of tensors in the unitcell.

    Default: True

  • only_unique (bool, optional) – Flag if the expectation value should be calculated just once for each unique PEPS tensor in the unitcell.

    Default: True

Returns:

The expectation values for all gates. Single tensor if only one gate is applied.

Return type:

jax.numpy.ndarray or list of jax.numpy.ndarray

downward_triangle_gates: Sequence[Array]
is_spiral_peps: bool = False
normalization_factor: int = 3
operation_before_sum: Callable[[T_float_complex], T_float_complex] | None = None
spiral_unitary_operator: Array | None = None
upward_triangle_gates: Sequence[Array]
class varipeps.mapping.kagome.Kagome_Upper_Right_Expectation_Value(upward_triangle_gates: Sequence[Array], downward_triangle_gates: Sequence[Array], normalization_factor: int = 3, operation_before_sum: Callable[[T_float_complex], T_float_complex] | None = None)

Bases: Expectation_Model

Class to calculate expectation values for a mapped Kagome 3-PESS structure.

Parameters:
  • upward_triangle_gates (sequence of jax.numpy.ndarray) – Sequence with the gates that should be applied to the upward triangles.

  • downward_triangle_gates (sequence of jax.numpy.ndarray) – Sequence with the gates that should be applied to the downward triangles.

  • normalization_factor (int, optional) – Factor which should be used to normalize the calculated values. If for example three sites are mapped into one PEPS site this should be 3.

    Default: 3

__call__(peps_tensors: Sequence[Array], unitcell: PEPS_Unit_Cell, *, normalize_by_size: bool = True, only_unique: bool = True) Array | List[Array]

Calculate the expectation value for PEPS unitcell depending on the gates set in the class.

Parameters:
Keyword Arguments:
  • normalize_by_size (bool, optional) – Flag if the expectation value should be normalized by the number of tensors in the unitcell.

    Default: True

  • only_unique (bool, optional) – Flag if the expectation value should be calculated just once for each unique PEPS tensor in the unitcell.

    Default: True

Returns:

The expectation values for all gates. Single tensor if only one gate is applied.

Return type:

jax.numpy.ndarray or list of jax.numpy.ndarray

downward_triangle_gates: Sequence[Array]
normalization_factor: int = 3
operation_before_sum: Callable[[T_float_complex], T_float_complex] | None = None
upward_triangle_gates: Sequence[Array]
class varipeps.mapping.kagome.iPESS3_9Sites_Three_PEPS_Site

Bases: object

Map a 9-sites Kagome iPESS3 unit cell to PEPS structure using a PEPS unitcell consisting of three unique sites.

static unitcell_from_pess_tensors(up_simplex_1: ndarray | Array, up_simplex_2: ndarray | Array, up_simplex_3: ndarray | Array, down_simplex_1: ndarray | Array, down_simplex_2: ndarray | Array, down_simplex_3: ndarray | Array, site_A1: ndarray | Array, site_A2: ndarray | Array, site_A3: ndarray | Array, site_B1: ndarray | Array, site_B2: ndarray | Array, site_B3: ndarray | Array, site_C1: ndarray | Array, site_C2: ndarray | Array, site_C3: ndarray | Array, d: int, D: int, chi: int) PEPS_Unit_Cell

Create a PEPS unitcell from a Kagome 3-PESS 9-sites structure. To this end, the six simplex tensor and all nine sites are mapped into thre unique PEPS sites.

The axes of the simplex tensors are expected to be in the order: - Up1: PESS site A1, PESS site B1, PESS site C1 - Up2: PESS site A2, PESS site B2, PESS site C3 - Up3: PESS site A3, PESS site B3, PESS site C2 - Down1: PESS site C2, PESS site B1, PESS site A2 - Down2: PESS site C1, PESS site B2, PESS site A3 - Down3: PESS site C3, PESS site B3, PESS site A1

The axes site tensors are expected to be in the order connection to down simplex, physical bond, connection to up simplex.

The PESS structure is contracted in the way that all site tensors are connected to the up simplex and then the down simplex to site A{1,2,3}.

Parameters:
Returns:

PEPS unitcell with the mapped PESS structure and initialized environment tensors.

Return type:

PEPS_Unit_Cell