Efficient implementation of expect
for AbstractTTN
#269
Annotations
1 error and 3 warnings
|
|
test/test_treetensornetworks/test_expect.jl#L17
[JuliaFormatter] reported by reviewdog 🐶
Raw Output:
test/test_treetensornetworks/test_expect.jl:17:- tooth_lengths = fill(5, 6)
test/test_treetensornetworks/test_expect.jl:18:- c = named_comb_tree(tooth_lengths)
test/test_treetensornetworks/test_expect.jl:19:- s = siteinds("S=1/2", c)
test/test_treetensornetworks/test_expect.jl:20:- d = Dict()
test/test_treetensornetworks/test_expect.jl:21:- magnetization = Dict()
test/test_treetensornetworks/test_expect.jl:22:- for (i, v) in enumerate(vertices(s))
test/test_treetensornetworks/test_expect.jl:23:- d[v] = isodd(i) ? "Up" : "Dn"
test/test_treetensornetworks/test_expect.jl:24:- magnetization[v] = isodd(i) ? 0.5 : -0.5
test/test_treetensornetworks/test_expect.jl:25:- end
test/test_treetensornetworks/test_expect.jl:26:- states = v -> d[v]
test/test_treetensornetworks/test_expect.jl:27:- state = TTN(s, states)
test/test_treetensornetworks/test_expect.jl:28:- res=expect("Sz", state) # just testing that this doesn't go via expect for arbitrary tensor networks.
test/test_treetensornetworks/test_expect.jl:29:- @test all([isapprox(res[v], magnetization[v],atol=1e-8) for v in vertices(s)])
test/test_treetensornetworks/test_expect.jl:17:+ tooth_lengths = fill(5, 6)
test/test_treetensornetworks/test_expect.jl:18:+ c = named_comb_tree(tooth_lengths)
test/test_treetensornetworks/test_expect.jl:19:+ s = siteinds("S=1/2", c)
test/test_treetensornetworks/test_expect.jl:20:+ d = Dict()
test/test_treetensornetworks/test_expect.jl:21:+ magnetization = Dict()
test/test_treetensornetworks/test_expect.jl:22:+ for (i, v) in enumerate(vertices(s))
test/test_treetensornetworks/test_expect.jl:23:+ d[v] = isodd(i) ? "Up" : "Dn"
test/test_treetensornetworks/test_expect.jl:24:+ magnetization[v] = isodd(i) ? 0.5 : -0.5
test/test_treetensornetworks/test_expect.jl:25:+ end
test/test_treetensornetworks/test_expect.jl:26:+ states = v -> d[v]
test/test_treetensornetworks/test_expect.jl:27:+ state = TTN(s, states)
test/test_treetensornetworks/test_expect.jl:28:+ res = expect("Sz", state) # just testing that this doesn't go via expect for arbitrary tensor networks.
test/test_treetensornetworks/test_expect.jl:29:+ @test all([isapprox(res[v], magnetization[v]; atol=1e-8) for v in vertices(s)])
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
The logs for this run have expired and are no longer available.
Loading