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

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



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