I am trying to change the appearance of the circuit_drawer in output='mpl' mode. The registers of the Quantum Circuit are named like ($q0_0$, $q0_1$, $q1_0$, $q2_0$, $q2_1$,..) but I'd like to name them myself. I can't find a style function or option which is able to do that... any ideas?

To be clear what I would like to change:

enter image description here


1 Answer 1


When initializing the registers for the quantum circuit you need to set the parameter 'name'. For example:

f_in = QuantumRegister(n, name='f_in')
###add other registers here### 
qc = QuantumCircuit(f_in, ...)

Gives the output:

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.