0
$\begingroup$

I have an error when I use Quantum SVM kernel algorithm from Qiskit aqua.

This is my code section with imports:

from datasets import *
import numpy as np
from qiskit_aqua.utils import split_dataset_to_data_and_labels
from qiskit_aqua.input import svminput
from qiskit_aqua import run_algorithm
from qiskit_aqua.utils import split_dataset_to_data_and_labels

And here is the error I obtain:

ModuleNotFoundError: No module named 'qiskit_aqua'
$\endgroup$
2
  • $\begingroup$ Hi @Zeinab Ali! You need to at least include the following information in your question: version of qiskit installed, how you installed it, version of Python you are running. You can have this information with the commands python -V and python -m pip list. $\endgroup$ Jul 2, 2019 at 11:32
  • $\begingroup$ I was going to install qiskit on cluster. I got this error "ModuleNotFoundError: No module named 'qiskit.aqua' $\endgroup$ Jun 24, 2020 at 18:42

3 Answers 3

4
$\begingroup$

If your using the latest qiskit version then it is qiskit.aqua

$\endgroup$
1
  • $\begingroup$ Thanks Mr. Nation for your answer, already I did that but every time show new error such as ImportError: cannot import name 'QasmQobj' from 'qiskit.qobj' $\endgroup$
    – Zeinab Ali
    Jul 2, 2019 at 10:20
1
$\begingroup$

Please check: https://qiskit.org/documentation/stable/0.28/aqua_tutorials/Qiskit%20Algorithms%20Migration%20Guide.html

As of Qiskit 0.25.0 qiskit.aqua has been substituted by several different modules according to the specific application in Optimization, Finance, Chemistry etc...

eg. qiskit.aqua.operators has been substituted by qiskit.opflow and so on.

$\endgroup$
1
$\begingroup$

Qiskit Aqua is being phased out, and its components are being moved to different libraries. You can use the qiskit_machine_learning library. Check here: https://qiskit.org/documentation/machine-learning/apidocs/qiskit_machine_learning.html

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.