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 failing test after API change in MultiControlledX #1472

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

joeycarter
Copy link
Contributor

Context: The input argument control_wires was recently removed from qml.MultiControlledX in PennyLaneAI/pennylane#6832. This API change resulted in a failure in the Catalyst test TestGateAliases.test_control_aliases in the "Check CPL latest/latest/latest" workflow.

For reference, the call signature of qml.MultiControlledX changed from

qml.MultiControlledX(control_wires, wires, control_values, work_wires)

to

qml.MultiControlledX(wires, control_values, work_wires)

Description of the Change: Update the failing test to use the new call signature of qml.MultiControlledX. Also, prefer to explicitly pass in the wire index or list of wire indices by keyword argument with wires=..., rather than as positional arguments, to hopefully avoid similar issues in the future.

@joeycarter joeycarter added the urgent Mark a pull request as high priority label Jan 20, 2025
@joeycarter joeycarter requested a review from a team January 20, 2025 15:46
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md on your branch with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@joeycarter joeycarter removed the urgent Mark a pull request as high priority label Jan 20, 2025
@joeycarter joeycarter merged commit 5bbd6e0 into main Jan 20, 2025
46 checks passed
@joeycarter joeycarter deleted the joeycarter/fix-MultiControlledX-test branch January 20, 2025 16:55
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.

2 participants