3
$\begingroup$

A quantum circuit can be visualized in Qiskit with circuit.draw. A drawing style can be set with parameter output which can have values mpl, text or latex (e.g circuit.draw(output='mpl')).

I am wondering if there is a way to use the same symbols and colors as in IBM Quantum composer since none of the above allow me to do so.

$\endgroup$
6
$\begingroup$

The IBM circuit composer used to be also known as IBM Quantum Experience, or IQX for short. For those historical reasons, the name of the style is iqx:

from qiskit import *
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
circuit.t(1)
circuit.draw('mpl', style='iqx')

draw output

Compare with the composer look:

enter image description here

$\endgroup$
6
$\begingroup$

That’s possible, just do

circuit.draw('mpl', style='iqx')
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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