class_docstr: Unit tests for the to_openqasm() method
class_docstr_tok: ["Unit","tests","for","the","to_openqasm","(",")","method"]
docstr: Test that a circuit containing solely native QASM
  gates is properly serialized.
docstr_tok: ["Test","that","a","circuit","containing","solely","native","QASM","gates","is","properly","serialized","."]
code: def test_native_qasm_gates(self):
      """Test that a circuit containing solely native QASM
      gates is properly serialized."""
      with qml.queuing.AnnotatedQueue() as q_circuit:
          qml.RX(0.43, wires=0)
          qml.RY(0.35, wires=1)
          qml.RZ(0.35, wires=2)
          qml.CNOT(wires=[0, 1])
          qml.Hadamard(wires=2)
          qml.CNOT(wires=[2, 0])
          qml.PauliX(wires=1)
  
      circuit = qml.tape.QuantumScript.from_queue(q_circuit)
      res = circuit.to_openqasm()
  
      expected = dedent(
          """\
              OPENQASM 2.0;
              include "qelib1.inc";
              qreg q[3];
              creg c[3];
              rx(0.43) q[0];
              ry(0.35) q[1];
              rz(0.35) q[2];
              cx q[0],q[1];
              h q[2];
              cx q[2],q[0];
              x q[1];
              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 2 for calling the TestToQasmUnitTests obj's underlying member method code with example usage: obj.test_native_qasm_gates() without return types