class_docstr: Unit tests for the properties of the HardwareHamiltonian class.
class_docstr_tok: ["Unit","tests","for","the","properties","of","the","HardwareHamiltonian","class","."]
docstr: Tests that if a ParametrizedHamiltonian is added onto a
  HardwareHamiltonian with callable coefficients from the right, the
  resulting object is a HardwareHamiltonian that can be called without
  raising an error
docstr_tok: ["Tests","that","if","a","ParametrizedHamiltonian","is","added","onto","a","HardwareHamiltonian","with","callable","coefficients","from","the","right",",","the","resulting","object","is","a","HardwareHamiltonian","that","can","be","called","without","raising","an","error"]
code: def test_hamiltonian_callable_after_addition_right(self):
      """Tests that if a ParametrizedHamiltonian is added onto a
      HardwareHamiltonian with callable coefficients from the right, the
      resulting object is a HardwareHamiltonian that can be called without
      raising an error"""
  
      def amp(p, t):
          return p[0] * np.exp(-((t - p[1]) ** 2) / (2 * p[2] ** 2))
  
      def phase(p, t):
          return p * t
  
      H_global = qml.pulse.drive(amp, phase, wires=[0])
      H_global += qml.pulse.drive(amp, phase, wires=[0])
      H_global += np.polyval * qml.PauliX(0)
  
      # start with HardwareHamiltonians, then add ParametrizedHamiltonian
      params = [np.array([1.2, 2.3, 3.4]), 4.5]
      params += [np.array([1.2, 2.3, 3.4]), 4.5]
      params += [np.ones(2)]
  
      assert isinstance(H_global, HardwareHamiltonian)
      H_global(params, 2)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.pulse import HardwareHamiltonian, drive, rydberg_interaction
  from pennylane.pulse.hardware_hamiltonian import HardwarePulse, AmplitudeAndPhase, amplitude_and_phase, _reorder_parameters
  from pennylane.pulse.transmon import TransmonSettings
  from pennylane.pulse.rydberg import RydbergSettings
  from pennylane.wires import Wires
label_desc: Use image node_id 9 for calling the TestHardwareHamiltonian obj's underlying member method code with example usage: obj.test_hamiltonian_callable_after_addition_right() and returns: unknown, unknown