class_docstr: Conformance tests to ensure that the CircuitGraph
  serialized QASM conforms to the QASM standard as implemented
  by Qiskit. Note that this test class requires Qiskit and
  PennyLane-Qiskit as a dependency.
class_docstr_tok: ["Conformance","tests","to","ensure","that","the","CircuitGraph","serialized","QASM","conforms","to","the","QASM","standard","as","implemented","by","Qiskit",".","Note","that","this","test","class","requires","Qiskit","and","PennyLane-Qiskit","as","a","dependency","."]
docstr: Test that the QASM generated by the CircuitGraph
  corresponds to valid QASM, that can be loaded by Qiskit.
docstr_tok: ["Test","that","the","QASM","generated","by","the","CircuitGraph","corresponds","to","valid","QASM",",","that","can","be","loaded","by","Qiskit","."]
code: def test_qiskit_load_generated_qasm(self, check_dependencies):
      """Test that the QASM generated by the CircuitGraph
      corresponds to valid QASM, that can be loaded by Qiskit."""
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev)
      def qnode(x):
          qml.Hadamard(wires=0)
          qml.RY(x[1], wires=0)
          qml.CNOT(wires=[0, 1])
          qml.RX(x[0], wires=1)
          return [
              qml.expval(qml.PauliX(0)),
              qml.expval(qml.PauliZ(1)),
              qml.expval(qml.Hadamard(2)),
          ]
  
      params = [0.1, 0.2]
      qnode(params)
      qasm = qnode.qtape.to_openqasm()
      qc = self.qiskit.QuantumCircuit.from_qasm_str(qasm)
  
      gates = [g for g, _, _ in qc.data]
  
      qreg = qc.qregs[0]
      for idx, g in enumerate(gates):
          # attach a wires attribute to each gate, containing
          # a list of wire integers it acts on, so we can assert
          # correctness below.
          g.wires = [qreg.index(q) for q in qc.data[idx][1]]
  
      # operations
      assert gates[0].name == "h"
      assert gates[0].wires == [0]
  
      assert gates[1].name == "ry"
      assert gates[1].wires == [0]
      assert gates[1].params == [params[1]]
  
      assert gates[2].name == "cx"
      assert gates[2].wires == [0, 1]
  
      assert gates[4].name == "rx"
      assert gates[4].wires == [1]
      assert gates[4].params == [params[0]]
  
      # rotations
      assert gates[3].name == "h"
      assert gates[3].wires == [0]
  
      assert gates[5].name == "ry"
      assert gates[5].wires == [2]
      assert gates[5].params == [-np.pi / 4]
  
imports: from textwrap import dedent
  import numpy
  import pytest
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 4 for calling the TestQASMConformanceTests obj's underlying member method code with example usage: obj.test_qiskit_load_generated_qasm(check_dependencies) and returns: list