Skip to content

Commit 384246d

Browse files
Add QobjEvo tests and minor changes
1 parent 1c5d394 commit 384246d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/core-test/quantum_objects_evo.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
@test adjoint(a2).data == adjoint(a2.data)
8282

8383
N = 10
84-
a = QobjEvo(destroy(N), Operator, N)
84+
a = QobjEvo(MatrixOperator(sprand(ComplexF64, N, N, 5 / N)), Operator, N)
8585
a_d = a'
8686
X = a + a_d
8787
# Y = 1im * (a - a_d) # Currently doesn't work. Fix in SciMLOperators.jl
@@ -172,8 +172,8 @@
172172
ψ = fock(N, 1)
173173
@test op1(ψ, p, 0.1) (coef1(p, 0.1) * a + a' * a + coef2(p, 0.1) * a') * ψ
174174

175-
@test iscontant(a) == true
176-
@test iscontant(op1) == false
175+
@test isconstant(a) == true
176+
@test isconstant(op1) == false
177177
@test isconstant(Qobj(a)) == true
178178
end
179179
end

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ using Pkg
33
using QuantumToolbox
44
using QuantumToolbox: position, momentum
55
using Random
6+
using SciMLOperators
67

78
const GROUP = get(ENV, "GROUP", "All")
89

910
const testdir = dirname(@__FILE__)
1011

11-
println("---- Running tests with $(Threads.nthreads()) threads. ----")
12-
1312
# Put core tests in alphabetical order
1413
core_tests = [
1514
"correlations_and_spectrum.jl",
@@ -23,6 +22,7 @@ core_tests = [
2322
"permutation.jl",
2423
"progress_bar.jl",
2524
"quantum_objects.jl",
25+
"quantum_objects_evo.jl",
2626
"states_and_operators.jl",
2727
"steady_state.jl",
2828
"time_evolution.jl",

0 commit comments

Comments
 (0)