decompose_multi_controlled_rotation(matrix: numpy.ndarray, controls: List[cirq.Qid], target: cirq.Qid) → List[cirq.Operation]¶
Implements action of multi-controlled unitary gate.Returns a sequence of operations, which is equivalent to applyingsingle-qubit gate with matrix
target, controlled by
controls.Result is guaranteed to consist exclusively of 1-qubit, CNOT and CCNOTgates.If matrix is special unitary, result has length
O(len(controls)).Otherwise result has length
References Barenco, Bennett et al.Elementary gates for quantum computation. 1995.
- 2x2 numpy unitary matrix (matrix) –
- control qubits. (controls) –
- target qubits. (targets) –
A list of operations which, applied in a sequence, are equivalent to applying MatrixGate(matrix).on(target).controlled_by(*controls).