class_docstr: Unit tests for helper functions in qml.devices.qubit.preprocess
class_docstr_tok: ["Unit","tests","for","helper","functions","in","qml.devices.qubit.preprocess"]
docstr: Test that expand_fn doesn't throw any errors for a valid circuit
docstr_tok: ["Test","that","expand_fn","does","n't","throw","any","errors","for","a","valid","circuit"]
code: def test_decompose(self):
      """Test that expand_fn doesn't throw any errors for a valid circuit"""
      tape = QuantumScript(
          ops=[qml.PauliX(0), qml.RZ(0.123, wires=0)],
          measurements=[qml.state()],
      )
      decompose(tape, lambda obj: obj.has_matrix)
  
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 TestDecomposeValidation obj's underlying member method code with example usage: obj.test_decompose() without return types