PennyLaneAI / pennylane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
https://pennylane.ai
Apache License 2.0
2.17k stars 568 forks source link

Add deprecation warning to from_qasm #5882

Closed astralcai closed 1 week ago

astralcai commented 1 week ago

Context: Previously, the QASM circuit converted to PL had no measurements (even if the circuit ended with measurements, the assumption was we remove those and add PL measurements once the circuit is converted).

In the UnitaryHack, a contributor added the option to specify measurements when converting a circuit from_qasm, like the from_qiskit function. In doing so, the from_qasm circuit took on the current from_qiskit convention. Calling from_qasm(qasm_str) previously returned only the operators, and now returns operators + measurements. This is a breaking change with no deprecation cycle.

https://github.com/PennyLaneAI/pennylane-qiskit/pull/469

Description of the Change: Adds a deprecation warning to from_qasm

[sc-66318]

github-actions[bot] commented 1 week ago

Hello. You may have forgotten to update the changelog! Please edit doc/releases/changelog-dev.md with:

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.66%. Comparing base (14a0b63) to head (71e7d33). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5882 +/- ## ========================================== - Coverage 99.67% 99.66% -0.01% ========================================== Files 422 422 Lines 40658 40367 -291 ========================================== - Hits 40525 40233 -292 - Misses 133 134 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

timmysilv commented 1 week ago

don't forget to add an entry in deprecations.rst!

astralcai commented 1 week ago

don't forget to add an entry in deprecations.rst!

ooops, will do.