docstr: Test that the expval estimation is correct for a QFT state
docstr_tok: ["Test","that","the","expval","estimation","is","correct","for","a","QFT","state"]
code: def test_qft_expval(
      self, interface, k=1, obs=obs_qft, expected=expected_qft
  ):
      """Test that the expval estimation is correct for a QFT state"""
      import torch
  
      circuit = qft_circuit(3, shots=100000, interface=interface)
      actual = circuit(obs, k=k)
      new_actual = circuit.tape.measurements[0].process(
          circuit.tape, circuit.device
      )
  
      assert actual.shape == (len(obs_qft),)
      assert (
          actual.dtype == torch.float64
          if interface == "torch"
          else np.float64
      )
      assert qml.math.allclose(actual, expected, atol=1e-1)
      assert qml.math.allclose(new_actual, expected, atol=1e-1)
  
imports: import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import Shots
label_desc: Use image node_id 1 for calling the TestExpvalForwardInterfaces obj's underlying member method code with example usage: obj.test_qft_expval(interface, k, obs, expected) without return types