CliffordUtils.cx_gates¶
- CliffordUtils.cx_gates(gatelist, ctrl, tgt)[source]¶
Adds a controlled-x gate on qubits ctrl and tgt to a given list of gates.
- Parameters
gatelist (list) – a list of gates.
ctrl (int) – an index of the control qubit.
tgt (int) – an index of the target qubit.
- Returns
A list of gates, after appending a controlled-x gate on two qubits.
- Return type
list