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
I am rewriting Symbolic.py to make the typeclass Poly generic, so that for example, one can represent Polynomials over finite fields, integers, etc. in a uniform way. I am also adding support for fractions of polynomials as well.
I am almost done with modifying this file to this end, but I am running into problems with the Var class. I am currently using Var as a wrapper for str, but there are other attributes of var which are not documented. For example, I have no idea what the following two attributes are meant to represent:
Several of the newer features of PyZX are lacking documentation, which is indeed a shame.
_is_bool is a flag for saying whether this parameter should be treated as a bool (either 0 or 1, or in the context of ZX, 0 or pi), or as a free parameter (as in variational circuits). The reasoning for this is that there is a big class of parametrised rewrites that should work with 0/pi phases, but not arbitrary parameters.
I'm not 100% sure, but _types_dict should be a dictionary specifying for each named parameter on a graph whether its _is_bool flag is set to true.
Hello.
I am rewriting Symbolic.py to make the typeclass Poly generic, so that for example, one can represent Polynomials over finite fields, integers, etc. in a uniform way. I am also adding support for fractions of polynomials as well.
I am almost done with modifying this file to this end, but I am running into problems with the Var class. I am currently using Var as a wrapper for str, but there are other attributes of var which are not documented. For example, I have no idea what the following two attributes are meant to represent:
_is_bool: bool
_types_dict: Optional[Union[bool, Dict[str, bool]]]
Could someone please add some documentation, as I would really appreciate it.
--Cole
The text was updated successfully, but these errors were encountered: