Skip to content

Commit

Permalink
fix runtests
Browse files Browse the repository at this point in the history
  • Loading branch information
ytdHuang committed Jan 8, 2025
1 parent df53828 commit 442f0a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/qobj/quantum_object_base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ _check_QuantumObject(
} = throw(
DomainError(
_get_dims_string(dimensions),
"The given `dims` is not compatible with type = $type, should be an `Operator`.",
"The given `dims` is not compatible with type = $type, should be a single list of integers.",
),
)

Expand Down
6 changes: 3 additions & 3 deletions test/core-test/quantum_objects_evo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
a = MatrixOperator(rand(ComplexF64, 3, 2))
@test_throws DomainError QobjEvo(a, type = SuperOperator)

a = MatrixOperator(rand(ComplexF64, 4, 4))
@test_throws DomainError QobjEvo(a, type = SuperOperator, dims = ((2,), (2,)))

a = MatrixOperator(rand(ComplexF64, 3, 2))
for t in (Ket, Bra, OperatorKet, OperatorBra)
@test_throws ArgumentError QobjEvo(a, type = t)
Expand All @@ -14,9 +17,6 @@

a = MatrixOperator(rand(ComplexF64, 5, 5))
@test_throws DimensionMismatch QobjEvo(a, type = SuperOperator)

a = MatrixOperator(rand(ComplexF64, 4, 4))
@test_throws DimensionMismatch QobjEvo(a, type = SuperOperator, dims = ((2,), (2,)))

ψ = fock(10, 3)
@test_throws TypeError QobjEvo(ψ)
Expand Down

0 comments on commit 442f0a7

Please sign in to comment.