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

Deprecate accidentally public internal helper methods on QuantumCircuit #12785

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

ElePT
Copy link
Contributor

@ElePT ElePT commented Jul 18, 2024

Summary

Fixes #12417. I added the "private version" of the methods so that we can then remove the public one in 2.0. Let me know if you had a different idea for the deprecation.

Details and comments

@ElePT ElePT requested a review from a team as a code owner July 18, 2024 15:29
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia

@ElePT ElePT added this to the 1.2.0 milestone Jul 18, 2024
@ElePT ElePT added the Changelog: Deprecation Include in "Deprecated" section of changelog label Jul 18, 2024
@coveralls
Copy link

coveralls commented Jul 18, 2024

Pull Request Test Coverage Report for Build 10073672823

Details

  • 35 of 41 (85.37%) changed or added relevant lines in 3 files are covered.
  • 16 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.02%) to 89.909%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/circuit/quantumcircuit.py 26 32 81.25%
Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
qiskit/circuit/quantumcircuit.py 2 93.97%
crates/qasm2/src/parse.rs 6 97.15%
crates/qasm2/src/lex.rs 7 91.35%
Totals Coverage Status
Change from base Build 10067705422: -0.02%
Covered Lines: 65840
Relevant Lines: 73230

💛 - Coveralls

@ElePT ElePT added the mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library label Jul 18, 2024
Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

Two tiny comments otherwise LGTM 🙂

qiskit/circuit/quantumcircuit.py Outdated Show resolved Hide resolved
@classmethod
@deprecate_func(
since=1.2,
removal_timeline="in qiskit 2.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we uppercase this? 🙂

Suggested change
removal_timeline="in qiskit 2.0",
removal_timeline="in Qiskit 2.0",

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 wrote it in lowercase because the beginning of the message writes qiskit in lowercase. But I also don't love it. Anyways, I modified the timeline message in a7b7361 to say
"in the 2.0 release" to be consistent with other deprecations (qobj and assemble).

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I didn't notice... that seems odd. Maybe we should change that as well 🤔 (not here ofc)

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the updates! 🙂

@Cryoris Cryoris enabled auto-merge July 24, 2024 09:00
@Cryoris Cryoris added this pull request to the merge queue Jul 24, 2024
Merged via the queue into Qiskit:main with commit ffead59 Jul 24, 2024
15 checks passed
ElePT added a commit to mtreinish/qiskit-core that referenced this pull request Jul 24, 2024
…it (Qiskit#12785)

* Deprecate accidentally public qc helper methods

* Fix lint

* Complete reno and add removal timeline

* Update qiskit/circuit/quantumcircuit.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update remaining docstrings and removal timeline.

* Trailing whitespace

---------

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Procatv pushed a commit to Procatv/qiskit-terra-catherines that referenced this pull request Aug 1, 2024
…it (Qiskit#12785)

* Deprecate accidentally public qc helper methods

* Fix lint

* Complete reno and add removal timeline

* Update qiskit/circuit/quantumcircuit.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>

* Update remaining docstrings and removal timeline.

* Trailing whitespace

---------

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Deprecation Include in "Deprecated" section of changelog mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate accidentally public internal helper methods on QuantumCircuit
4 participants