class_docstr: Tests for the behavior of the `decompose` helper.
class_docstr_tok: ["Tests","for","the","behavior","of","the","`","decompose","`","helper","."]
docstr: Test that validate_measurements and validate_observables works when non commuting measurements exist in the circuit.
docstr_tok: ["Test","that","validate_measurements","and","validate_observables","works","when","non","commuting","measurements","exist","in","the","circuit","."]
code: def test_valdiate_measurements_non_commuting_measurements(
      self, validation_transform
  ):
      """Test that validate_measurements and validate_observables works when non commuting measurements exist in the circuit."""
  
      qs = QuantumScript(
          [NoMatOp("a")],
          [qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliY(0))],
      )
  
      new_qs, _ = validation_transform(qs, lambda obj: True)
      new_qs = new_qs[0]
      assert new_qs.measurements == qs.measurements
  
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 3 for calling the TestDecomposeTransformations obj's underlying member method code with example usage: obj.test_valdiate_measurements_non_commuting_measurements(validation_transform) without return types