class_docstr: Test that the QASM serialization works correctly
  when circuits are created via QNodes.
class_docstr_tok: ["Test","that","the","QASM","serialization","works","correctly","when","circuits","are","created","via","QNodes","."]
docstr: Test that observable rotations are correctly applied.
docstr_tok: ["Test","that","observable","rotations","are","correctly","applied","."]
code: def test_rotations(self):
      """Test that observable rotations are correctly applied."""
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev)
      def qnode():
          qml.Hadamard(wires=0)
          qml.CNOT(wires=[0, 1])
          return [
              qml.expval(qml.PauliX(0)),
              qml.expval(qml.PauliZ(1)),
              qml.expval(qml.Hadamard(2)),
          ]
  
      qnode()
      res = qnode.qtape.to_openqasm()
  
      expected = dedent(
          """\
              OPENQASM 2.0;
              include "qelib1.inc";
              qreg q[3];
              creg c[3];
              h q[0];
              cx q[0],q[1];
              h q[0];
              ry(-0.7853981633974483) q[2];
              measure q[0] -> c[0];
              measure q[1] -> c[1];
              measure q[2] -> c[2];
              """
      )
  
      assert res == expected
  
imports: from textwrap import dedent
  import numpy
  import pytest
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 9 for calling the TestQNodeQasmIntegrationTests obj's underlying member method code with example usage: obj.test_rotations() and returns: list