Skip to content

Commit

Permalink
Fix import of Test and ITensorNetworks in two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Apr 26, 2024
1 parent 71095c9 commit 3882939
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions test/test_expect.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
@eval module $(gensym())
using Test
using ITensorNetworks

using Graphs: SimpleGraph, uniform_tree
using NamedGraphs: NamedGraph, vertices
using NamedGraphs.NamedGraphGenerators: named_grid
using ITensors: siteinds
using ITensorNetworks:
BeliefPropagationCache, expect, random_tensornetwork, original_state_vertex
BeliefPropagationCache,
ITensorNetwork,
expect,
random_tensornetwork,
original_state_vertex
using Random: Random
using SplitApplyCombine: group

using Test: @test, @testset

@testset "Test Expect" begin
Random.seed!(1234)

Expand All @@ -37,7 +41,6 @@ using SplitApplyCombine: group
@test sz_bp sz_exact

#Test with QNS, product state so should be immediately exact
#TODO: Fix Construct TN with QNS that's got a bond dimension bigger than 1. Add() is broken...
L, χ = 2, 2
g = named_grid((L, L))
s = siteinds("S=1/2", g; conserve_qns=true)
Expand Down
4 changes: 2 additions & 2 deletions test/test_inner.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
@eval module $(gensym())
using Test
using ITensorNetworks

using ITensorNetworks:
ITensorNetwork,
inner,
inner_network,
loginner,
Expand All @@ -17,6 +16,7 @@ using SplitApplyCombine: group
using Graphs: SimpleGraph, uniform_tree
using NamedGraphs: NamedGraph
using Random: Random
using Test: @test, @testset

@testset "Inner products, BP vs exact comparison" begin
Random.seed!(1234)
Expand Down

0 comments on commit 3882939

Please sign in to comment.