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

Change names of some methods in resource estimation #6973

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

astralcai
Copy link
Contributor

Context:

There were some conflicts with the ongoing decomposition work.

Description of the Change:

  • Make resource_params a @property
  • Rename resource_rep to make_resource_rep
  • Rename resource_rep_from_op to resource_rep and make it a @property

After this change, the following usages:

op.resource_params()
SomeOp.resource_rep(param1=..., param2=...)
op.resource_rep_from_op()

will be replaced with

op.resource_params
SomeOp.make_resource_rep(params1=..., params2=...)
op.resource.rep

Benefits:

More intuitive names for methods and properties (use a noun for a property and a verb phrase for a method)

Possible Drawbacks:

Ongoing resource estimation work may be affected.

@astralcai astralcai added the labs 🧑‍🔬 This includes changes to `qml.labs` source code label Feb 18, 2025
@astralcai astralcai requested a review from Jaybsoni February 18, 2025 15:11
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
labs 🧑‍🔬 This includes changes to `qml.labs` source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant