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

Check for existing DefMeasureCalibration before adding #1751

Open
steve-jeffrey opened this issue Mar 4, 2024 · 0 comments
Open

Check for existing DefMeasureCalibration before adding #1751

steve-jeffrey opened this issue Mar 4, 2024 · 0 comments
Labels
enhancement ✨ A request for a new feature.

Comments

@steve-jeffrey
Copy link

Pre-Request Checklist

  • [ X] I am running the latest versions of pyQuil and the Forest SDK
  • [ X] I checked to make sure that this feature has not already been requested

Issue Description

When adding new Calibrations to a Program, the code checks if the Calibration already exists, and if so, it only adds the new Calibration if it differs from the existing Calibration.

When adding new DefMeasureCalibrations to a Program, the code adds the new DefMeasureCalibration and issues a warning that the DefMeasureCalibration already exists. It would be nice if the code checked if an existing DefMeasureCalibration already existed and only add the new DefMeasureCalibration if it differs from the existing DefMeasureCalibration i.e. it would be nice if it behaved the same way Calibrations are added, thereby avoiding unnecessary warnings.

Proposed Solution

Change this else statement to something like this:

elif existing_measure_calibration.instructions != defmeasure.instructions:
@steve-jeffrey steve-jeffrey added the enhancement ✨ A request for a new feature. label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ A request for a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant