qiskit-community / qiskit-ignis

Ignis (deprecated) provides tools for quantum hardware verification, noise characterization, and error correction.
Apache License 2.0
167 stars 160 forks source link

ImportError #574

Closed zohimchandani closed 3 years ago

zohimchandani commented 3 years ago

Informations

What is the current behavior?

Copying the code from the source for the quantum volume fitter but getting an import error:

----> 6 from ...utils import build_counts_dict_from_list
      7 
      8 try:

ImportError: attempted relative import with no known parent package

Steps to reproduce the problem

Copy the code and try to run it

What is the expected behavior?

Should run without any errors

Suggested solutions

ShellyGarion commented 3 years ago

This code is not meant to be run independently, only when you call QVFitter as described in the tutorial: https://qiskit.org/documentation/tutorials/noise/5_quantum_volume.html

Anyway, if you replace this line by: from qiskit.ignis.utils import build_counts_dict_from_list then it should work.

If you have any further questions - please ask them in the qiskit-ignis slack channel (see the link in the README file)