-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contract() should accept a Chain as input #183
Comments
|
oh I just thought if it works for a TN, then it should also work for an MPS - it could even be useful for some benchmark at some point |
Closing because this works with the latest PR #172 julia> using Tenet
Precompiling Tenet
1 dependency successfully precompiled in 3 seconds. 50 already precompiled.
[ Info: Precompiling TenetChainRulesCoreExt [4c48fc49-ee8c-5c6e-a164-94f373290340]
julia> mps = rand(Chain, Open, State; n=5, p=2, χ=20)
MPS (inputs=0, outputs=5)
julia> contract(mps)
2×2×2×2×2 Tensor{Float64, 5, Array{Float64, 5}}:
[:, :, 1, 1, 1] =
-0.476082 -0.530897
-0.108129 -0.212065
[:, :, 2, 1, 1] =
-0.315495 -0.115779
-0.076073 -0.0214035
[:, :, 1, 2, 1] =
-0.117174 -0.167136
-0.0260362 0.0109016
[:, :, 2, 2, 1] =
-0.154203 -0.127011
-0.0392941 -0.0132862
[:, :, 1, 1, 2] =
0.0589333 0.00149326
0.0189144 -0.0870499
[:, :, 2, 1, 2] =
0.165494 0.230064
0.0127105 -0.00592115
[:, :, 1, 2, 2] =
0.113758 -0.0558552
0.0175383 0.0481059
[:, :, 2, 2, 2] =
0.163475 0.246799
0.0260987 0.180637 |
currently I'm getting
quick workaround to return a tensor is to just
but if we want to reuse the indices, I came up with something like
oh my
The text was updated successfully, but these errors were encountered: