You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ X] I am running the latest versions of pyQuil and the Forest SDK
[ X] I checked to make sure that this bug has not already been reported
Issue Description
When a DefGate without parameters is constructed, the user-specified matrix is numerically checked to determine if it is unitary.
If the matrix contains Expressions having only numeric arguments (i.e. no Parameters), the numeric check will be run and subsequently fail due to the presence of the non-numeric Expressions.
Traceback (most recent call last):
File "test.py", line 12, in <module>
gate_def = DefGate("MY_GATE", unitary)
File "...site-packages/pyquil/quilbase.py", line 437, in __init__
is_unitary = np.allclose(np.eye(rows), self.matrix.dot(self.matrix.T.conj()))
TypeError: loop of ufunc does not support argument 0 of type Function which has no callable conjugate method
Environment Context
pyQuil: 4.0.3 (issue also occurs under 3.5.4)
Operating System: Fedora 38
Python Version (python -V): 3.9.9
The text was updated successfully, but these errors were encountered:
Pre-Report Checklist
Issue Description
When a
DefGate
without parameters is constructed, the user-specified matrix is numerically checked to determine if it is unitary.If the matrix contains
Expression
s having only numeric arguments (i.e. noParameter
s), the numeric check will be run and subsequently fail due to the presence of the non-numericExpression
s.Code Snippet
Error Output
Environment Context
pyQuil: 4.0.3 (issue also occurs under 3.5.4)
Operating System: Fedora 38
Python Version (python -V): 3.9.9
The text was updated successfully, but these errors were encountered: