Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
qml.MultiControlledX
usage (#1040)
**Context:** For the operator `qml.MultiControlledX`, two features have been deprecated long ago and will be removed very soon: - `str` input of `control_values`, e.g. `"01"` - optional arg `control_wires`. Instead, `wires[:-1]` strictly acts as the control wires. Somehow deprecated usages have been spotted in lightning master branch, therefore we would like to fix them asap. **Description of the Change:** - `tests/test_gates.py`, "01" -> [0, 1] - `tests/lightning_tensor/test_gates_and_expval.py`, based on the context, the usage `qml.MultiControlledX(wires=[wires[0], wires[1], wires[3]], control_values=[wires[0], wires[1]])` seems to be mistaking a `qml.MultiControlledX(wires=[wires[0], wires[1], wires[3]], control_wires=[wires[0], wires[1]])`. If the guess is correct, we can fix it by `qml.MultiControlledX(wires=[wires[0], wires[1], wires[3]])` P.S. direct change to `control_wires` couldn't pass the tests; therefore we specified `control_values=[0, 1]` which worked; I guess it's made by a mistake but happen to work, along with adjustments over the corresponding expected res. **Benefits:** Compatibility with PL0.41 **Possible Drawbacks:** **Related GitHub Issues:** [sc-81527] [sc-81795] --------- Co-authored-by: ringo-but-quantum <[email protected]> Co-authored-by: Ali Asadi <[email protected]>
- Loading branch information