1
$\begingroup$

I have written a function that applies the Hadamard gate to all qubits in a circuit, and use the draw() function to visualize the circuit. However, there is this column of indices of the qubits that appears with the custom gate here is a picture of the draw() function. How do I get rid of this?

picture of the function superpose_all that applies the Hadamard gate to all qubits in a circuit

$\endgroup$
2
  • $\begingroup$ The problem is that your function return a sub circuit which is in main circuit drawn as a block. To show individual Hadamarda, do not use function and put them on qubits directly in the main circuit. $\endgroup$ Aug 17, 2023 at 4:59
  • $\begingroup$ I don't think that is currently supported. If you would like to make a case for that use-case, request it as a feature in github.com/Qiskit/qiskit-terra/issues/… $\endgroup$
    – luciano
    Aug 18, 2023 at 11:51

0

Your Answer

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

Browse other questions tagged or ask your own question.