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: Test that the circuit drawer displays Hamiltonians well.
docstr_tok: ["Test","that","the","circuit","drawer","displays","Hamiltonians","well","."]
code: def test_circuit_drawer(self):
      """Test that the circuit drawer displays Hamiltonians well."""
      dev = qml.device("default.qubit", wires=3)
      coeffs = [1.0, 1.0, 1.0]
      observables1 = [qml.PauliZ(0), qml.PauliY(0), qml.PauliZ(2)]
      H1 = qml.Hamiltonian(coeffs, observables1)
  
      @qml.qnode(dev)
      def circuit1():
          qml.Hadamard(wires=0)
          return qml.expval(H1)
  
      res = qml.draw(circuit1)()
      expected = (
          "0: ──H─┤ ╭<𝓗(1.00,1.00,1.00)>\n2: ────┤ ╰<𝓗(1.00,1.00,1.00)>"
      )
      assert res == expected
  
imports: import copy
  import numpy
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 4 for calling the TestNewVQE obj's underlying member method code with example usage: obj.test_circuit_drawer() and returns: qml