class_docstr: Tests for the behavior of the `decompose` helper.
class_docstr_tok: ["Tests","for","the","behavior","of","the","`","decompose","`","helper","."]
docstr: Test that expand_fn does nothing to a fully supported quantum script.
docstr_tok: ["Test","that","expand_fn","does","nothing","to","a","fully","supported","quantum","script","."]
code: def test_decompose_no_expansion(self):
      """Test that expand_fn does nothing to a fully supported quantum script."""
      ops = [qml.Hadamard(0), qml.CNOT([0, 1]), qml.RZ(0.123, wires=1)]
      measurements = [qml.expval(qml.PauliZ(0)), qml.probs()]
      tape = QuantumScript(ops=ops, measurements=measurements)
      expanded_tapes, _ = decompose(tape, lambda obj: obj.has_matrix)
      expanded_tape = expanded_tapes[0]
  
      for op, exp in zip(expanded_tape.circuit, ops + measurements):
          assert qml.equal(op, exp)
  
imports: import pytest
  import pennylane
  from pennylane.operation import Operation
  from pennylane.tape import QuantumScript
  from pennylane import DeviceError
  from pennylane.devices.preprocess import no_sampling, validate_device_wires, validate_multiprocessing_workers, validate_adjoint_trainable_params, _operator_decomposition_gen, decompose, validate_observables, validate_measurements
label_desc: Use image node_id 2 for calling the TestDecomposeTransformations obj's underlying member method code with example usage: obj.test_decompose_no_expansion() without return types