v0.3.17 - 2024-09-06
- tetragono: Add neural network state based on sampling methods.
- tetraku: Add quantum chemistry model which reads Hamiltonian in openfermion format.
- tetragono: Add support for tracing repeated points when setting hamiltonian term. To use this feature, call
state.hamiltonians.trace_repeated
after all the hamiltonian term has been set. For those term which will not be traced, user could exchange the edge indices and points at the same time. For example a tensor with edges name as[O0, I0, O1, I1]
on points(0,0,0)
and(0,0,1)
, we can rename the tensor edge to[O1, I1, O0, I0]
(it is rename, not transpose!), and apply it to points(0,0,1)
and(0,0,0)
, and the system does not change. But for terms which may be traced, we cannot exchange them. The order of edge indices hint the rule how to trace if points duplicated. - tetragono: Add support to combine hamiltonian terms on the same group of points with different orders by
sort_points
, which make the program faster for simple update and exact update. - tetragono: Add support to check whether the hamiltonians is hermitian by
check_hermite(threshold)
, which requiressort_points
invoked first.
- tetragono: Remove SIGINT handle in gradient descent.
- tetragono: Fix the import issue in tetragono.
- tetragono: Fix missing signal SIGUSR1 in windows platform.
v0.3.16 - 2024-03-20
- tetragono: Fix the missing conjugate for the energy during calculation of natural gradient.
- tetragono: Fix the compatibility for old version python. Some previous codes uses syntax introduced in python 3.11.
v0.3.15 - 2024-02-28
- TAT.py: Add
const_blocks
for tensor to get the const block which will not check the ownership. - tetragono: Add
__contains__
and__len__
for hamiltonians handle of abstract state. - bridge: Add support for bridging from TNSP new format.
- tetragono: Stop saving configuration for ergodic sampling method during gradient descent.
- tetragono: Add function to convert sampling lattice back to simple update lattice.
- tetragono: Add support for simple update for long range two body interaction.
- TAT.hpp: Rename the aliases of the symmetry types, the details are shown in the next item.
- TAT.py: Rename the names of the symmetry types, since the previous naming is not consistent:
old name new name No No Z2 BoseZ2 U1 BoseU1 Fermi FermiU1 FemriZ2 FermiU1BoseZ2 FermiU1 FermiU1BoseU1 Parity FermiZ2 FermiFermi FermiU1FermiU1 - TAT.py: Use
scikit-build-core
as build backend.MAKEFLAGS
andCMAKEFLAGS
are droped. Usescikit-build-core
environment variableSKBUILD_CMAKE_ARGS
to pass arguments to cmake command line when buildingPyTAT
wheel. - tetragono: Use Lanczos algorithm instead of previous power iteration to optimize exact state.
update
function for exact state does not have the second parameterapproximate_energy
any more, andex_update
in tetragono shell does not have the second parameter either. - TAT.hpp: Change the default exponential iteration step to
8
from2
, since in practice, it is difficult forstep=2
to convege to a usable result.
- tetragono: Remove merging Hamiltonians before simple update automatically.
- TAT.py: Fix a bug in loading Symmetry or Edge.
- bridge: Fix several bugs in tnsp bridge, because of the TAT interface changes a lot since the first release of tnsp bridge.
- TAT.py Fix wrong arguments number for function
__deepcopy__
of tensor. - TAT.hpp: Fix a bug when reading tensors from text data with ANSI control char mixed.
v0.3.12 - 2023-11-29
- TAT.py:
edges[int]
andedge_by_name(str)
are the new interface for indexing edges in tensor, the previous interface has been deprecated. - TAT.py: Add copy constructor for
Symmetry
,Edge
andTensor
.
- TAT.hpp: The names of all inplace functions are renamed with a suffix
_
. - TAT.py: The names of all inplace functions are renamed with a suffix
_
.
- TAT.py:
edges(str)
andedges(int)
is deprecated for tensor.
- tetraux: Package tetraux is removed, because it is useless since ansatz product state removed.
- tetragono:
gm_bin_run
andgm_alpha
are removed.gm_bin_run
is removed since it only works for sweep sampling, but there is a better way to do so: sampling multiple Markov Chain in the same process.gm_alpha
is removed since user should set attribute of the state manually instead.
- TAT.hpp: Fix type mutability information in declaration of LAPACK function
?gesvd
.
v0.3.11 - 2023-11-22
- tetragono: Add
gm_conf_eq
to equilibrium the configuration of the sampling lattice. - TAT.py: Add
TAT.parity
,TAT.arrow
to convert+1
toFalse
and-1
toTrue
.
- tetragono: The physics edge index should be non-negative now.
- tetragono: Use MPI IO to speed up the performance of configurations. Previously, every process will read all configuration and choose a single configuration when reading, and allgather all configuration and write to file when writing. Now, the program uses MPI IO to write file parallelly, and read the corresponding configuration directly without read all configurations.
- tetragono: Yield measurement result before save state and configuration in gradient descent of sampling lattice. Since user may want to update attributes out of yield.
- tetragono: Allow user to set hamiltonian term on the same positions multiple times, which allows user to use
state.hamiltonians[positions]+=tensor
. Previously, the program will throw error saying hamiltonian term has already been set, but recently, some models need adding term on the same positions.
- tetragono: Remove ansatz product state support, which may be added again in the future, but it require many updates.
- tetragono: Fix bug when total sampling number less than process number in sampling gradient.
v0.3.9 - 2023-09-07
- tetragono: The interface of
save_result
allow only(state, result, whole_result)
now. - TAT.hpp: Change the view of sign problem in
conjugate
, there is only one conjugate, but the trivial metric may not be positive definite, so in gradient descent, this negative metric term need to be considered, the optional paramtertrivial_metric
is used to apply the trivial metric when conjugating. - TAT.py: Update the new interface of
conjugate
. - TAT.py: Use customized string stream in
TAT.py
to avoid a duplicated copy of string. - TAT.hpp: Check the larger tensor to try to fit the common edges in contract, if not proper, check the other one. The previous behavior always check tensor 1 firstly and check tensor 2 secondly.
- scalapack.py: Change the loader API. The previous way is
from PyScalapack import Scalapack
and usingScalapack("libscalapack.so")
to get the scalapack object, Now user should useimport PyScalapack
andPyScalapack("libscalapack.so")
directly.
- TAT.hpp: Remove deprecated tensor member function
get_rank
,find_rank_from_name
andget_rank_from_name
.
- TAT.hpp: Fix a bug about parity sign when
merge_map
is empty. - TAT.hpp: Fix invalid access to a empty
vector
when splitting the first edge into zero edges. - TAT.hpp: Fix out of range pointer error when try to split a trivial edge
{{Symmetry(), 1}}
to no edge, or merge no edge into a trivial edge. - TAT.hpp: Fix an out of range bug in
identity.hpp
. It created a pod vector with memory reserved and use the item directly previously, without resize, which would not cause critical issue in fact. Emplace the item when using now.
v0.3.7 - 2023-08-15
- tetragono: Add support to calculate deviation of the observer set as a whole, which is useful since many observables are the summation of several local observables.
- tetragono: Add arguments support for
gm_conf_create
andap_conf_create
in tetragono shell. - tetragono: Add a member dict called
attribute
toAbstractState
, which may contain customed data used by user.
- tetragono:
save_result
accept another parameter, which is the total result of the whole observers set. Its signature isstate
,result
,whole_result
andstep
now. - tetraku: Change the defnition of x/y/z link in kitaev model. The bond inside one tensor is z link now.
- tetragono:
gm_run(_g)
will now return/yield all the measurement result instead of energy only.
- tetragono: The previous signature of
save_result
:state
,result
andstep
is deprecated.
- tetragono: Remove the deprecated function
natural_gradient
and the deprecated paramtermetric_inverse_epsilon
forgm_run
.
v0.3.6 - 2023-05-26
- TAT.hpp: Add
clear_fermi_symmetry
for tensor with fermionic symmetry, which convert the tensor to the simplest fermionic tensor, tensor with parity symmetry. - TAT.py: Add python binding for
clear_fermi_symmetry
. - tetragono: Check whether the state is
None
when dump the state to file to avoid overwriting file by mistake. - tetragono: Add
gm_clear_symmetry
for sampling lattice. - tetragono: Add
gm_run_g
andap_run_g
for middle level API. These are generators, which yield the energy of the state before gradient descent after every gradient step. - TAT.hpp:
Cut
is used directly for the dimension cut in svd.Cut
will detect the type of the input to determine whether it is relative cut or remain cut, if nothing provided, the behavior of previousNoCut
will be used. And user could also set remain cut and relative cut together.
- tetragono:
new_dimension
in simple update will be intepreted as the threshold of singular value when it is float. - TAT.hpp, TAT.py:
clear_symmetry
will return NoSymmetry tensor or ParityTensor based on whether the original tensor is fermionic. The previous behavior would give NoSymmetry tensor only, which is dangerous for fermionic tensor, is renamed toclear_bose_symmetry
.
- TAT.hpp:
NoCut
,RemainCut
,RelativeCut
is deprecated, please useCut
directly.
- tetragono: Fix a bug in merging physical edges during simple update. When the hamiltonian on single site with a large dimension is operated, the dead loop would occur previously.
v0.3.5 - 2023-04-01
- tetragono: Add common used tensors for parity symmetry and some related tensor in Hubbard model with parity symmetry.
- scalapack.py: Add documents for scalapack.py.
- tetraku: Add tV model.
- tetragono Add
numpy_hamiltonian
in tetragono shell to export the Hamiltonian of a model to a file in numpy array format.
- tetraku: Density matrix of Heisenberg/tJ/Hubbard model are renamed to
gibbs_*
fromdensity_matrix_*
. - tetragono: Simple update will check to avoid merge physical edges into a single edge with very large dimension. It
will only merge edges if the result edge has the dimension less equal to the
threshold
, which is6
by default. - tetragono: Use better method to estimate the variance of measurement results observed by the sampling method.
- tetragono: Tetragono shell will not refresh the corresponding configuration when creating or loading ap or gm state. Since sometimes user may want to share the configuration between states.
- tetragono: Use pseudo inverse directly in conjugate gradient method.
- TAT.py: Use mt19937(64 bit) as the random generator instead of c++ default random generator which may be different on different platforms.
- tetragono: The mirror direct sampling is removed, since it is useless according to the test result.
- tetragono: Fix bug in min-SR method when the model is complex, A conjugate operator was missing.
- tetragono: Avoid
nan
in pseudo inverse of min-SR by checking whether the eigenvalue is zero first. - tetragono: Fix the missing imaginary part of energy when calculating gradient.
- tetraku: Fix the wrong Hamiltonian for Gibbs state of Fermionic system.
- tetraku: Fix the wrong sign of chemical potential for density matrix of tJ model.
- TAT.py: Fix typo in the class name of parity symmetry.
v0.3.3 - 2022-03-09
- tetragono: Add mirror direct sampling which is only used for Gibbs state on square lattice, and maintains the symmetry of the Gibbs state.
- TAT.py: Add
dtype
andbtype
class member forTensor
object, which makes it easier to communicate with numpy. - scalapack.py: Add a python wrapper for scalapack.
- tetragono: Use the
PyScalapack
to speed up min-SR method. User need to specify the path of scalapack dynamic link libraries by parameterscalapack_libraries
forgm_run
whennatural_gradient_by_direct_pseudo_inverse
enabled. - TAT.py: Change the module alias name convension,
float
andcomplex
without bytes specified would be considered as double precision now.
- tetragono: Fix a bug when try to save a file with directory name. The previous program only allows to save file into the current directory.
v0.3.2 - 2022-02-28
- tetragono: Add
natural_gradient_by_direct_pseudo_inverse
to calculate natural gradient for sampling lattice. And add parameteruse_natural_gradient_by_direct_pseudo_inverse
(default is False),natural_gradient_r_pinv
andnatural_gradient_a_pinv
for high/mid-level API ingm_run
to use direct pseudo inverse to calculate natural gradient. - tetraku: Add Hamiltonian to another part of density matrix for density matrix of Heisenberg/Hubbard/tJ model. It is
to ensure the result density is unitary despite of errors introduced by contract and approximation. This is controled
by a new parameter
side
which is either1
or2
, default is1
, which has the same behavior with before.
- TAT.py:
sqrt
will calculate the square root of absoluate value in tensor elementwisely, instead of square root of value itself and returnnan
for negative number. - tetraux: Move
Configuration
for ansatz product state to an individual package namedtetraux
fromTAT.py
, which is not related to the tensor itself.
- tetragono:
natural_gradient
for observer object is deprecated, users should specify the method to calculate natural gradient explicitly, which arenatural_gradient_by_direct_pseudo_inverse
andnatural_gradient_by_conjugate_gradient
.
v0.3.1 - 2023-02-21
- TAT.py: Add binding for functions of Edge introduced in v0.3.0 such as
point_by_index
.
- TAT.py: Update the function arguments names to keep the same with those in c++ side.
- TAT.py: Remove navigator of TAT.py to get tensor type directly, please use module alias instead. For example, previous code such as `TAT(“No”, np.float64)` should be updated to `TAT.Normal.float64.Tensor`.
- TAT.py: Remove optional FastName binding, which is useless in python side in fact.
v0.3.0 - 2022-11-15
- tetragono: Tetragono will print backtrace of the current process when receiving SIGUSR1.
- tetragono: Add squash support for sampling lattice.
- TAT.hpp: Use the multidimension span to record blocks in tensor, instead of the previous map data structure, some
related API is also updated. Detail update is followed:
- About data
- Tensor blocks is stored in a new order other than old version, the previous use a map from symmetry list to data
block, which follows the lexicographical order of symmetry list. The new order follows the lexicographical order
of the symmetry position list for a data block. Inside the data structure, the blocks are stored in a simple and
raw tensor like structure called
multidimension_span
. - Because of the block order update, use random number to fill a tensor will return a different one other than the previous version even with the same random seed.
- The edge is now assumed stable, That is to say the edge will not lose any segment during operations. In the previous version, the edge segment will be erased if no block in the tensor using that segment.
- Tensor blocks is stored in a new order other than old version, the previous use a map from symmetry list to data
block, which follows the lexicographical order of symmetry list. The new order follows the lexicographical order
of the symmetry position list for a data block. Inside the data structure, the blocks are stored in a simple and
raw tensor like structure called
- About edge API
- The type
edge_segment_t
is renamed toedge_segments_t
because it is really several segments, not only one segment. - Some old function was renamed, such as
get_point_from_index
topoint_by_index
. The old name is deprecated and will be removed later. - Drop the support for reorder segments.
- Use
edge.segment()
to obtain the real segment for an edge, instead of the original way to access memberedge.segment
directly.
- The type
- About tensor API
- Some old function was renamed, such as
get_rank_from_name
torank_by_name
. The old name is deprecated and will be removed later. - Use
tensor.names()
to obtain the tensor edge names, instead of the original way to access membertensor.names
directly. - Because the edge is stable now, scalar operations on two tensor with segment and block mising is not allowed now.
- Some old function was renamed, such as
- About data
- tetragono: Update line search strategy, remove
line_search_error_threshold
, addline_search_parameter
inap_run
andgm_run
.line_search_parameter
multipliedstep_size
obtained by line search will be the real step size used to update the state.
- tetragono:
gm_data_load
is removed, please usegm_hamiltonian
to replace the hamiltonian instead. - wrapper:
wrapper_TAT
is removed.
- tetragono: Fix the wrong error message when trying to import module used by
ex_create
,ap_ansatz_mul
and so on.
v0.2.23 - 2022-10-09
- tetragono: Add
ap_hamiltonian
to replace the hamiltonian of the ansatz product state in tetragono shell. - tetragono: Add
multichain_number
forap_run
, which will run multiple chains inside the same MPI process. - wrapper: Add python package
wrapper_TAT
to provide a wrapper over torch to provide similar interface asTAT.py
. - tetragono: Add
observe_max_batch_size
option forap_run
, which will set the max limit of batch size when calculating wss.
- tetragono:
gm_data_load
is deprecated, it will be removed in the future, please usegm_hamiltonian
to replace the hamiltonian instead.
- tetragono:
save_state_interval
option forgm_run
andap_run
is removed. The state will be saved for every step.
v0.2.22 - 2022-09-02
- tetragono: Add
save_configuration_file
option forgm_run
andap_run
in tetragono shell, which saves sampling configurations during gradient descent. - tetragono: Add list as interface for
rename_io
intetragono.common_tensor.tensor_toolkit
. Original argument such as{0: a, 1: b, 2: c}
can be written as[a, b, c]
.
- tetragono:
save_state_interval
option forgm_run
andap_run
is deprecated. The state will be saved for every step ifsave_state_file
was not set in the future.
- tetragono: The original function name
create
to create lattice is removed, which was deprecated in v0.2.18. The new function name to create lattice isabstract_lattice
. - tetragono:
_owner
of Configuration for sampling lattice and ansatz product state is removed, useowner
instead.
- TAT.hpp: Fix an internal compiler error for some old compiler, caused by the feature: fusing edges during tracing.
v0.2.20 - 2022-08-02
- tetraku: Add models data and ansatzes data into an individual package named
tetraku
. - tetragono: Configuration use
owner
to get the owner sampling lattice object of this configuration object, instead of the previous_owner
. - TAT.hpp: Add fusing edges support when
trace
a tensor, to keep the consistency with functioncontract
. - TAT.py: Add fusing edges argument binding for function
trace
of the tensor.
- tetragono: Rename multiple product state to ansatz product state, to avoid the ambiguous abbreivation. Rename all
mp_xxx
toap_xxx
in tetragono shell. - TAT.hpp: Two new internal names used by user customed name type are added:
Trace_4
andTrace_5
. For the simple internal name usage, two new default internal names are added:Default_3
andDefault_5
.
- tetragono:
_owner
of Configuration for sampling lattice is deprecated, useowner
instead.
- TAT.hpp: Fix a bug in windows platform when copying an edge with fermi symmetry.
v0.2.19 - 2022-07-13
- tetragono: Add a new command
gm_hamiltonian
to replace the Hamiltonian of the existent sampling lattice. - tetragono: Add
conjugate_gradient_method_error
option forgm_run
andmp_run
in teragono shell. The conjugate gradient will stop ifconjugate_gradient_method_step
reached ORconjugate_gradient_method_error
reached. Setconjugate_gradient_method_error
to0.0
to skip error checking or setconjugate_gradient_method_step
to-1
to skip step checking.
- lazy: Using a manual stack to run the recursion now, to avoid the recursion depth limit.
- tetragono: Fix a problem when calling
gm_data_load
in tetragono shell. - tetragono: Fix a bug in calculating the natural gradient of a complex tensor network state.
- tetragono: Fix a bug in calculating the expect and the deviation in the ergodic sampling with subspace restricted.
v0.2.18 - 2022-06-28
- tetragono: Add compatibility support for python3.8.
- tetragono: Add
ex_create
command for tetragono shell, which callsabstract_state
to create anexact_lattice
. - tetragono: Add the multiple product state, which is the supertype of the string bond state and the convolutional neural network state, and add its high-level API in tetragono.shell.
- tetragono: The function name to create a lattice changes from
create
toabstract_lattice
. And it is recommended to split it into two parts:abstract_state
to create an abstract state andabstract_lattice
to convert the abstract state into an abstract lattice. - tetragono: The epsilon to avoid the singularity of the metric in the natural gradient method is relative now.
- tetragono: The original function name
create
to create lattice is deprecated.
v0.2.17 - 2022-06-12
- tetragono: Add support for changing the hamiltonian of an existent sampling lattice. To do it, create a lattice with
target hamiltonians and then call
gm_data_load(file_name)
to replace tensors with data stored in filefile_name
. For low-level API,lattice_1._lattice = lattice_2._lattice
could replace tensor data directly. - TAT.py: Add edge fusing support when contracting two tensors.
- TAT.hpp: Add support for being compiled by MSVC or Intel ICC.
- tetragono: Avoid data files being destroyed if a file system error appears when saving, such as the size limit of quota reached.
- tetragono: Submodule
common_variable
is removed, please usecommon_tensor
orcommon_toolkit
instead.
- TAT.hpp: Fix selecting the wrong constructor of
Edge
when using two vector iterators to constructEdge
. - TAT.hpp: Fix bug when tensor SVD with relative cut cutting nothing.
v0.2.13 - 2022-04-26
- tetragono: Allow passing function directly instead of module name string of various interface of mid-level API,
including
restrict
for restricting subspace,measurement
for measuring values,initial_configuration
for initializing sampling configurations, andhopping_hamiltonians
for fake hamiltonians used by sweep sampling. - tetragono: Add
load_configuration
to load configuration from a saved file to aConfiguration
object for low-level API. - tetragono: Add classical term of energy for sampling lattice. To do it, call
observer.set_classical_energy(classical_energy)
to set a function with configuration as input, and returns a float as classical energy. For mid-level API, pass a module containing functionclassical_energy
or the function itself as parameterclassical_energy
togm_run
orgradient_descent
.
- tetragono: Using
hopping_hamiltonians
instead of originalhamiltonians
for the name of function which generates fake hamiltonians used by sweep sampling. - tetragono: Updating interface for generating initial sampling configuration(
initial_configuration
). Previously,state
andDc
are given, it is needed to createConfiguration
manually. Currently, the input function will get initiatedConfiguration
, and set configuration on it directly. - tetragono: Configuration information is maintained by three mid-level API now:
gm_conf_create
,gm_conf_load
, andgm_conf_dump
. Callgm_conf_load(file_name)
to load configuration from file. Callgm_conf_dump(file_name)
to dump configuration to file aftergm_run
. Callgm_conf_create(initial_configuration)
to using functioninitial_configuration
to initialize configuration. - tetragono: Rename parameter name
sweep_initial_configuration
tosampling_configurations
. Generally, this parameter is not used directly by mid-level API, and it is needed to usegm_conf_create/load/dump
to manipulate it. In the low-level API environment,load_configuration
may be used to create configuration passed tosampling_configurations
.