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 the basis state prepration decomposition
  is correctly applied.
docstr_tok: ["Test","that","the","basis","state","prepration","decomposition","is","correctly","applied","."]
code: def test_basis_state_initialization_decomposition(self):
      """Test that the basis state prepration decomposition
      is correctly applied."""
      dev = qml.device("default.qubit", 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()
  
      expected = dedent(
          """\
              OPENQASM 2.0;
              include "qelib1.inc";
              qreg q[4];
              creg c[4];
              x q[0];
              x q[2];
              x q[3];
              measure q[0] -> c[0];
              measure q[1] -> c[1];
              measure q[2] -> c[2];
              measure q[3] -> c[3];
              """
      )
  
      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 7 for calling the TestQNodeQasmIntegrationTests obj's underlying member method code with example usage: obj.test_basis_state_initialization_decomposition() and returns: qml