supergrad.utils.gates.controlled_gate#
- supergrad.utils.gates.controlled_gate(u, n=2, control=0, target=1, control_value=1)[source]#
Create an N-qubit controlled gate from a single-qubit gate U with the given
SuperGrad-supported implementation of
qutip_qip.operations.gates.controlled_gate().Original docstring below.
control and target qubits.
- Parameters:
control_value (int) – The decimal value of the controlled qubits that activates the gate U.
- Returns:
result – Quantum object representing the controlled-U gate.
- Return type:
qobj