class_docstr: Test that arithmetic operations involving or creating ParametrizedHamiltonians behave as expected
docstr: Test that a Hamiltonian, SProd, Tensor or Operator can be added to a
  ParametrizedHamiltonian, and will be incorporated in the H_fixed term
docstr_tok: ["Test","that","a","Hamiltonian",",","SProd",",","Tensor","or","Operator","can","be","added","to","a","ParametrizedHamiltonian",",","and","will","be","incorporated","in","the","H_fixed","term"]
code: def test_add_other_operators(self, op):
      """Test that a Hamiltonian, SProd, Tensor or Operator can be added to a
      ParametrizedHamiltonian, and will be incorporated in the H_fixed term
      """
      pH = ParametrizedHamiltonian(
          [f1, f2, 2], [qml.PauliX(0), qml.PauliY(1), qml.PauliZ(2)]
      )
      pH_fixed = qml.s_prod(2, qml.PauliZ(2))
  
      # Adding on the right
      new_pH = pH + op
      assert qml.equal(pH.H_fixed(), pH_fixed)
      assert qml.equal(
          new_pH.H_fixed(), sum((pH_fixed, qml.s_prod(1, op)))
      )
  
      # Adding on the left
      new_pH = op + pH
      assert qml.equal(pH.H_fixed(), pH_fixed)
      assert qml.equal(
          new_pH.H_fixed(), sum((qml.s_prod(1, op), pH_fixed))
      )
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.pulse import ParametrizedHamiltonian
  from pennylane.wires import Wires
label_desc: Use image node_id 2 for calling the TestInteractionWithOperators obj's underlying member method code with example usage: obj.test_add_other_operators(op) without return types