Skip to content

Commit 49558a4

Browse files
committed
Use the ad_spacelist
1 parent e56c8f8 commit 49558a4

24 files changed

Lines changed: 30 additions & 740 deletions

File tree

test/enzyme-factorizations/eig.jl

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,7 @@ using MatrixAlgebraKit
66
using Enzyme, EnzymeTestUtils
77
using Random
88

9-
@isdefined(TestSetup) || include("../../setup.jl")
10-
using .TestSetup
11-
12-
spacelist = (
13-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
14-
(
15-
Vect[FermionParity](0 => 1, 1 => 1),
16-
Vect[FermionParity](0 => 1, 1 => 2)',
17-
Vect[FermionParity](0 => 2, 1 => 1)',
18-
Vect[FermionParity](0 => 2, 1 => 3),
19-
Vect[FermionParity](0 => 2, 1 => 2),
20-
),
21-
(
22-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
23-
Vect[SU2Irrep](0 => 1, 1 => 1),
24-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
25-
Vect[SU2Irrep](1 // 2 => 2),
26-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
27-
),
28-
(
29-
Vect[FibonacciAnyon](:I => 2, => 1),
30-
Vect[FibonacciAnyon](:I => 1, => 2)',
31-
Vect[FibonacciAnyon](:I => 2, => 2)',
32-
Vect[FibonacciAnyon](:I => 2, => 3),
33-
Vect[FibonacciAnyon](:I => 2, => 2),
34-
),
35-
)
9+
spacelist = ad_spacelist(fast_tests)
3610
eltypes = (Float64, ComplexF64)
3711

3812
function remove_eiggauge_dependence!(

test/enzyme-factorizations/eigh.jl

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,11 @@
11
using Test, TestExtras
22
using TensorKit
33
using TensorOperations
4-
using VectorInterface: Zero, One
54
using MatrixAlgebraKit
65
using Enzyme, EnzymeTestUtils
76
using Random
87

9-
@isdefined(TestSetup) || include("../../setup.jl")
10-
using .TestSetup
11-
12-
spacelist = (
13-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
14-
(
15-
Vect[FermionParity](0 => 1, 1 => 1),
16-
Vect[FermionParity](0 => 1, 1 => 2)',
17-
Vect[FermionParity](0 => 2, 1 => 1)',
18-
Vect[FermionParity](0 => 2, 1 => 3),
19-
Vect[FermionParity](0 => 2, 1 => 2),
20-
),
21-
(
22-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
23-
Vect[SU2Irrep](0 => 1, 1 => 1),
24-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
25-
Vect[SU2Irrep](1 // 2 => 2),
26-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
27-
),
28-
(
29-
Vect[FibonacciAnyon](:I => 2, => 1),
30-
Vect[FibonacciAnyon](:I => 1, => 2)',
31-
Vect[FibonacciAnyon](:I => 2, => 2)',
32-
Vect[FibonacciAnyon](:I => 2, => 3),
33-
Vect[FibonacciAnyon](:I => 2, => 2),
34-
),
35-
)
8+
spacelist = ad_spacelist(fast_tests)
369
eltypes = (Float64, ComplexF64)
3710

3811
function remove_eighgauge_dependence!(

test/enzyme-factorizations/lq.jl

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,11 @@
11
using Test, TestExtras
22
using TensorKit
33
using TensorOperations
4-
using VectorInterface: Zero, One
54
using MatrixAlgebraKit
65
using Enzyme, EnzymeTestUtils
76
using Random
87

9-
@isdefined(TestSetup) || include("../../setup.jl")
10-
using .TestSetup
11-
12-
spacelist = (
13-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
14-
(
15-
Vect[FermionParity](0 => 1, 1 => 1),
16-
Vect[FermionParity](0 => 1, 1 => 2)',
17-
Vect[FermionParity](0 => 2, 1 => 1)',
18-
Vect[FermionParity](0 => 2, 1 => 3),
19-
Vect[FermionParity](0 => 2, 1 => 2),
20-
),
21-
(
22-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
23-
Vect[SU2Irrep](0 => 1, 1 => 1),
24-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
25-
Vect[SU2Irrep](1 // 2 => 2),
26-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
27-
),
28-
(
29-
Vect[FibonacciAnyon](:I => 2, => 1),
30-
Vect[FibonacciAnyon](:I => 1, => 2)',
31-
Vect[FibonacciAnyon](:I => 2, => 2)',
32-
Vect[FibonacciAnyon](:I => 2, => 3),
33-
Vect[FibonacciAnyon](:I => 2, => 2),
34-
),
35-
)
8+
spacelist = ad_spacelist(fast_tests)
369
eltypes = (Float64, ComplexF64)
3710

3811
function remove_lqgauge_dependence!(ΔQ, t, Q)

test/enzyme-factorizations/projections.jl

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,11 @@
11
using Test, TestExtras
22
using TensorKit
33
using TensorOperations
4-
using VectorInterface: Zero, One
54
using MatrixAlgebraKit
65
using Enzyme, EnzymeTestUtils
76
using Random
87

9-
@isdefined(TestSetup) || include("../../setup.jl")
10-
using .TestSetup
11-
12-
spacelist = (
13-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
14-
(
15-
Vect[FermionParity](0 => 1, 1 => 1),
16-
Vect[FermionParity](0 => 1, 1 => 2)',
17-
Vect[FermionParity](0 => 2, 1 => 1)',
18-
Vect[FermionParity](0 => 2, 1 => 3),
19-
Vect[FermionParity](0 => 2, 1 => 2),
20-
),
21-
(
22-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
23-
Vect[SU2Irrep](0 => 1, 1 => 1),
24-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
25-
Vect[SU2Irrep](1 // 2 => 2),
26-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
27-
),
28-
(
29-
Vect[FibonacciAnyon](:I => 2, => 1),
30-
Vect[FibonacciAnyon](:I => 1, => 2)',
31-
Vect[FibonacciAnyon](:I => 2, => 2)',
32-
Vect[FibonacciAnyon](:I => 2, => 3),
33-
Vect[FibonacciAnyon](:I => 2, => 2),
34-
),
35-
)
8+
spacelist = ad_spacelist(fast_tests)
369
eltypes = (Float64, ComplexF64)
3710

3811
@timedtestset "Enzyme - Factorizations (PROJECTIONS): $(TensorKit.type_repr(sectortype(eltype(V)))) ($T)" for V in spacelist, T in eltypes, t in (randn(T, V[1] V[1]), rand(T, V[1] V[2] V[1] V[2]))

test/enzyme-factorizations/qr.jl

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,7 @@ using MatrixAlgebraKit
66
using Enzyme, EnzymeTestUtils
77
using Random
88

9-
@isdefined(TestSetup) || include("../../setup.jl")
10-
using .TestSetup
11-
12-
spacelist = (
13-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
14-
(
15-
Vect[FermionParity](0 => 1, 1 => 1),
16-
Vect[FermionParity](0 => 1, 1 => 2)',
17-
Vect[FermionParity](0 => 2, 1 => 1)',
18-
Vect[FermionParity](0 => 2, 1 => 3),
19-
Vect[FermionParity](0 => 2, 1 => 2),
20-
),
21-
(
22-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
23-
Vect[SU2Irrep](0 => 1, 1 => 1),
24-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
25-
Vect[SU2Irrep](1 // 2 => 2),
26-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
27-
),
28-
(
29-
Vect[FibonacciAnyon](:I => 2, => 1),
30-
Vect[FibonacciAnyon](:I => 1, => 2)',
31-
Vect[FibonacciAnyon](:I => 2, => 2)',
32-
Vect[FibonacciAnyon](:I => 2, => 3),
33-
Vect[FibonacciAnyon](:I => 2, => 2),
34-
),
35-
)
9+
spacelist = ad_spacelist(fast_tests)
3610
eltypes = (Float64, ComplexF64)
3711

3812
function remove_qrgauge_dependence!(ΔQ, t, Q)

test/enzyme-factorizations/svd.jl

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,11 @@
11
using Test, TestExtras
22
using TensorKit
33
using TensorOperations
4-
using VectorInterface: Zero, One
54
using MatrixAlgebraKit
65
using Enzyme, EnzymeTestUtils
76
using Random
87

9-
@isdefined(TestSetup) || include("../../setup.jl")
10-
using .TestSetup
11-
12-
spacelist = (
13-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
14-
(
15-
Vect[FermionParity](0 => 1, 1 => 1),
16-
Vect[FermionParity](0 => 1, 1 => 2)',
17-
Vect[FermionParity](0 => 2, 1 => 1)',
18-
Vect[FermionParity](0 => 2, 1 => 3),
19-
Vect[FermionParity](0 => 2, 1 => 2),
20-
),
21-
(
22-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
23-
Vect[SU2Irrep](0 => 1, 1 => 1),
24-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
25-
Vect[SU2Irrep](1 // 2 => 2),
26-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
27-
),
28-
(
29-
Vect[FibonacciAnyon](:I => 2, => 1),
30-
Vect[FibonacciAnyon](:I => 1, => 2)',
31-
Vect[FibonacciAnyon](:I => 2, => 2)',
32-
Vect[FibonacciAnyon](:I => 2, => 3),
33-
Vect[FibonacciAnyon](:I => 2, => 2),
34-
),
35-
)
8+
spacelist = ad_spacelist(fast_tests)
369
eltypes = (Float64, ComplexF64)
3710

3811
function remove_svdgauge_dependence!(

test/enzyme-indexmaniuplations/add/add_braid.jl

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,13 @@
11
using Test, TestExtras
22
using TensorKit
33
using TensorOperations
4-
using VectorInterface: Zero, One
54
using Enzyme, EnzymeTestUtils
65
using Random
76

8-
@isdefined(TestSetup) || include("../../../setup.jl")
9-
using .TestSetup
10-
11-
is_ci = get(ENV, "CI", "false") == "true"
12-
13-
spacelist = (
14-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
15-
(
16-
Vect[FermionParity](0 => 1, 1 => 1),
17-
Vect[FermionParity](0 => 1, 1 => 2)',
18-
Vect[FermionParity](0 => 2, 1 => 1)',
19-
Vect[FermionParity](0 => 2, 1 => 3),
20-
Vect[FermionParity](0 => 2, 1 => 2),
21-
),
22-
(
23-
Vect[U1Irrep](0 => 2, 1 => 1, -1 => 1),
24-
Vect[U1Irrep](0 => 2, 1 => 1, -1 => 1),
25-
Vect[U1Irrep](0 => 2, 1 => 2, -1 => 1)',
26-
Vect[U1Irrep](0 => 1, 1 => 1, -1 => 2),
27-
Vect[U1Irrep](0 => 1, 1 => 2, -1 => 1)',
28-
),
29-
(
30-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
31-
Vect[SU2Irrep](0 => 1, 1 => 1),
32-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
33-
Vect[SU2Irrep](1 // 2 => 2),
34-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
35-
),
36-
(
37-
Vect[FibonacciAnyon](:I => 2, => 1),
38-
Vect[FibonacciAnyon](:I => 1, => 2)',
39-
Vect[FibonacciAnyon](:I => 2, => 2)',
40-
Vect[FibonacciAnyon](:I => 2, => 3),
41-
Vect[FibonacciAnyon](:I => 2, => 2),
42-
),
43-
)
7+
spacelist = ad_spacelist(fast_tests)
448
eltypes = (Float64, ComplexF64)
459

10+
is_ci = get(ENV, "CI", "false") == "true"
4611
Tαs = is_ci ? (Active,) : (Active, Const)
4712
Tβs = is_ci ? (Active,) : (Active, Const)
4813

test/enzyme-indexmaniuplations/add/add_permute.jl

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,13 @@
11
using Test, TestExtras
22
using TensorKit
33
using TensorOperations
4-
using VectorInterface: Zero, One
54
using Enzyme, EnzymeTestUtils
65
using Random
76

8-
@isdefined(TestSetup) || include("../../../setup.jl")
9-
using .TestSetup
10-
11-
is_ci = get(ENV, "CI", "false") == "true"
12-
13-
spacelist = (
14-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
15-
(
16-
Vect[FermionParity](0 => 1, 1 => 1),
17-
Vect[FermionParity](0 => 1, 1 => 2)',
18-
Vect[FermionParity](0 => 2, 1 => 1)',
19-
Vect[FermionParity](0 => 2, 1 => 3),
20-
Vect[FermionParity](0 => 2, 1 => 2),
21-
),
22-
(
23-
Vect[U1Irrep](0 => 2, 1 => 1, -1 => 1),
24-
Vect[U1Irrep](0 => 2, 1 => 1, -1 => 1),
25-
Vect[U1Irrep](0 => 2, 1 => 2, -1 => 1)',
26-
Vect[U1Irrep](0 => 1, 1 => 1, -1 => 2),
27-
Vect[U1Irrep](0 => 1, 1 => 2, -1 => 1)',
28-
),
29-
(
30-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
31-
Vect[SU2Irrep](0 => 1, 1 => 1),
32-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
33-
Vect[SU2Irrep](1 // 2 => 2),
34-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
35-
),
36-
(
37-
Vect[FibonacciAnyon](:I => 2, => 1),
38-
Vect[FibonacciAnyon](:I => 1, => 2)',
39-
Vect[FibonacciAnyon](:I => 2, => 2)',
40-
Vect[FibonacciAnyon](:I => 2, => 3),
41-
Vect[FibonacciAnyon](:I => 2, => 2),
42-
),
43-
)
7+
spacelist = ad_spacelist(fast_tests)
448
eltypes = (Float64, ComplexF64)
459

10+
is_ci = get(ENV, "CI", "false") == "true"
4611
Tαs = is_ci ? (Active,) : (Active, Const)
4712
Tβs = is_ci ? (Active,) : (Active, Const)
4813

test/enzyme-indexmaniuplations/add/add_transpose.jl

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,11 @@ using VectorInterface: Zero, One
55
using Enzyme, EnzymeTestUtils
66
using Random
77

8-
@isdefined(TestSetup) || include("../../../setup.jl")
9-
using .TestSetup
8+
spacelist = ad_spacelist(fast_tests)
9+
eltypes = (Float64, ComplexF64)
1010

1111
is_ci = get(ENV, "CI", "false") == "true"
1212

13-
spacelist = (
14-
(ℂ^2, (ℂ^3)', ℂ^3, ℂ^2, (ℂ^2)'),
15-
(
16-
Vect[FermionParity](0 => 1, 1 => 1),
17-
Vect[FermionParity](0 => 1, 1 => 2)',
18-
Vect[FermionParity](0 => 2, 1 => 1)',
19-
Vect[FermionParity](0 => 2, 1 => 3),
20-
Vect[FermionParity](0 => 2, 1 => 2),
21-
),
22-
(
23-
Vect[U1Irrep](0 => 2, 1 => 1, -1 => 1),
24-
Vect[U1Irrep](0 => 2, 1 => 1, -1 => 1),
25-
Vect[U1Irrep](0 => 2, 1 => 2, -1 => 1)',
26-
Vect[U1Irrep](0 => 1, 1 => 1, -1 => 2),
27-
Vect[U1Irrep](0 => 1, 1 => 2, -1 => 1)',
28-
),
29-
(
30-
Vect[SU2Irrep](0 => 2, 1 // 2 => 1),
31-
Vect[SU2Irrep](0 => 1, 1 => 1),
32-
Vect[SU2Irrep](1 // 2 => 1, 1 => 1)',
33-
Vect[SU2Irrep](1 // 2 => 2),
34-
Vect[SU2Irrep](0 => 1, 1 // 2 => 1, 3 // 2 => 1)',
35-
),
36-
(
37-
Vect[FibonacciAnyon](:I => 2, => 1),
38-
Vect[FibonacciAnyon](:I => 1, => 2)',
39-
Vect[FibonacciAnyon](:I => 2, => 2)',
40-
Vect[FibonacciAnyon](:I => 2, => 3),
41-
Vect[FibonacciAnyon](:I => 2, => 2),
42-
),
43-
)
44-
eltypes = (Float64, ComplexF64)
45-
4613
Tαs = is_ci ? (Active,) : (Active, Const)
4714
Tβs = is_ci ? (Active,) : (Active, Const)
4815

0 commit comments

Comments
 (0)