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
OpenQASM AST holds Python values of various types. In particular, numeric types are annotated as int, float, bool etc, but many users work with numpy or other analogues of these. As a result, oqpy's to_ast can generate OpenQASM AST that does not satisfy the typing requirements.
OpenQASM AST holds Python values of various types. In particular, numeric types are annotated as
int
,float
,bool
etc, but many users work with numpy or other analogues of these. As a result, oqpy'sto_ast
can generate OpenQASM AST that does not satisfy the typing requirements.For example, a
BooleanLiteral
should wrap a Pythonbool
. oqpy is more permissive here, as it allows anp.bool_
(https://github.com/openqasm/oqpy/blob/main/oqpy/base.py#L513C1-L514C1). But thenSimilarly we should convert numpy floating point or integer values to vanilla Python values.
The text was updated successfully, but these errors were encountered: