class_docstr: Unit tests for the to_openqasm() method
class_docstr_tok: ["Unit","tests","for","the","to_openqasm","(",")","method"]
docstr: Test that unused wires are correctly taken into account
docstr_tok: ["Test","that","unused","wires","are","correctly","taken","into","account"]
code: def test_unused_wires(self):
      """Test that unused wires are correctly taken into account"""
      with qml.queuing.AnnotatedQueue() as q_circuit:
          qml.Hadamard(wires=4)
          qml.CNOT(wires=[1, 0])
  
      circuit = qml.tape.QuantumScript.from_queue(q_circuit)
      res = circuit.to_openqasm(wires=Wires([0, 1, 2, 3, 4]))
  
      expected = dedent(
          """\
              OPENQASM 2.0;
              include "qelib1.inc";
              qreg q[5];
              creg c[5];
              h q[4];
              cx q[1],q[0];
              measure q[0] -> c[0];
              measure q[1] -> c[1];
              measure q[2] -> c[2];
              measure q[3] -> c[3];
              measure q[4] -> c[4];
              """
      )
  
      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 TestToQasmUnitTests obj's underlying member method code with example usage: obj.test_unused_wires() without return types