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

Fixed issue 3842 by comparison to an absolute error value #3852

Closed
wants to merge 2 commits into from

Conversation

JiahanBro
Copy link

@JiahanBro JiahanBro commented Feb 14, 2020

Summary

Fixes #3842

Details and comments

The absolute value of the difference between the input to the value 1 has to be compared to the error bound given by _EPS in order to fulfill the if condition.

@CLAassistant
Copy link

CLA assistant check
All committers have signed the CLA.

@1ucian0
Copy link
Member

1ucian0 commented May 2, 2020

Hi @JiahanBro!

Sorry for the delay here! The code was moved to qiskit/extensions/quantum_initializer/diagonal.py. Since it might be related with or affects #4375, maybe @ewinston can have a look to it?

@1ucian0
Copy link
Member

1ucian0 commented May 2, 2020

Also, considering adding a test that fails in master and passes here. Thanks and my apologies again! Your contribution is valued :)

@ewinston
Copy link
Contributor

ewinston commented May 4, 2020

@JiahanBro Don't worry about creating a test since I think it already exists in #4375 which will probably merge shortly after.

@ewinston
Copy link
Contributor

ewinston commented May 4, 2020

@JiahanBro Can you resolve the conflict? The class has moved to "diagonal.py".

@JiahanBro JiahanBro closed this May 4, 2020
@JiahanBro JiahanBro reopened this May 4, 2020
@JiahanBro
Copy link
Author

Should I just close the pull request and delete the branch?

@ewinston
Copy link
Contributor

ewinston commented May 4, 2020

Should I just close the pull request and delete the branch?

Whatever is convenient for you. It's a small change so maybe that's easier.

@JiahanBro JiahanBro closed this May 4, 2020
@JiahanBro JiahanBro deleted the fixissue3842branch branch May 4, 2020 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DiagonalGate does not raise when diagonal entries do not have modulus 1
4 participants