Skip to content

Commit 40d909b

Browse files
kshyattleburgel
andauthored
Small tests for infinite partition function (#273)
* Small tests for infinite partition function * Format --------- Co-authored-by: leburgel <lander.burgelman@gmail.com>
1 parent 1383693 commit 40d909b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

test/ctmrg/partition_function.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using LinearAlgebra
44
using PEPSKit
55
using TensorKit
66
using QuadGK
7-
7+
using Test
88

99
@testset "Check spaces in partition function CTMRG" begin
1010
zA = randn(ℂ^6 ^8 ^4 ^2)
@@ -107,10 +107,18 @@ env0 = CTMRGEnv(Z, χenv)
107107
ctm_styles = [:sequential, :simultaneous]
108108
projector_algs = [:halfinfinite, :fullinfinite]
109109

110+
# Basic properties
110111
@test spacetype(typeof(Z)) === ComplexSpace
111112
@test spacetype(Z) === ComplexSpace
112113
@test sectortype(typeof(Z)) === Trivial
113114
@test sectortype(Z) === Trivial
115+
@test length(Z) == 1
116+
@test size(Z, 1) == 1
117+
@test size(Z, 2) == 1
118+
@test eltype(similar(Z)) == eltype(Z)
119+
@test copy(Z) == Z
120+
@test copy(Z) Z
121+
114122

115123
@testset "Classical Ising partition function using $alg with $projector_alg" for (
116124
alg, projector_alg,

0 commit comments

Comments
 (0)