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

Remove old opmath #6548

Merged
merged 56 commits into from
Nov 17, 2024
Merged

Remove old opmath #6548

merged 56 commits into from
Nov 17, 2024

Conversation

lillian542
Copy link
Contributor

@lillian542 lillian542 commented Nov 7, 2024

Context:
It's time to fully remove the legacy operator arithmetic (Tensor and qml.ops.Hamiltonian, and all of the structure surrounding them).

Description of the Change:

  • remove qml.ops.Hamiltonian
  • remove Tensor
  • remove disable_ and enable_new_opmath
  • remove operation.convert_to_legacy_H
  • remove qml.pauli.simplify
  • remove PauliWord.hamiltonian and PauliSentence.hamiltonian, and any other functionality in the pauli module that supported legacy opmath
  • remove any if/else handling in place to deal with legacy opmath through the code base
  • remove legacy_opmath_only, new_opmath_only and use_legacy_and_new_opmath test fixtures, and all irrelevant tests
  • remove the warning suppressions added in PR6287
  • remove the legacy test fixture (--disable-opmath)

[sc-77523]

lillian542 added a commit to PennyLaneAI/pennylane-lightning that referenced this pull request Nov 13, 2024
We are removing the Tensor and Hamiltonian classes, so we should remove
their (minimal) remaining references in the Lightning python code.

Blocks running CI for the [PL PR
#6548](PennyLaneAI/pennylane#6548) to remove
legacy_opmath, since every test that uses `lightning.qubit` fails with
Tensor removed.

---------

Co-authored-by: ringo-but-quantum <[email protected]>
@lillian542 lillian542 requested a review from astralcai November 14, 2024 16:14
Copy link
Contributor

@albi3ro albi3ro left a comment

Choose a reason for hiding this comment

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

❤️

@lillian542 lillian542 requested a review from astralcai November 15, 2024 19:17
@lillian542 lillian542 enabled auto-merge (squash) November 15, 2024 21:17
@lillian542 lillian542 merged commit 97c852b into master Nov 17, 2024
46 checks passed
@lillian542 lillian542 deleted the remove_old_opmath branch November 17, 2024 22:38
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