class_docstr: Tests specific to the ControlledQubitUnitary operation
class_docstr_tok: ["Tests","specific","to","the","ControlledQubitUnitary","operation"]
docstr: Test if ControlledQubitUnitary raises a ValueError if a unitary of shape inconsistent
  with wires is provided
docstr_tok: ["Test","if","ControlledQubitUnitary","raises","a","ValueError","if","a","unitary","of","shape","inconsistent","with","wires","is","provided"]
code: def test_wrong_shape(self):
      """Test if ControlledQubitUnitary raises a ValueError if a unitary of shape inconsistent
      with wires is provided"""
      with pytest.raises(
          ValueError, match=r"Input unitary must be of shape \(2, 2\)"
      ):
          qml.ControlledQubitUnitary(
              np.eye(4), control_wires=[0, 1], wires=2
          ).matrix()
  
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 5 for calling the TestControlledQubitUnitary obj's underlying member method code with example usage: obj.test_wrong_shape() without return types