I'm drawing with Qiskit a big circuit with some predefined and custom gates. I want to colour some of them in non-default colours for a better reading of it. Is it possible to do it for predefined gates? And for custom ones? Here is some code to play with:
from qiskit import QuantumCircuit, QuantumRegister
def cnotnot(gate_label = 'CNOTNOT'):
gate_circuit = QuantumCircuit(3, name = gate_label)
gate_circuit.cnot(0, 1)
gate_circuit.cnot(0, 2)
gate = gate_circuit.to_gate()
return gate
q = QuantumRegister(3, name = 'q')
circuit = QuantumCircuit(q)
circuit.append(cnotnot(), [q[0], q[1], q[2]])
circuit.h(q[0])
circuit.draw()
Thanks in advance!
gate.label = gate_label
is not necessary. Editing $\endgroup$