I want to plot a circuit build with TensorCircuit using the draw
method.
I am working on Google Colab and have pip installed qiskit.
Yet i get NameError: name 'QuantumCircuit'
is not defined.
I have also tried from qiskit import QuantumCircuit
but still i get the same error.
Executing the code on another JuypterHub works.
pip install qiskit
pip install pylatexenc
import numpy as np
from qiskit import *
Once you are done with above code you have to restart your runtime so that installed library come into force into your colab environment.
For restarting runtime:
Click on Runtime
Select Restart runtime
Select Run all
This help you to rectify your problem.