adpeps.ipeps.ctm¶
Main CTM code
The individual site and boundary tensors come in a special list-type object (TList), which has extra indexing features, such as periodic boundary conditions and shift contexts
All ncon contractions are defined in contractions.yaml
-
class
CTM
(tensors, chi, conv_fun=None)[source]¶ CTM class
- Parameters
tensors (adpeps.utils.ctmtensors.CTMTensors) – input ctmtensors
chi (int) – boundary bond dimension
-
property
converged
¶ Check convergence with supplied convergence function
-
do_bottom
(ts, chi)[source]¶ Perform bottom CTM move
- Parameters
ts (adpeps.utils.ctmtensors.CTMTensors) – input tensors
chi (int) – boundary bond dimension
- Returns
updated tensors
- Return type
ts
- Return type
-
do_left
(ts, chi)[source]¶ Perform left CTM move
- Parameters
ts (adpeps.utils.ctmtensors.CTMTensors) – input tensors
chi (int) – boundary bond dimension
- Returns
A tuple containing
tensors (CTMTensors): updated tensors
sl (np.ndarray): singular values of C1 (for convergence)
- Return type
Tuple
[CTMTensors
,ndarray
]
-
do_right
(ts, chi)[source]¶ Perform right CTM move
- Parameters
ts (adpeps.utils.ctmtensors.CTMTensors) – input tensors
chi (int) – boundary bond dimension
- Returns
updated tensors
- Return type
ts
- Return type
-
do_top
(ts, chi)[source]¶ Perform top CTM move
- Parameters
ts (adpeps.utils.ctmtensors.CTMTensors) – input tensors
chi (int) – boundary bond dimension
- Returns
updated tensors
- Return type
ts
- Return type
-
get_projectors
(T1, T2, chi)[source]¶ Contracts the corners together and computes the projectors by performing an svd
- Parameters
T1 (int) –
-
get_projectors_bottom
(ts, chi)[source]¶ Returns the bottom projectors
- Return type
Tuple
[ndarray
,ndarray
,ndarray
]- Parameters
chi (int) –
-
get_projectors_left
(ts, chi)[source]¶ Returns the left projectors
- Return type
Tuple
[ndarray
,ndarray
,ndarray
]- Parameters
chi (int) –
-
get_projectors_right
(ts, chi)[source]¶ Returns the right projectors
- Return type
Tuple
[ndarray
,ndarray
,ndarray
]- Parameters
chi (int) –
-
get_projectors_top
(ts, chi)[source]¶ Returns the top projectors
- Return type
Tuple
[ndarray
,ndarray
,ndarray
]- Parameters
chi (int) –
-
renorm_left
(ts, Pl, Plb)[source]¶ - Return type
- Parameters
Pl (jax._src.numpy.lax_numpy.ndarray) –
Plb (jax._src.numpy.lax_numpy.ndarray) –
-
renormalize
(tensors, chi)[source]¶ Performs a CTM iteration Updates all sites in the unit cell
- Parameters
tensors (adpeps.utils.ctmtensors.CTMTensors) – input ctmtensors
chi (int) – boundary bond dimension
- Returns
A tuple containing
tensors (CTMTensors): updated tensors
S (np.ndarray): singular values of C1 (for convergence)
- Return type
Tuple
[CTMTensors
,ndarray
]