Skip to content
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

Incorporate rtol into __eq__ #2420

Closed
amirebrahimi opened this issue May 7, 2024 · 1 comment · Fixed by #2425
Closed

Incorporate rtol into __eq__ #2420

amirebrahimi opened this issue May 7, 2024 · 1 comment · Fixed by #2425
Assignees
Labels

Comments

@amirebrahimi
Copy link

Problem Description

CoreOptions has an rtol property, but only atol gets used in Qobj.__eq__

Proposed Solution

Incorporate rtol into equality testing. Ideally, we could have:

 with CoreOptions(atol=1e-08, rtol=1e-05):
    a == b

which would allow comparisons similar to np.allclose

Alternate Solutions

No response

Additional Context

No response

@amirebrahimi
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants