Install qiskit on MacOS HighSierra Error: No such file or directory: 'qiskit.egg-info'
Tag : python , By : user165871
Date : March 29 2020, 07:55 AM
With these it helps I was trying to install QISKit via the pip method as mentioned on their webpage. , You can try to install cmake. pip install cmake
|
Qiskit NameError: name 'q0' is not defined
Date : March 29 2020, 07:55 AM
I wish this helpful for you It gives you error about q0 because this is the first unknown variable that it encounters. Then it dies. There is improper flow in your program. You try to define the variable list: from qiskit import *
from qiskit.tools.visualization import *
def ccz(qci, q0, q1, q2):
qci.h(q2)
qci.ccx(q0, q1, q2)
qci.h(q2)
def grover(qci, q0, q1, q2):
ccz(qci, q0, q1, q2)
for i in [q0, q1, q2]:
qci.h(i)
qci.x(i)
ccz(qci, q0, q1, q2)
for i in [q0, q1, q2]:
qci.x(i)
qci.h(i)
bn = 3
q = QuantumRegister(bn)
c = ClassicalRegister(bn)
qc = QuantumCircuit(q, c)
for i in range(bn):
qc.h(q[i])
grover(qc, q[0], q[1], q[2])
for i in range(bn):
qc.measure(q[bn - i - 1], c[i])
r = execute(qc, "local_qasm_simulator").result()
rc = r.get_counts()
print(rc)
plot_histogram(rc)
|
No module named 'qiskit'
Date : March 29 2020, 07:55 AM
wish of those help , You need to install it via pip install qiskit
|
How to call EnergyInput() function in Qiskit python?
Tag : python , By : John Studdert
Date : March 29 2020, 07:55 AM
it should still fix some issue Have a look at this tutorial about creating QSVMs. Instead of EnergyInput() they use a class called ClassificationInput() to which they pass their data. This makes the overall expression: algo_input = ClassificationInput(training_input, test_input, datapoints[0])
|
Cannot import Aer from Qiskit 0.7
Date : March 29 2020, 07:55 AM
I wish did fix the issue. I had the same problem. I looked at the repository on GitHub of qiskit terra ( https://github.com/Qiskit/qiskit-terra) and in the examples they use BasicAer. So, I figure that they renamed to module.
|