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
Make Operator.data
a tuple instead of a list
#4222
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #4222 +/- ##
=======================================
Coverage 99.78% 99.78%
=======================================
Files 352 352
Lines 31741 31754 +13
=======================================
+ Hits 31673 31686 +13
Misses 68 68
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes @eddddddy ! I'm hesitant about the changes to QuantumScript._par_info
, but apart from that, this PR looks good :)
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we going to remove data setters soon? I was going to ask if we should update the setters in various files (evolution.py, pow.py and symbolicop.py) to cast the inputted new_data
as tuples before setting it, but I realize we'd probably rather just delete the setters altogether!
Keen to approve, but very hesitant about the _par_info
/get_operation
change. I don't want to block this PR because a problem with QuantumScript, but perhaps a bit more clarity on direction first
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
The intention is to start using |
Do we want to remove the setters in this PR or a follow-up one? |
@albi3ro can confirm, but I'd imagine a follow-up one. It's a pretty major breaking change so it would likely need a deprecation cycle. |
definitely don't remove in this PR - if there was anything to do in this one, it would be to add casting to tuple in existing data setters, but I'm ok to just leave them be. tl;dr nothing to do here 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last comment, otherwise lgtm and I will approve:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @eddddddy !
Co-authored-by: Christina Lee <christina@xanadu.ai>
[sc-36757] |
Context:
Part of the ongoing effort towards operator immutability.
Description of the Change:
Make
Operator.data
a tuple instead of a list. Change everywhereOperator.data
is used to expect a tuple instead of a list.