Change Default Backend to Numpy
chaserileyroberts
released this
12 Sep 22:12
·
369 commits
to master
since this release
We have changed the default backend to numpy. This is a BREAKING CHANGE. To fix your code, you can simply do tensornetwork.set_default_backend("tensorflow")
at the top of your main file.
- Slice notation has been added to accessing a node's edges. Simple do
node[:3]
to get the edges for the first 3 axes in a node. - Contraction algorithms for
optimal
,branch
andgreedy
now require anoutput_edge_order
when there is more than one dangling edge in the network. This is to prevent a user from accidentally depending on a non-deterministic edge order after the network contraction. CopyNode
s can now be created outside of aTensorNetwork
, so nownet.add_node(tensornetwork.CopyNode(...))
is the preferred way to add a copy node to a network. We will be removingnet.add_copy_node
in the future.- Added
net.split_node_qr
andnet.split_node_rq
methods that do QR decomposition of aNode
. - Added
net.copy
operation that will copy aTensorNetwork
. This copied network will keep the same tensors objects between the two nodes. This is to make taking gradients of nodes relative to the final contracted value much easier. - Added a
conj
option tonet.copy(conj=True)
. This will copy theTensorNetwork
and conjugate all of the tensors in the network. This is useful for calculating things like reduced density matrices. - Added
net.save(..)
andtensornetwork.load(...)
methods for saving and loading aTensorNetwork
object. - Removed support for python 3.5. If this is a blocker for you, please raise a github issue to readd support.