Skip to content

Commit

Permalink
fix Ansatz tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Feb 2, 2025
1 parent 638d5ca commit 14f7c35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/Interfaces.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test
using Tenet
using Tenet: ninds, ntensors
using Tenet: ninds, ntensors, lattice

# TensorNetwork interface
function test_tensornetwork(
Expand Down Expand Up @@ -176,8 +176,8 @@ end

function test_tensornetwork_contract!(tn)
@testset "`contract!` on `Symbol` contracts an index in-place" begin
@testif pred = !isempty(inds(tn)) let tn = deepcopy(tn)
ind = first(inds(tn))
@testif pred = !isempty(inds(tn; set=:inner)) let tn = deepcopy(tn)
ind = first(inds(tn; set=:inner))
contract!(tn, ind)
ind tn
end
Expand Down
2 changes: 1 addition & 1 deletion test/unit/Ansatz_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using LinearAlgebra
lattice = Lattice(Lane.(1:n))
ansatz = Ansatz(qtn, lattice)

test_tensornetwork(ansatz)
test_tensornetwork(ansatz; contract_mut=false)
test_pluggable(ansatz)
test_ansatz(ansatz)

Expand Down

0 comments on commit 14f7c35

Please sign in to comment.