1
$\begingroup$

I have prepared a parameterized custom quantum gate in qiskit by converting a quantum circuit into a gate through QuantumCircuit.to_gate(). However, the text content in each of the quantum gates 2QU1, 2QU2, and 2QU3 makes the gates too wide in appearance.

Is there a way to change the display of the content of all the parameters (15 parameters in each custom gate) inside the custom parameterized gates? enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

Matplotlib circuit drawer displays up to 16 parameters. This number is hardcoded as you can see in this screenshot:

enter image description here

On the other hand, Latex circuit drawer displays up to 4 parameters. So, you can use Latex drawer if it's OK. You will get a result as the below:

enter image description here

$\endgroup$
1
  • $\begingroup$ Okay. Thank you for the suggestions. But, is there a way to change the display of the quantum circuit in qiskit where the 2QU1, 2QU2, and 2QU3 gates display as small gates that does not explicitly displays all the parameters of each of those custom gates? $\endgroup$ Commented Jan 23 at 14:28

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .