Skip to content

Commit

Permalink
ooops
Browse files Browse the repository at this point in the history
  • Loading branch information
astralcai committed Sep 19, 2024
1 parent 8f0531a commit 76a2c72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pennylane/ops/functions/assert_valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def _check_generator(op):

if op.has_generator:
gen = op.generator()
assert isinstance(gen, (qml.Hamiltonian, qml.ops.SparseHamiltonian))
assert isinstance(gen, qml.ops.Operator)
new_op = qml.exp(gen, 1j * op.data[0])
assert qml.math.allclose(
qml.matrix(op, wire_order=op.wires), qml.matrix(new_op, wire_order=op.wires)
Expand Down

0 comments on commit 76a2c72

Please sign in to comment.