class_docstr: Tests specific to the ControlledQubitUnitary operation
class_docstr_tok: ["Tests","specific","to","the","ControlledQubitUnitary","operation"]
docstr: Tests the metadata and unitary for a broadcasted
  ControlledQubitUnitary raised to a power.
docstr_tok: ["Tests","the","metadata","and","unitary","for","a","broadcasted","ControlledQubitUnitary","raised","to","a","power","."]
code: def test_pow_broadcasted(self, n):
      """Tests the metadata and unitary for a broadcasted
      ControlledQubitUnitary raised to a power."""
      U1 = np.tensordot(
          np.array([1j, -1.0, 1j]),
          np.array(
              [
                  [0.73708696 + 0.61324932j, 0.27034258 + 0.08685028j],
                  [-0.24979544 - 0.1350197j, 0.95278437 + 0.1075819j],
              ]
          ),
          axes=0,
      )
  
      op = qml.ControlledQubitUnitary(
          U1, control_wires=("b", "c"), wires="a"
      )
  
      pow_ops = op.pow(n)
      assert len(pow_ops) == 1
  
      assert pow_ops[0].target_wires == op.target_wires
      assert pow_ops[0].control_wires == op.control_wires
  
      op_mat_to_pow = qml.math.linalg.matrix_power(op.data[0], n)
      assert qml.math.allclose(pow_ops[0].data[0], op_mat_to_pow)
  
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 15 for calling the TestControlledQubitUnitary obj's underlying member method code with example usage: obj.test_pow_broadcasted(n) without return types