1-site iPEPS from lin. combination¶
Specialized class for iPEPS with single on-site tensor built as a linear combination of a set of elementary tensors e
where \(\vec{\lambda}\) is a vector of real coefficients, which are the variatonal parameters of this ansatz.
- class ipeps.ipeps_lc.IPEPS_LC_1SITE_PG(elem_tensors, coeffs, peps_args=<config.PEPSARGS object>, global_args=<config.GLOBALARGS object>)[source]¶
Bases:
IPEPS_LC
- Parameters:
elem_tensors (list(tuple(dict,torch.Tensor))) – elementary tensors
coeffs (dict) – coefficients combining elementary tensors into regular iPEPS
peps_args (PEPSARGS) – ipeps configuration
global_args (GLOBALARGS) – global configuration
Single-site iPEPS with on-site tensor built from a linear combination of elementary tensors. These elementary tensors are representatives of some point group irrep.
Currently supported combinations are real \(A_1\), and complex \(A_1 + iA_2\). Where elementary tensors e are assumed to be real representatives of either \(A_1\) or \(A_2\) irreps of \(C_{4v}\) point group. The on-site tensor is then built as
\[a = \sum_i \lambda_i e_{A_1;i} + i\sum_j \lambda_j e_{A_2;j}\]where \(\vec{\lambda}\) is a real vector.
Each elementary tensor is described by dict:
elem_tensors= [ ..., ({"meta": {"pg": "A_1"}, ...}, torch.Tensor), ..., ]
where the value of “pg” (specified inside dict “meta”) is either “A_1” or “A_2”.
- add_noise(noise)[source]¶
- Parameters:
noise (float) – magnitude of noise
Take IPEPS_LC_1SITE_PG and add random uniform noise with magnitude noise to vector of coefficients
coeffs
.
- build_onsite_tensors()[source]¶
- Returns:
sites
- Return type:
dict[tuple(int,int): torch.tensor]
Builds
sites
by combining elementary tensors.
- get_checkpoint()[source]¶
- Returns:
all data necessary to reconstruct the state. In this case member
sites
- Return type:
dict[tuple(int,int): torch.tensor]
This function is called by optimizer to create checkpoints during the optimization process.
- get_parameters()[source]¶
- Returns:
variational parameters of iPEPS
- Return type:
iterable
This function is called by optimizer to access variational parameters of the state.
- load_checkpoint(checkpoint_file)[source]¶
- Parameters:
checkpoint_file (str) – path to checkpoint file
Initializes the state according to the supplied checkpoint file.
Note
The vertexToSite mapping function is not a part of checkpoint and must be provided either when instantiating IPEPS_ABELIAN or afterwards.
- site(coord=(0, 0))[source]¶
- Parameters:
coord (tuple(int,int)) – vertex (x,y). Can be ignored, since the ansatz is single-site.
- Returns:
on-site tensor
- Return type:
torch.tensor
- write_to_file(outputfile, aux_seq=[0, 1, 2, 3], tol=1e-14, normalize=False)[source]¶
Write state to file. See
write_ipeps_lc_1site_pg()
- ipeps.ipeps_lc.from_json_str(json_str, aux_seq=[0, 1, 2, 3], peps_args=<config.PEPSARGS object>, global_args=<config.GLOBALARGS object>)[source]¶
- Parameters:
json_str – str describing IPEPS_LC_1SITE_PG in json format
aux_seq (list[int]) – array specifying order of auxiliary indices of on-site tensors stored in jsonfile
peps_args (PEPSARGS) – ipeps configuration
global_args (GLOBALARGS) – global configuration
- Returns:
wavefunction
- Return type:
A simple PBC
vertexToSite
function is used by defaultParameter
aux_seq
defines the expected order of auxiliary indices in input file relative to the convention fixed in tn-torch:0 1A3 <=> [up, left, down, right]: aux_seq=[0,1,2,3] 2 for alternative order, eg. 1 0A2 <=> [left, up, right, down]: aux_seq=[1,0,3,2] 3
- ipeps.ipeps_lc.read_ipeps_lc_1site_pg(jsonfile, aux_seq=[0, 1, 2, 3], peps_args=<config.PEPSARGS object>, global_args=<config.GLOBALARGS object>)[source]¶
- Parameters:
jsonfile (str or Path object) – input file describing IPEPS_LC_1SITE_PG in json format
aux_seq (list[int]) – array specifying order of auxiliary indices of on-site tensors stored in jsonfile
peps_args (PEPSARGS) – ipeps configuration
global_args (GLOBALARGS) – global configuration
- Returns:
wavefunction
- Return type:
A simple PBC
vertexToSite
function is used by defaultParameter
aux_seq
defines the expected order of auxiliary indices in input file relative to the convention fixed in tn-torch:0 1A3 <=> [up, left, down, right]: aux_seq=[0,1,2,3] 2 for alternative order, eg. 1 0A2 <=> [left, up, right, down]: aux_seq=[1,0,3,2] 3
- ipeps.ipeps_lc.write_ipeps_lc_1site_pg(state, outputfile, aux_seq=[0, 1, 2, 3], tol=1e-14, normalize=False)[source]¶
- Parameters:
state (IPEPS_LC_1SITE_PG) – wavefunction to write out in json format
outputfile – target file
aux_seq (list[int]) – array specifying order in which the auxiliary indices of on-site tensors will be stored in the outputfile
tol (float) – minimum magnitude of tensor elements which are written out
normalize (bool) – if True, on-site tensors are normalized before writing
Parameter
aux_seq
defines the order of auxiliary indices relative to the convention fixed in tn-torch in which the tensor elements are written out:0 1A3 <=> [up, left, down, right]: aux_seq=[0,1,2,3] 2 for alternative order, eg. 1 0A2 <=> [left, up, right, down]: aux_seq=[1,0,3,2] 3