Skip to content

Commit

Permalink
* Addressing review comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
khalatepradnya committed Jul 21, 2024
1 parent 228713f commit 27a689d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/cudaq/kernel/register_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ def kernel():
if isinstance(unitary, Callable):
raise RuntimeError("parameterized custom operations not yet supported.")

if isinstance(unitary, np.matrix):
if isinstance(unitary, np.matrix) or isinstance(unitary, List):
matrix = np.array(unitary)
elif isinstance(unitary, np.ndarray):
matrix = unitary
elif isinstance(unitary, List):
matrix = np.array(unitary)
else:
raise RuntimeError("unknown type of unitary.")

Expand Down

0 comments on commit 27a689d

Please sign in to comment.