class_docstr: Test the new VQE syntax of passing the Hamiltonian as an observable.
class_docstr_tok: ["Test","the","new","VQE","syntax","of","passing","the","Hamiltonian","as","an","observable","."]
docstr: Tests that more than one Hamiltonian expval can be evaluated.
docstr_tok: ["Tests","that","more","than","one","Hamiltonian","expval","can","be","evaluated","."]
code: def test_multiple_expvals_same_wires(self):
      """Tests that more than one Hamiltonian expval can be evaluated."""
  
      coeffs = [1.0, 1.0, 1.0]
      dev = qml.device("default.qubit", wires=4)
      H1 = qml.Hamiltonian(
          coeffs, [qml.PauliZ(0), qml.PauliY(0), qml.PauliZ(1)]
      )
      w = PARAMS
  
      @qml.qnode(dev)
      def circuit():
          qml.templates.StronglyEntanglingLayers(w, wires=range(4))
          return qml.expval(H1), qml.expval(H1)
  
      res = circuit()
  
      @qml.qnode(dev)
      def circuit1():
          qml.templates.StronglyEntanglingLayers(w, wires=range(4))
          return qml.expval(H1)
  
      assert res[0] == circuit1()
      assert res[1] == circuit1()
  
imports: import copy
  import numpy
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 6 for calling the TestNewVQE obj's underlying member method code with example usage: obj.test_multiple_expvals_same_wires() and returns: qml,  qml, qml