Skip to content

Commit 9003b8b

Browse files
authored
Remove bases and sortedindices tests as they live in QuantumInterface (#190)
Also update tests for qojulia/QuantumInterface.jl#53
1 parent 44ca12d commit 9003b8b

File tree

7 files changed

+6
-103
lines changed

7 files changed

+6
-103
lines changed

test/runtests.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
names = [
2-
"test_sortedindices.jl",
3-
4-
"test_bases.jl",
52
"test_states.jl",
63

74
"test_operators.jl",

test/test_bases.jl

Lines changed: 0 additions & 54 deletions
This file was deleted.

test/test_fock.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ basis = FockBasis(2)
1616
# Test creation
1717
@test basis.N == 2
1818
@test basis.shape[1] == 3
19-
@test_throws DimensionMismatch FockBasis(-1)
19+
@test_throws ArgumentError FockBasis(-1)
2020

2121
# Test equality
2222
@test FockBasis(2) == FockBasis(2)

test/test_nlevel.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ b = NLevelBasis(N)
1010
# Test basis equality
1111
@test b == NLevelBasis(N)
1212
@test b != NLevelBasis(N+1)
13-
@test_throws DimensionMismatch NLevelBasis(0)
13+
@test_throws ArgumentError NLevelBasis(0)
1414

1515
# Test transition operator
1616
@test_throws BoundsError transition(b, 0, 1)

test/test_operators.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ op_cnot = DenseOperator(b2⊗b2, cnot)
112112
OP_cnot = embed(b8, [1,3], op_cnot)
113113
@test ptrace(OP_cnot, [2])/2. == op_cnot
114114
@test reduced(OP_cnot, [1,3])/2. == op_cnot
115-
@test_throws AssertionError embed(b2b2, [1,1], op_cnot)
115+
@test_throws ArgumentError embed(b2b2, [1,1], op_cnot)
116116

117117
b = FockBasis(40)
118118
alpha = 1+5im

test/test_sortedindices.jl

Lines changed: 0 additions & 40 deletions
This file was deleted.

test/test_spin.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ using LinearAlgebra
77
D(op1::AbstractOperator, op2::AbstractOperator) = abs(tracedistance_nh(dense(op1), dense(op2)))
88

99
# Test creation
10-
@test_throws AssertionError SpinBasis(1//3)
11-
@test_throws AssertionError SpinBasis(-1//2)
12-
@test_throws AssertionError SpinBasis(-1)
10+
@test_throws ArgumentError SpinBasis(1//3)
11+
@test_throws ArgumentError SpinBasis(-1//2)
12+
@test_throws ArgumentError SpinBasis(-1)
1313

1414

1515
for spinnumber=[1//2, 1, 3//2, 4//2]

0 commit comments

Comments
 (0)