class_docstr: Test that apply_operation works for Snapshot ops
class_docstr_tok: ["Test","that","apply_operation","works","for","Snapshot","ops"]
docstr: Test that batched states create batched snapshots.
docstr_tok: ["Test","that","batched","states","create","batched","snapshots","."]
code: def test_batched_state(self, ml_framework):
      """Test that batched states create batched snapshots."""
      initial_state = qml.math.asarray(
          [[1.0, 0.0], [0.0, 0.1]], like=ml_framework
      )
      debugger = self.Debugger()
      new_state = apply_operation(
          qml.Snapshot(),
          initial_state,
          is_state_batched=True,
          debugger=debugger,
      )
      assert new_state.shape == initial_state.shape
      assert set(debugger.snapshots) == {0}
      assert np.array_equal(debugger.snapshots[0], initial_state)
  
imports: from functools import reduce
  import pytest
  import numpy
  from scipy.stats import unitary_group
  import pennylane
  from pennylane.operation import _UNSET_BATCH_SIZE, Operation
  from pennylane.devices.qubit.apply_operation import apply_operation, apply_operation_einsum, apply_operation_tensordot
label_desc: Use image node_id 5 for calling the TestSnapshot obj's underlying member method code with example usage: obj.test_batched_state(ml_framework) without return types