What is the source of my "ImportError" when using the python package qiskit?

24 views Asked by At

I am attempting to use the RACBEM package. I created a new conda environment and follow their installation instructions using python v3.7.1. Following their instructions, I then attempt to test it using python main_test.py but I get the error below.

Traceback (most recent call last):
  File "main_test.py", line 31, in <module>
    from racbem import *
  File "~\RACBEM-master\racbem.py", line 35, in <module>
    from random_circuit import random_circuit
  File "~\RACBEM-master\random_circuit.py", line 41, in <module>
    from qiskit.extensions import (IdGate, U1Gate, U2Gate, U3Gate, XGate,
ImportError: cannot import name 'IdGate' from 'qiskit.extensions' (~\AppData\Local\miniconda3\envs\racbem\lib\site-packages\qiskit\extensions\__init__.py)

Since the RACBEM code was written in 2020, I tried to install earlier versions of qiskit which may have been what they were using. However, it did not work and I got the same error.

0

There are 0 answers