Skip to content

Commit b652fa7

Browse files
Use Base allequal function
1 parent a070ab6 commit b652fa7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/qobj/quantum_object_evo.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,6 @@ function QuantumObjectEvolution(
214214
return QuantumObjectEvolution* op.data, type, op.dims)
215215
end
216216

217-
_all_equal(dims) = all(x -> x == first(dims), dims)
218-
219217
#=
220218
_QobjEvo_generate_data(op_func_list::Tuple, α; f::Function=identity)
221219
@@ -271,7 +269,7 @@ Parse the `op_func_list` and generate the data for the `QuantumObjectEvolution`
271269
quote
272270
dims = tuple($(dims_expr...))
273271

274-
_all_equal(dims) || throw(ArgumentError("The dimensions of the operators must be the same."))
272+
allequal(dims) || throw(ArgumentError("The dimensions of the operators must be the same."))
275273

276274
data_expr_const = $qobj_expr_const isa Integer ? $qobj_expr_const : _make_SciMLOperator($qobj_expr_const, α)
277275

0 commit comments

Comments
 (0)