from qutip_qip.circuit import QubitCircuit
from qutip_qip.operations import gates, get_controlled_gate
qc = QubitCircuit(2)
qc.add_gate(gates.CX, 0, 1)
qc.draw()
modified_CX = get_controlled_gate(gates.X, n_ctrl_qubits=1, control_value=0)
qc2 = QubitCircuit(2)
qc2.add_gate(modified_CX, 0, 1)
qc2.draw()
Both render the control bit the same, although in the first case the control value is 1, while in the second case control value is 0. Also in case of custom controlled gates, target_gate name should be used while rendering not the controlled gate's name.
Both render the control bit the same, although in the first case the control value is 1, while in the second case control value is 0. Also in case of custom controlled gates,
target_gatename should be used while rendering not the controlled gate's name.