class_docstr: Tests for the behavior of the `decompose` helper.
class_docstr_tok: ["Tests","for","the","behavior","of","the","`","decompose","`","helper","."]
docstr: Test that initial state prep operations are decomposed if skip_initial_state_prep is False.
docstr_tok: ["Test","that","initial","state","prep","operations","are","decomposed","if","skip_initial_state_prep","is","False","."]
code: def test_decompose_initial_state_prep_if_requested(self, prep_op):
      """Test that initial state prep operations are decomposed if skip_initial_state_prep is False."""
  
      tape = qml.tape.QuantumScript([prep_op])
      batch, _ = decompose(
          tape,
          lambda obj: obj.has_matrix,
          skip_initial_state_prep=False,
      )
      new_tape = batch[0]
  
      assert new_tape[0] != prep_op
  
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 5 for calling the TestDecomposeTransformations obj's underlying member method code with example usage: obj.test_decompose_initial_state_prep_if_requested(prep_op) without return types