class_docstr: Unit tests for the to_openqasm() method
class_docstr_tok: ["Unit","tests","for","the","to_openqasm","(",")","method"]
docstr: Test for case that requires a decomposition depth of 3 to successfully convert to a MutliRZ
docstr_tok: ["Test","for","case","that","requires","a","decomposition","depth","of","3","to","successfully","convert","to","a","MutliRZ"]
code: def test_to_ApproxTimeEvolution(self):
      """Test for case that requires a decomposition depth of 3 to successfully convert to a MutliRZ"""
      H = qml.Hamiltonian(
          [
              1,
          ],
          [
              qml.PauliZ(0) @ qml.PauliZ(1),
          ],
      )
      circuit = qml.tape.QuantumScript(
          [qml.ApproxTimeEvolution(H, 1, n=1)]
      )
      res = circuit.to_openqasm(wires=Wires([0, 1]))
  
      expected = dedent(
          """\
              OPENQASM 2.0;
              include "qelib1.inc";
              qreg q[2];
              creg c[2];
              cx q[1],q[0];
              rz(2.0) q[0];
              cx q[1],q[0];
              measure q[0] -> c[0];
              measure q[1] -> c[1];
              """
      )
  
      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 4 for calling the TestToQasmUnitTests obj's underlying member method code with example usage: obj.test_to_ApproxTimeEvolution() without return types