pdft.circuit.controlled

Contents

pdft.circuit.controlled#

pdft.circuit.controlled(block)[source]#

The dense two-qubit tensor that applies the one-qubit block where the control is 1.

block[out, in] acts on the target; where the control is 0 nothing happens. Axis order: (out_ctrl, out_tgt, in_ctrl, in_tgt), the storage of a "U4" gate. A controlled phase, a CNOT and a controlled rotation are this with a diagonal, a bit flip and a rotation for block.

Parameters:

block (Array)

Return type:

Array