[BUG] Many operations do not take the required arguments as keywords.
See original GitHub issueExpected behavior
N/A
Actual behavior
N/A
Additional information
There are multiple operations like qml.U3, qml.QubitStateVector, qml.BasisState etc., that require arguments and have keywords defined in the documentation but do not take keyword arguments.
A thorough look at all operations is required to find these and change their behaviour, and/or update the documentation.
Related #1903
Source code
No response
Tracebacks
No response
System information
N/A
- I have searched exisisting GitHub issues to make sure the issue does not already exist.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Required keyword arguments are mislabelled "optional"
The suggestion is to change "Optional Arguments" to "Keyword Arguments. ... to many who interpret it as, "arguments that are not required.
Read more >Sidekiq does not support keyword arguments #2372 - GitHub
It does not seem to accept required keyword arguments which are expressed via keyword_argument: with the trailing colon.
Read more >Bug: The number and name of arguments passed to a function ...
Python static code analysis · The number and name of arguments passed to a function should match its parameters · Assert should not...
Read more >Feature #14183: "Real" keyword argument - Ruby master
This change makes sense for methods that accept keyword arguments, and for double splat usage on hashes when the method does not accept...
Read more >python - What is the safe way of using keyword-only arguments?
There are no special disadvantages to using keyword-only arguments. True, your function will have a different signature ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I can take on this bug and take a look throughout the various operations for this kind of functionality. I will also cross reference with the documentation to make sure that we aren’t writing logic for functionality that wasn’t intended to be supported. Thanks for brining this to our attention !
Hey @ankit27kh,
In case you were waiting for this change to take effect. We just wanted to update you and let you know that there is a bigger change for the Operator class as a whole which would affect the way these operations are implemented. We are waiting on that as changing the code now, might require us to change it again after the Operator class change.
Thanks,