class_docstr: Tests specific to the ControlledQubitUnitary operation
class_docstr_tok: ["Tests","specific","to","the","ControlledQubitUnitary","operation"]
docstr: Test if ControlledQubitUnitary returns the correct matrix for a control-control-X
  (Toffoli) gate
docstr_tok: ["Test","if","ControlledQubitUnitary","returns","the","correct","matrix","for","a","control-control-X","(","Toffoli",")","gate"]
code: def test_same_as_Toffoli(self):
      """Test if ControlledQubitUnitary returns the correct matrix for a control-control-X
      (Toffoli) gate"""
      mat = qml.ControlledQubitUnitary(
          X, control_wires=[0, 1], wires=2
      ).matrix()
      mat2 = qml.Toffoli(wires=[0, 1, 2]).matrix()
      assert np.allclose(mat, mat2)
  
imports: import copy
  import numpy
  import pytest
  from scipy.linalg import fractional_matrix_power
  from scipy.sparse import csr_matrix
  from scipy.stats import unitary_group
  from gate_data import CY, CZ
  import pennylane
  from pennylane.wires import Wires
  from pennylane.operation import AnyWires
  from pennylane.ops.qubit.matrix_ops import QubitUnitary
label_desc: Use image node_id 11 for calling the TestControlledQubitUnitary obj's underlying member method code with example usage: obj.test_same_as_Toffoli() without return types