3
$\begingroup$

I was wondering if I could use Qiskit locally on Jupyter Notebook and thus loaded my IBM-Q account via API token. I could construct circuits execute jobs but when I tried to use circuit composer, it returned nothing like the interactive circuit-composer as it does in IBM Quantum Lab. I ran the following code:

from qiskit import QuantumCircuit, execute, Aer, IBMQ 
from qiskit.compiler import transpile, assemble
from qiskit.tools.jupyter import *
from qiskit.visualization import *
from ibm_quantum_widgets import *
%matplotlib inline
from ibm_quantum_widgets import CircuitComposer
CircuitComposer()

It returned the following:

CircuitComposer(circuit=<qiskit.circuit.quantumcircuit.QuantumCircuit object at 0x15C528F8>)

Is there anything I am possibly missing out? p.s qiskit has the latest version installed.

$\endgroup$

1 Answer 1

3
$\begingroup$

Before running the local notebook, you need to enable the ibm_quantum_widgets extension. You can check if it is enable with jupyter nbextension list.

Otherwise, you can enable it, for example, like this:

jupyter nbextension enable --py --user ibm_quantum_widgets

Or by the jupyter_nbextensions_configurator server, typically in http://127.0.0.1:8888/nbextensions :

enter image description here

$\endgroup$
0

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.