# CCNOT¶

pyquil.gates.CCNOT(control1, control2, target)[source]

Produces a doubly-controlled NOT gate:

CCNOT = [[1, 0, 0, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 0, 0, 0, 0, 0],
[0, 0, 0, 1, 0, 0, 0, 0],
[0, 0, 0, 0, 1, 0, 0, 0],
[0, 0, 0, 0, 0, 1, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 1],
[0, 0, 0, 0, 0, 0, 1, 0]]


This gate applies to three qubit arguments to produce the controlled-controlled-not gate instruction.

Parameters: control1 – The first control qubit. control2 – The second control qubit. target – The target qubit. The target qubit has an X-gate applied to it if both control qubits are in the excited state. A Gate object.