From d9508ac62dafdee01e867d98a67d9f0e5a013b5a Mon Sep 17 00:00:00 2001 From: lillian542 Date: Mon, 15 Apr 2024 22:02:06 -0400 Subject: [PATCH] revert changes to hamiltonian --- pennylane/ops/qubit/hamiltonian.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pennylane/ops/qubit/hamiltonian.py b/pennylane/ops/qubit/hamiltonian.py index ecdf6561d87..17c6de25277 100644 --- a/pennylane/ops/qubit/hamiltonian.py +++ b/pennylane/ops/qubit/hamiltonian.py @@ -203,11 +203,6 @@ def __init__( ) for obs in observables: - if isinstance(obs, qml.ops.Prod): - # we don't really want this to ever happen, but it makes testing easier during the deprecation phase - # because we don't have to generate separate lists of parametrization for old and new opmath testing - obs = qml.simplify(obs) - obs = qml.operation.Tensor(*obs) if not isinstance(obs, Observable): raise ValueError( "Could not create circuits. Some or all observables are not valid."