Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23390

why ModuleNotFoundError: No module named 'qiskit.opflow' occured?

$
0
0

i installed version 1.1 of qiskit. i don't have any idea why i can't able to use opflow module.this is the line i have error from qiskit.opflow import Gradient, StateFn, CircuitStateFn, Z

and this error occured in google colab:

> ModuleNotFoundError                       Traceback (most recent call last)<ipython-input-2-1eb6f7fd39a6> in <cell line: 11>()      9 from qiskit.circuit import ParameterVector     10 from qiskit_aer import AerSimulator---> 11 from qiskit.opflow import Gradient, StateFn, CircuitStateFn, Z     12 from qiskit_machine_learning.neural_networks import OpflowQNN     13 ModuleNotFoundError: No module named 'qiskit.opflow'NOTE: If your import is failing due to a missing package, you canmanually install dependencies using either !pip or !apt.To view examples of installing some common dependencies, click the"Open Examples" button below.

i expect to be able to use opflow module after installing qiskit 1.1and the document of qiskit is not tell anything about it.


Viewing all articles
Browse latest Browse all 23390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>