Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Clean qft test
Browse files Browse the repository at this point in the history
  • Loading branch information
Todorbsc committed Feb 15, 2024
1 parent 2b3ca8c commit a5a62a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/integration/QrochetQuacExt_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
qftcirc = Quac.Algorithms.QFT(n)
qftqtn = Quantum(qftcirc)

siteinds = getindex.((qftqtn,), sites(qftqtn))
notsiteinds = filter(idx -> idx getindex.((qftqtn,), sites(qftqtn)), keys(TensorNetwork(qftqtn).indexmap))

# correct number of inputs and outputs
@test ninputs(qftqtn) == n
@test noutputs(qftqtn) == n
@test socket(qftqtn) == Operator()
# all open indices are sites
siteinds = getindex.((qftqtn,), sites(qftqtn))
@test issetequal(inds(TensorNetwork(qftqtn), :open), siteinds)
# all inner indices are not sites
notsiteinds = filter(idx -> idx siteinds, keys(TensorNetwork(qftqtn).indexmap))
@test issetequal(inds(TensorNetwork(qftqtn), :inner), notsiteinds)
end
end

0 comments on commit a5a62a8

Please sign in to comment.