acetn.renormalization package
Submodules
acetn.renormalization.ctmrg module
- acetn.renormalization.ctmrg.ctmrg(ipeps, config)
Runs the CTMRG algorithm for a specified number of steps.
Depending on whether the iPEPS is distributed or not, the algorithm performs boundary tensor updates in left-right and up-down directions.
- Args:
ipeps (Ipeps): The iPEPS object representing the tensor network. config (dict): The CTMRG Configuration dictionary.
acetn.renormalization.directional_mover module
- class acetn.renormalization.directional_mover.DirectionalMover(config)
Bases:
objectClass for performing directional moves involved in iPEPS boundary renormalization.
This class implements tensor renormalization moves updating iPEPS boundary tensors in both left-right and up-down directions. It supports both distributed and non-distributed computations.
- calculate_down_projectors(ipeps, xi, yi)
Calculates the projectors for the down boundary at position (xi, yi).
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. xi (int): The x-coordinate index of the boundary. yi (int): The y-coordinate index of the boundary.
- Returns:
tuple: The calculated down projectors.
- calculate_left_projectors(ipeps, xi, yi)
Calculates the projectors for the left boundary at position (xi, yi).
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. xi (int): The x-coordinate index of the boundary. yi (int): The y-coordinate index of the boundary.
- Returns:
tuple: The calculated left projectors.
- calculate_right_projectors(ipeps, xi, yi)
Calculates the projectors for the right boundary at position (xi, yi).
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. xi (int): The x-coordinate index of the boundary. yi (int): The y-coordinate index of the boundary.
- Returns:
tuple: The calculated right projectors.
- calculate_up_projectors(ipeps, xi, yi)
Calculates the projectors for the up boundary at position (xi, yi).
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. xi (int): The x-coordinate index of the boundary. yi (int): The y-coordinate index of the boundary.
- Returns:
tuple: The calculated up projectors.
- down_move(ipeps, yi)
Performs the down boundary move for a given row index yi.
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. yi (int): The y-coordinate index of the boundary to be updated.
- left_move(ipeps, xi)
Performs the left boundary move for a given column index xi.
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. xi (int): The x-coordinate index of the boundary to be updated.
- left_right_move_dist(ipeps, x1, x2)
Performs the distributed left-right boundary move for columns x1 and x2.
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. x1 (int): The x-coordinate index of the left boundary. x2 (int): The x-coordinate index of the right boundary.
- renormalize_boundary(ipeps, proj1, proj2, s1, s2, i, j, k)
Renormalizes the boundary tensors of the iPEPS by applying projectors.
This method updates the boundary tensors of the iPEPS by performing tensor renormalization on the C and E tensors at the given boundary sites. The updates are based on the projectors provided and the direction specified by the parameter k.
- Args:
ipeps (IPEPS): The iPEPS object containing the tensor network. proj1 (dict): Projectors for the first boundary. proj2 (dict): Projectors for the second boundary. s1 (tuple): Coordinates of the first boundary tensor. s2 (tuple): Coordinates of the second boundary tensor. i (int): Index for the first boundary (used to index into proj1 and proj2). j (int): Index for the second boundary (used to index into proj1 and proj2). k (int): The boundary direction (0 for left, 1 for up, 2 for right, 3 for down).
This method modifies the C and E tensors at the boundary sites s2 based on the projectors.
- static renormalize_cj1(ci, ei, proj)
Renormalizes the C tensor for the first boundary based on the projectors.
This method performs a series of tensor contractions to renormalize the C tensor at the first boundary site using the provided E tensor and projector.
- Args:
ci (Tensor): The C tensor of the first boundary site. ei (Tensor): The E tensor of the first boundary site. proj (Tensor): The projector for the boundary.
- Returns:
Tensor: The renormalized C tensor after contraction and normalization.
- static renormalize_cj2(ci, ei, proj)
Renormalizes the C tensor for the second boundary based on the projectors.
This method performs a series of tensor contractions to renormalize the C tensor at the second boundary site using the provided E tensor and projector.
- Args:
ci (Tensor): The C tensor of the first boundary site. ei (Tensor): The E tensor of the first boundary site. proj (Tensor): The projector for the boundary.
- Returns:
Tensor: The renormalized C tensor after contraction and normalization.
- static renormalize_ej(ei, ai, proj2, proj1)
Renormalizes the E tensor for the second boundary based on the projectors.
This method performs a series of tensor contractions to renormalize the E tensor at the second boundary site using the provided ai tensor and the projectors for both boundaries.
- Args:
ei (Tensor): The E tensor of the first boundary site. ai (Tensor): The A tensor at the first boundary site, used for contraction. proj2 (Tensor): The projector for the second boundary. proj1 (Tensor): The projector for the first boundary.
- Returns:
Tensor: The renormalized E tensor after contraction and normalization.
- right_move(ipeps, xi)
Performs the right boundary move for a given column index xi.
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. xi (int): The x-coordinate index of the boundary to be updated.
- up_down_move_dist(ipeps, y1, y2)
Performs the distributed up-down boundary move for rows y1 and y2.
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. y1 (int): The y-coordinate index of the up boundary. y2 (int): The y-coordinate index of the down boundary.
- up_move(ipeps, yi)
Performs the up boundary move for a given row index yi.
- Args:
ipeps (IPEPS): The iPEPS object representing the tensor network. yi (int): The y-coordinate index of the boundary to be updated.
acetn.renormalization.projectors module
- class acetn.renormalization.projectors.ProjectorCalculator(config)
Bases:
objectComputes projectors for iPEPS tensor networks using full or half-system contractions.
- calculate_full_system(ipeps, sites, k)
Computes projectors using full-system contraction.
- Args:
ipeps (object): iPEPS tensor network. sites (list[int]): Four site indices. k (int): Bond direction index.
- Returns:
tuple[Tensor, Tensor]: Left and right projectors.
- calculate_half_system(ipeps, sites, k)
Computes projectors using half-system contraction.
- Args:
ipeps (object): iPEPS tensor network. sites (list[int]): Four site indices. k (int): Bond direction index.
- Returns:
tuple[Tensor, Tensor]: Left and right projectors.
- calculate_projectors(R1, R2, F, chi)
Computes projectors via SVD of the intermediate contraction.
- Args:
R1 (Tensor): Half-system contraction part 1. R2 (Tensor): Half-system contraction part 2. F (Tensor): Full-system contraction. chi (int): Max bond dimension.
- Returns:
tuple[Tensor, Tensor]: Left and right projectors.
- contract_full_system(ipeps, sites, k)
Contracts four sites to form full-system intermediate tensors.
- Args:
ipeps (object): iPEPS tensor network. sites (list[int]): Four site indices. k (int): Bond direction index.
- Returns:
tuple[Tensor, Tensor, Tensor]: Half-system contractions R1, R2, and their product F.
- contract_half_system(ipeps, sites, k)
Contracts four sites to form half-system intermediate tensors.
- Args:
ipeps (object): iPEPS tensor network. sites (list[int]): Four site indices. k (int): Bond direction index.
- Returns:
tuple[Tensor, Tensor, Tensor]: Q1, Q4, and the half contraction result.
- static make_quarter_tensor(site_tensor, k)
Builds a quarter tensor from site tensors and environments.
- Args:
site_tensor (object): iPEPS site tensor with bonds and environments. k (int): Bond direction index.
- Returns:
tuple[Tensor, tuple]: Reshaped quarter tensor and its original shape.
- set_calculate()
Sets the calculate method based on the projector type.
- Raises:
ValueError: If projector type is invalid.
- svd(A, cD)
Performs singular value decomposition (SVD), full-rank or RSVD on matrix A.
- Args:
A (Tensor): Input matrix. cD (int): Target dimension (used for RSVD).
- Returns:
tuple[Tensor, Tensor, Tensor]: SVD result (U, S, V).