class_docstr: Test that measurements work when the state has a batch dim
docstr: Test that broadcasting works for regular state measurements
docstr_tok: ["Test","that","broadcasting","works","for","regular","state","measurements"]
code: def test_state_measurement(self, measurement, expected):
      """Test that broadcasting works for regular state measurements"""
      state = [
          np.array([[0, 0], [0, 1]]),
          np.array([[1, 0], [1, 0]]) / np.sqrt(2),
          np.array([[1, 1], [1, 1]]) / 2,
      ]
      state = np.stack(state)
  
      res = measure(measurement, state, is_state_batched=True)
      assert np.allclose(res, expected)
  
imports: import pytest
  import numpy
  from scipy.sparse import csr_matrix
  import pennylane
  from pennylane.devices.qubit import simulate
  from pennylane.devices.qubit.measure import measure, state_diagonalizing_gates, csr_dot_products, full_dot_products, get_measurement_function, sum_of_terms_method
label_desc: Use image node_id 1 for calling the TestBroadcasting obj's underlying member method code with example usage: obj.test_state_measurement(measurement, expected) without return types