class_docstr: Unit tests for transpile function
class_docstr_tok: ["Unit","tests","for","transpile","function"]
docstr: test that error is raised when coupling_map is invalid
docstr_tok: ["test","that","error","is","raised","when","coupling_map","is","invalid"]
code: def test_transpile_invalid_coupling(self):
      """test that error is raised when coupling_map is invalid"""
      dev = qml.device("default.qubit", wires=[0, 1, 2])
  
      # build circuit
      original_qfunc = build_qfunc_pauli_z([0, 1, 2])
      transpiled_qfunc = transpile(
          original_qfunc, coupling_map=[(0, 1)]
      )
      transpiled_qnode = qml.QNode(transpiled_qfunc, dev)
      err_msg = r"Not all wires present in coupling map! wires: \[0, 2, 1\], coupling map: \[0, 1\]"
      with pytest.raises(ValueError, match=err_msg):
          transpiled_qnode(0.1, 0.2, 0.3)
  
imports: from math import isclose
  import pytest
  from pennylane import numpy
  import pennylane
  from pennylane.transforms.transpile import transpile
label_desc: Use image node_id 1 for calling the TestTranspile obj's underlying member method code with example usage: obj.test_transpile_invalid_coupling() without return types