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

Fix cnot method on QuantumCircuit #4713

Merged
merged 5 commits into from
Jul 16, 2020
Merged

Conversation

mtreinish
Copy link
Member

Summary

The cnot method for QuantumCircuit was broken when using positional
arguments that weren't named. This is because it was upassing in the
kwargs which aren't used from deprecated_arguments to the cx method.
The kwargs are only used as a placeholder for passing in args by name
from the old deprecated name and the conversion is handled by the
decorator. This commit fixes this oversight so that QuantumCircuit.cnot
works as expected.

Details and comments

Fixes #4708

The cnot method for QuantumCircuit was broken when using positional
arguments that weren't named. This is because it was upassing in the
kwargs which aren't used from deprecated_arguments to the cx method.
The kwargs are only used as a placeholder for passing in args by name
from the old deprecated name and the conversion is handled by the
decorator. This commit fixes this oversight so that QuantumCircuit.cnot
works as expected.

Fixes Qiskit#4708
@mtreinish mtreinish requested a review from a team as a code owner July 15, 2020 17:29
@mtreinish mtreinish added this to the 0.15 milestone Jul 15, 2020
ajavadia
ajavadia previously approved these changes Jul 15, 2020
@ajavadia
Copy link
Member

can you add a test?

@mtreinish
Copy link
Member Author

can you add a test?

Sure, done in: 0b0c5ab

@mergify mergify bot merged commit cad3282 into Qiskit:master Jul 16, 2020
@oliverdial
Copy link

Thank you!

@mtreinish mtreinish added the Changelog: Bugfix Include in the "Fixed" section of the changelog label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

circuit.cnot does not draw correctly
4 participants