From f07754d3d741df67fc4bdad4c856eb278453353a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Thu, 8 Feb 2024 00:32:22 +0100 Subject: [PATCH] Refactor test as suggested by @mtfishman --- test/test_contraction_sequence.jl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/test_contraction_sequence.jl b/test/test_contraction_sequence.jl index 2184db22..1271bfb5 100644 --- a/test/test_contraction_sequence.jl +++ b/test/test_contraction_sequence.jl @@ -30,13 +30,12 @@ ITensors.disable_warn_order() res_einexprs_greedy = contract(tn; sequence=seq_einexprs_exhaustive)[] seq_einexprs_kahypar = contraction_sequence(tn; alg="einexpr", optimizer=HyPar()) res_einexprs_kahypar = contract(tn; sequence=seq_einexprs_kahypar)[] - @test res_optimal ≈ - res_greedy ≈ - res_tree_sa ≈ - res_sa_bipartite ≈ - res_einexprs_exhaustive ≈ - res_einexprs_greedy ≈ - res_einexprs_kahypar + @test res_greedy ≈ res_optimal + @test res_tree_sa ≈ res_optimal + @test res_sa_bipartite ≈ res_optimal + @test res_einexprs_exhaustive ≈ res_optimal + @test res_einexprs_greedy ≈ res_optimal + @test res_einexprs_kahypar ≈ res_optimal if !Sys.iswindows() # KaHyPar doesn't work on Windows