-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easier access to tolerances #193
Comments
I proposed a solution specific to |
I think it would be nicer to have one global interface instead of users having to specify all tolerances in every compiler engine which may need them (rotation synthesis, optimizers, ...). If we know that angles will only ever be approximated to a certain tolerance, we can perform the merging / cancelling of rotation gates using this information. Since angles are now rounded upon initialization, we have a pretty good setup to achieve this and all we need is an interface exposing ANGLE_TOLERANCE (or PRECISION) to the user (with more to come at a later point). Rotation gates could then be given an additional (optional) tolerance parameter in I still think that adding more options to the resource counter would be nice (but this is somewhat separate from this issue). It would definitely be useful if there were options to control the grouping of gates in the output. Your PR which adds grouping by '(control count + ) class names' is a good first step. There are no concrete plans yet but we will definitely need to implement rotation synthesis at some point :-) |
What if we made the angle precision a property of |
I think gate tolerances should be exposed on a more global level, e.g., in This would allow easy handling of both per-class and per-object tolerances since every gate can just access the global tolerance and use it as the default value in Having per-object tolerances would of course introduce the need for more complicated merge and comparison functions because once there are different tolerances, those can no longer be implemented via rounding upon initialization. |
Write an interface which makes it easier for users to define tolerances (e.g., rotation angles).
The text was updated successfully, but these errors were encountered: