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

Removed Deprecated Pulse Call Instruction #11537

Merged
merged 11 commits into from
Jan 16, 2024

Conversation

sbrandhsn
Copy link
Contributor

Summary

Removed pulse call instruction deprecated in #10247 and #10103

Details and comments

I was a bit unsure about removing all test cases that use pulse.Call since it seemed that pulse.Call sometimes only provides reference values for some of these, but proceeded after reading the discussion in #10103. I hope that was okay.

But just to be sure, it would be great if you (maybe @nkanazawa1989 ? :-) ) can check that all removed test cases are indeed included in https://github.com/Qiskit/qiskit/blob/main/test/python/pulse/test_builder.py or https://github.com/Qiskit/qiskit/blob/main/test/python/pulse/test_builder_v2.py.
I'm especially sceptical that everything in TestParameterGetter and TestParameterSetter could be removed -- there, pulse.Call was used to create some reference values.

@sbrandhsn sbrandhsn requested review from eggerdj, wshanks and a team as code owners January 10, 2024 17:42
@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core
  • @mtreinish
  • @nkanazawa1989

@sbrandhsn sbrandhsn added the Changelog: Removal Include in the Removed section of the changelog label Jan 10, 2024
@coveralls
Copy link

coveralls commented Jan 10, 2024

Pull Request Test Coverage Report for Build 7532353892

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.09%) to 89.387%

Totals Coverage Status
Change from base Build 7490243021: 0.09%
Covered Lines: 59429
Relevant Lines: 66485

💛 - Coveralls

Copy link
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

The removal procedure looks well executed :), I think I don't have enough pulse expertise to judge if any additional unit test is necessary to compensate for the removal of Call.

from qiskit.test import QiskitTestCase


class ParameterTestBase(QiskitTestCase):
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't taken the time to analyze the test in depth, but would it make sense to keep it and only delete/replace the schedule.Call line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for taking a look! :) Yes, there are a couple of test cases that could qualify for removal or rephrasing. The discussion in issue #10103 lead me to believe there are already alternatives for test cases using Pulse.Call, allowing for current Pulse.Call test cases to be removed... Do you suggest to rephrase all test cases using builder.call instead of Pulse.Call?

Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't remove these tests. This file covers the test cases for schedule parameter assignment.

@ElePT ElePT added this to the 1.0.0 milestone Jan 15, 2024
Copy link
Contributor

@nkanazawa1989 nkanazawa1989 left a comment

Choose a reason for hiding this comment

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

Thanks @sbrandhsn for taking care of this. I really appreciate. My comment is largely about these two:

qiskit/pulse/library/symbolic_pulses.py Outdated Show resolved Hide resolved
qiskit/qpy/binary_io/schedules.py Outdated Show resolved Hide resolved
test/python/pulse/test_builder.py Outdated Show resolved Hide resolved
from qiskit.test import QiskitTestCase


class ParameterTestBase(QiskitTestCase):
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't remove these tests. This file covers the test cases for schedule parameter assignment.

test/python/pulse/test_parameter_manager.py Show resolved Hide resolved
test/python/pulse/test_parameter_manager.py Show resolved Hide resolved

self.assertEqual(assigned, ref_obj)

def test_nested_assignment_partial_bind(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Please keep this test. You can just remove dependency on Call and add subroutine directly here because subroutine is ScheduleBlock.

test/python/pulse/test_parameter_manager.py Outdated Show resolved Hide resolved
test/python/pulse/test_pulse_lib.py Outdated Show resolved Hide resolved
@nkanazawa1989 nkanazawa1989 added the mod: pulse Related to the Pulse module label Jan 15, 2024
@sbrandhsn
Copy link
Contributor Author

Arigatou gozaimashita, @nkanazawa1989 ! :-) I was not familiar with the pulse part of qiskit, thanks for clarifying the deprecation of Pulse.Call!

This PR also removes:

  • test_parameters_from_subroutine
  • test_assign_parameter_to_subroutine
  • test_assign_parameter_to_subroutine_parameter

Copy link
Contributor

@nkanazawa1989 nkanazawa1989 left a comment

Choose a reason for hiding this comment

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

@sbrandhsn Thanks for quick update!

@nkanazawa1989 nkanazawa1989 added this pull request to the merge queue Jan 16, 2024
Merged via the queue into Qiskit:main with commit 0a860fd Jan 16, 2024
13 checks passed
ShellyGarion pushed a commit to ShellyGarion/qiskit-terra that referenced this pull request Jan 18, 2024
* removed deprecated pulse.Call

* up reno right location

* doc fix

* fixes qpy error

* fix temporary files

* updated release note

* Update releasenotes/notes/deprecate-pulse-instruction-call-52dca0dd26e1c768.yaml

Co-authored-by: Naoki Kanazawa <[email protected]>

* reintroduced testcases that used Pulse.Call

---------

Co-authored-by: Naoki Kanazawa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Removal Include in the Removed section of the changelog mod: pulse Related to the Pulse module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants