class_docstr: Unit tests for the ``transmon_interaction`` function.
docstr: Test that setting d != 2 raises error
docstr_tok: ["Test","that","setting","d","!","=","2","raises","error"]
code: def test_d_neq_2_raises_error(self):
      """Test that setting d != 2 raises error"""
      with pytest.raises(
          NotImplementedError, match="Currently only supporting qubits."
      ):
          _ = transmon_interaction(
              connections=connections,
              qubit_freq=[0.1],
              wires=[0],
              coupling=0.2,
              d=3,
          )
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.pulse import HardwareHamiltonian, transmon_interaction, transmon_drive
  from pennylane.pulse.transmon import TransmonSettings, a, ad, AmplitudeAndPhaseAndFreq, _reorder_AmpPhaseFreq, callable_freq_to_angular
  from pennylane.pulse.hardware_hamiltonian import HardwarePulse
  from pennylane.wires import Wires
label_desc: Use image node_id 6 for calling the TestTransmonInteraction obj's underlying member method code with example usage: obj.test_d_neq_2_raises_error() without return types