ApplyMultiControlledC operation

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Canon

Package: Microsoft.Quantum.Standard

Applies a multiply controlled version of a singly controlled operation. The modifier C indicates that the single-qubit operation is controllable.

operation ApplyMultiControlledC (singlyControlledOp : (Qubit[] => Unit), ccnot : Microsoft.Quantum.Canon.CCNOTop, controls : Qubit[], targets : Qubit[]) : Unit is Ctl

Input

singlyControlledOp : Qubit[] => Unit

An operation controlled on a single qubit. The first qubit in the argument of the operation is assumed to be a control and the rest are assumed to be target qubits. ApplyMultiControlled always calls singlyControlledOp with an argument of length at least 1.

ccnot : CCNOTop

The controlled-controlled-NOT gate to use for the construction.

controls : Qubit[]

The qubits that singlyControlledOp is to be controlled on. The length of controls must be at least 1.

targets : Qubit[]

The target qubits that singlyControlledOp acts upon.

Output : Unit

Remarks

This operation uses only clean ancilla qubits.

For the explanation and circuit diagram see Figure 4.10, Section 4.3 in Nielsen & Chuang

References

See Also