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 basis state prepration QASM agrees
  with that generated by the PennyLane-Qiskit plugin. This is
  a useful test to ensure that we are using the correct qubit
  ordering convention.
docstr_tok: ["Test","that","the","basis","state","prepration","QASM","agrees","with","that","generated","by","the","PennyLane-Qiskit","plugin",".","This","is","a","useful","test","to","ensure","that","we","are","using","the","correct","qubit","ordering","convention","."]
code: def test_basis_state_agrees_qiskit_plugin(self, check_dependencies):
      """Test that the basis state prepration QASM agrees
      with that generated by the PennyLane-Qiskit plugin. This is
      a useful test to ensure that we are using the correct qubit
      ordering convention."""
      dev = qml.device("qiskit.basicaer", wires=4)
  
      @qml.qnode(dev)
      def qnode(state=None):
          qml.BasisState(state, wires=[0, 1, 2, 3])
          return qml.expval(qml.PauliZ(0))
  
      # construct the qnode circuit
      qnode(state=np.array([1, 0, 1, 1]))
      res = qnode.qtape.to_openqasm(wires=dev.wires)
      expected = dev._circuit.qasm()
  
      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 3 for calling the TestQASMConformanceTests obj's underlying member method code with example usage: obj.test_basis_state_agrees_qiskit_plugin(check_dependencies) and returns: qml