-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Context:** In PL0.36 we deprecated the string type support for argument `control_values` of the operator `MultiControlledX` initialization, e.g. `control_values='01'` shall not be allowed anymore. In this PR we would like to remove this entirely with a strict type check. **Description of the Change:** - Added a type check with `isinstance` to raise `ValueError` if the `control_values` does not follow the designed pattern. - Added a type hint at correpsonding position within the init func signature - Removed a test that presumes the validity of str input - Alter the deprecation check into error check **Benefits:** Less redundancy **Possible Drawbacks:** Potential existence of uncovered indirect usage of string input in `MultiControlledX` **Related GitHub Issues:** [sc-81527]
- Loading branch information
1 parent
d7490d4
commit c2869dd
Showing
4 changed files
with
29 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters