class_docstr: Unit tests for clifford compilation function.
class_docstr_tok: ["Unit","tests","for","clifford","compilation","function","."]
docstr: Test that unwrap converts lists to lists and interface variables to numpy.
docstr_tok: ["Test","that","unwrap","converts","lists","to","lists","and","interface","variables","to","numpy","."]
code: def test_clifford_decompose_interfaces(self):
      """Test that unwrap converts lists to lists and interface variables to numpy."""
  
      dev = qml.device("default.qubit", wires=3)
  
      def circuit(x):
          qml.RZ(x[0], wires=[0])
          qml.PhaseShift(x[1], wires=[1])
          qml.SingleExcitation(x[2], wires=[1, 2])
          qml.PauliX(0)
          return qml.expval(qml.PauliZ(1))
  
      original_qnode = qml.QNode(circuit, dev)
      transfmd_qnode = qml.QNode(
          clifford_t_decomposition(
              circuit, max_depth=3, basis_length=10
          ),
          dev,
      )
  
      import jax
      import torch
      import tensorflow as tf
  
      funres = []
      igrads = []
      coeffs = [1.0, 2.0, 3.0]
      for qcirc in [original_qnode, transfmd_qnode]:
          # Autograd Interface
          A = qml.numpy.array(coeffs)
          fres_numpy = qcirc(A)
          grad_numpy = qml.grad(qcirc, argnum=0)(A)
  
          # Jax Interface
          A = jax.numpy.array(coeffs)
          fres_jax = qcirc(A)
          grad_jax = jax.grad(qcirc, argnums=0)(A)
  
          # Tensorflow Interface
          A = tf.Variable(qml.numpy.array(coeffs))
          with tf.GradientTape() as tape:
              loss = qcirc(A)
          grad_tflow = tape.gradient(loss, A)
          fres_tflow = loss
  
          # PyTorch Interface
          A = torch.tensor(coeffs, requires_grad=True)
          result = qcirc(A)
          result.backward()
          grad_torch = A.grad
          fres_torch = result
  
          funres.append([fres_numpy, fres_jax, fres_torch, fres_tflow])
          igrads.append([grad_numpy, grad_jax, grad_torch, grad_tflow])
  
      # Compare results
      assert all(
          qml.math.allclose(res1, res2, atol=1e-2)
          for res1, res2 in zip(*funres)
      )
      assert all(
          qml.math.allclose(res1, res2, atol=1e-2)
          for res1, res2 in zip(*igrads)
      )
  
imports: import math
  from functools import reduce
  import pytest
  import pennylane
  from pennylane.transforms.decompositions.clifford_t_transform import check_clifford_t, clifford_t_decomposition, _rot_decompose, _one_qubit_decompose, _two_qubit_decompose, _CLIFFORD_T_GATES
  from pennylane.transforms.optimization.optimization_utils import _fuse_global_phases
label_desc: Use image node_id 12 for calling the TestCliffordCompile obj's underlying member method code with example usage: obj.test_clifford_decompose_interfaces() and returns: qml