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

Add deprecated property to DefFrame for CHANNEL-DELAY attribute #1729

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

mac01021
Copy link
Contributor

Description

v4 has added deprecated attribute properties for all the standard defframe attributes, except for CHANNEL-DELAY. I have a bunch of call sites in my v3 codebase that use this attribute and engineers like to benefit from autocompletion in their IDE when accessing channel delays. So here is a PR that adds the missing property.

Checklist

  • The PR targets the master branch
  • The above description motivates these changes.
  • The change is atomic and can be described by a single commit (your PR will be squashed on merge).
  • All changes to code are covered via unit tests.
  • Parameters and return values have type hints with PEP 484 syntax.
  • Functions and classes have useful Sphinx-style docstrings.
  • (New Feature) The docs have been updated accordingly.
  • (Bugfix) The associated issue is referenced above using auto-close keywords.

@mac01021 mac01021 requested a review from a team as a code owner January 26, 2024 17:50
@mac01021
Copy link
Contributor Author

@MarquessV Given that I've written this, are you willing to merge it? Or do you view it as a step in the wrong directions?

Copy link
Contributor

@MarquessV MarquessV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! I realized that this attribute got added after the work for v4 started, but still landed in v3, so this is the right thing to do.

# center_frequency,
# channel_delay]:
# if arg is not None
# ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need these comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed them!

Copy link
Contributor

@kalzoo kalzoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If @MarquessV is happy with it I'm happy with it

channel_delay: Optional[float],
) -> DefFrame:
optional_args = {k: v
for k, v in locals().items()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably more python magic than we want or need

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disenchanted it.

@MarquessV MarquessV merged commit b15e429 into rigetti:master Jan 30, 2024
17 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants