class_docstr: Unit tests for the properties of the HardwareHamiltonian class.
class_docstr_tok: ["Unit","tests","for","the","properties","of","the","HardwareHamiltonian","class","."]
docstr: Test that adding two HardwareHamiltonians with different reordering functions
  raises an error.
docstr_tok: ["Test","that","adding","two","HardwareHamiltonians","with","different","reordering","functions","raises","an","error","."]
code: def test_two_different_reorder_fns_raises_error(self):
      """Test that adding two HardwareHamiltonians with different reordering functions
      raises an error."""
      H1 = HardwareHamiltonian(coeffs=[], observables=[])
      H2 = HardwareHamiltonian(
          coeffs=[], observables=[], reorder_fn=lambda _, y: y[:2]
      )
  
      with pytest.raises(
          ValueError,
          match="Cannot add two HardwareHamiltonians with different reorder",
      ):
          _ = H1 + H2
  
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 2 for calling the TestHardwareHamiltonian obj's underlying member method code with example usage: obj.test_two_different_reorder_fns_raises_error() without return types