Last active
October 2, 2019 23:25
-
-
Save chaserileyroberts/b425bf684ef91fc651cb45a04d84b7aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensornetwork as tn | |
import numpy as np | |
net = tn.TensorNetwork() | |
a = net.add_node(np.eye(2)) | |
b = net.add_node(np.eye(2)) | |
a[0] ^ b[0] # Same as net.connect(a[0], b[0]) | |
result = a @ b # Same as net.contract_between(a, b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment