You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ This is an idea I had that can be implemented in the future. We can experiment with it in other branch and decide on it in the future.
Currently, a Ansatz Tensor Network object cannot change its Ansatz type; you need to create a new object because the Ansatz is a part of its type (and the type of an object cannot be changed in Julia).
The motivation for being able to dynamically change the Ansatz of a Tensor Network is that during execution, operations performed into it can change its representation. Some examples are:
(Mixed-)Canonization of a MPS/MPO
MPS contraction of PEPS
...
In order to allow it, the way to go would be to stop the TensorNetwork type hierarchy in Ansatz, make Ansatz a concrete type and add a mutable field with the ansatz trait on it. The ansatz trait object type would be used for dynamic dispatch and its fields could be used for ansatz information (e.g. the orthogonality center in a mixed-canonized MPS).
The text was updated successfully, but these errors were encountered:
Currently, a
Ansatz
Tensor Network object cannot change itsAnsatz
type; you need to create a new object because theAnsatz
is a part of its type (and the type of an object cannot be changed in Julia).The motivation for being able to dynamically change the
Ansatz
of a Tensor Network is that during execution, operations performed into it can change its representation. Some examples are:In order to allow it, the way to go would be to stop the
TensorNetwork
type hierarchy inAnsatz
, makeAnsatz
a concrete type and add a mutable field with the ansatz trait on it. The ansatz trait object type would be used for dynamic dispatch and its fields could be used for ansatz information (e.g. the orthogonality center in a mixed-canonized MPS).The text was updated successfully, but these errors were encountered: