class_docstr: Unit tests for transpile function
class_docstr_tok: ["Unit","tests","for","transpile","function"]
docstr: test that transpile does not alter output for expectation value of an observable
docstr_tok: ["test","that","transpile","does","not","alter","output","for","expectation","value","of","an","observable"]
code: def test_transpile_qfunc_transpiled_mmt_obs(self):
      """test that transpile does not alter output for expectation value of an observable"""
      dev = qml.device("default.qubit", wires=[0, 1, 2])
  
      # build circuit without transpile
      original_qfunc = build_qfunc_pauli_z([0, 1, 2])
      original_qnode = qml.QNode(original_qfunc, dev)
      original_expectation = original_qnode(0.1, 0.2, 0.3)
  
      # build circuit with transpile
      transpiled_qfunc = transpile(
          original_qfunc, coupling_map=[(0, 1), (1, 2)]
      )
      transpiled_qnode = qml.QNode(transpiled_qfunc, dev)
      transpiled_expectation = transpiled_qnode(0.1, 0.2, 0.3)
  
      assert isclose(
          original_expectation,
          transpiled_expectation,
          abs_tol=np.finfo(float).eps,
      )
  
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 4 for calling the TestTranspile obj's underlying member method code with example usage: obj.test_transpile_qfunc_transpiled_mmt_obs() without return types