Comments (29)
Hi,
Thank you for pointing this. I also got the same error when running the notebook. It is due to a bug in compiler that swap measurement to the middle of the computation but the devices do not support such operation yet. I confirmed that I can avoid the error by inserting barrier before measurement, like:
#put barrier before measurement
qc.barrier(qr)
# measure
for j in range(16):
qc.measure(qr[j], cr[j])
# run and get results
results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024, timeout=240)
stats = results.get_counts("smiley_writer")
I cannot run the real device now because it is under maintenance though.
from qiskit-tutorials.
Hi @rraymondhp, thanks a lot for your answer!!! Very helpful.
BTW, I just realised that this same problem was reported in IBM Q Experience Community too: Code not working on IBMQX5.
Thanks again for your help.
from qiskit-tutorials.
from qiskit-tutorials.
I found this other issue in qiskit-sdk-py that seems to be related: Unexpected result qasm simulator with coupling map (stable) #181
from qiskit-tutorials.
I get the same error
from qiskit-tutorials.
I get the same error
from qiskit-tutorials.
I get same error. Thank you @rraymondhp.
from qiskit-tutorials.
@rraymondhp I added the barrier statement just like you mentioned in the quantum-emoticon sample.
#put barrier before measurement
qc.barrier(qr)
for j in range(16):
qc.measure(qr[j], cr[j])
results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024)
stats = results.get_counts("smiley_writer")
It did run once without error.
But now i get the following error:
---------------------------------------------------------------------------
QISKitError Traceback (most recent call last)
<ipython-input-2-de74e9d080e0> in <module>()
34 # run and get results
35 results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024)
---> 36 stats = results.get_counts("smiley_writer")
/ibmq/anaconda/lib/python3.6/site-packages/qiskit/_result.py in get_counts(self, name)
231 """
232 try:
--> 233 return self.get_data(name)['counts']
234 except KeyError:
235 raise QISKitError('No counts for circuit "{0}"'.format(name))
/ibmq/anaconda/lib/python3.6/site-packages/qiskit/_result.py in get_data(self, name)
204 raise exception
205 else:
--> 206 raise QISKitError(str(exception))
207
208 try:
QISKitError: 'QISkit Time Out'
from qiskit-tutorials.
Hi,
It is likely because there are too many job queue for the ibmqx5. The last time I heard there were about 1000+ jobs waiting in line. Please wait and try to run your job again later.
I will try to see the workaround.
P.S. My colleagure run ibmqx5 just now and it completed just fine...
from qiskit-tutorials.
@rraymondhp the queues are fine right now, wouldn't it be because the time-out set is too short for the experiment?
from qiskit-tutorials.
Yes, it is because of the timeout=60
in the default notebook. I have just confirmed that by having the timeout=300
or larger, I could run in just fine. @tanweer-ali
Thanks @francabrera !
from qiskit-tutorials.
@rraymondhp Thankyou for the timeout tip.
That worked!
Now the next section of the code which is supposed to draw the plots
i get the following output:
0.2109375 S
0.1796875 SÊ
<matplotlib.figure.Figure at 0x7faf03915278>
And i don't see any plots
from qiskit-tutorials.
You're welcome @tanweer-ali
This is an issue with permutation of qubit measurements that we are still working to fix.
This is the workaround as noted in my notebook below:
https://github.com/jaygambetta/qiskit-tutorial/blob/rr-quantum-emoticon-nopermutation/hello_world/quantum_emoticon-without_permutation.ipynb
We also had a discussion on the slack channel about this.
https://qiskit.slack.com/archives/C7SJ0PJ5A/p1519833287000006
Sorry for the inconvenience!
from qiskit-tutorials.
@rraymondhp Thank you!
How do i join the slack channel? my email is not signed up for it ?
I am still looking into your other link.
from qiskit-tutorials.
Closing this issue. Fixed in Qiskit/qiskit#347
from qiskit-tutorials.
#put barrier before measurement
qc.barrier(qr)
measure
for j in range(16):
qc.measure(qr[j], cr[j])
run and get results
results = qp.execute(["smiley_writer"], backend='ibmqx5', shots=1024, timeout=300)
stats = results.get_counts("smiley_writer")
Even after putting barrier before measurement . we are still getting error. please tell solution
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
Got a 400 code response to https://quantumexperience.ng.bluemix.net/api/Jobs?access_token=MZgk97UyjskiUbqxKJmEPYKB46DDjdyJb0DiQ7gBu2HcP8A17H0Ps1s7I6PNBGzK: {"error":{"status":400,"message":"Generic error","code":"GENERIC_ERROR"}}
from qiskit-tutorials.
Hi @amandeep1988
It's strange because clicking the links (https://...) at your post I can see the counts/outputs of your results. Let me see what is wrong. Have you updated your qiskit to the latest version of 0.5.6?
Please also change your token, as it has been revealed to public by your post.
from qiskit-tutorials.
from qiskit-tutorials.
@rraymondhp
Now, it gives timed out error.
Sometimes it gives Got a 400 code response........... or either timeout error even after setting timeout to 600.
from qiskit-tutorials.
600 secs are too short. please refer to the tutorial below for how to queue without setting timeout.
from qiskit-tutorials.
from qiskit-tutorials.
hi,
my point is to replace the timeout function as below:
lapse = 0
interval = 10
while not job_exp.done:
print('Status @ {} seconds'.format(interval * lapse))
print(job_exp.status)
time.sleep(interval)
lapse += 1
print(job_exp.status)
plot_histogram(job_exp.result().get_counts(qc))
If you don`t need to draw circuits you can just disable the drawer. or use the matplotlib drawer as detailed here:
from qiskit-tutorials.
from qiskit-tutorials.
from qiskit-tutorials.
I will look into it later and reopen the issue.
Is it possible to have your notebook so I can test it myself?
from qiskit-tutorials.
from qiskit-tutorials.
Hi,
I cannot recreate your problem in my environment. There is a possibility you do not import Qconfig.py
appropriately. The lowest_pending_job()
function requires you to register your APItoken first before running it.
Best regards
from qiskit-tutorials.
I am closing this issue. Please raise a new issue if you still have the problem.
from qiskit-tutorials.
ImportError Traceback (most recent call last) in ()----> 1 from qiskit.tools.visualization import plot_histogram ~\Anaconda3\lib\site-packages\qiskit\tools\visualization_init_.py in () 8 """Main QISKit visualization methods.""" 9 ---> 10 from ._circuit_visualization import circuit_drawer, plot_circuit, generate_latex_source,\ 11 latex_circuit_drawer, matplotlib_circuit_drawer, qx_color_scheme 12 from ._state_visualization import plot_state ~\Anaconda3\lib\site-packages\qiskit\tools\visualization_circuit_visualization.py in () 33 import numpy as np 34 ---> 35 from PIL import Image, ImageChops 36 37 from qiskit import QuantumCircuit, QISKitError, load_qasm_file ~\Anaconda3\lib\site-packages\PIL\Image.py in () 58 # Also note that Image.core is not a publicly documented interface, 59 # and should be considered private and subject to change.---> 60 from . import _imaging as core 61 if PILLOW_VERSION != getattr(core, 'PILLOW_VERSION', None): 62 raise ImportError("The _imaging extension was built for another " ImportError: DLL load failed: The specified module could not be found. Module not found and cannot execute histogram.
…
On Thu, Jul 12, 2018 at 10:18 AM, Rudy Raymond @.***> wrote: Hi @amandeep1988 https://github.com/amandeep1988 600 secs are too short. please refer to the tutorial below for how to queue without setting timeout. https://nbviewer.jupyter.org/github/QISKit/qiskit-tutorial/ blob/master/hello_world/quantum_world.ipynb — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#88 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AMWPfeEL5fomVXyuXGTRGHHGV-E3foFXks5uFtUVgaJpZM4RzFoc .
-- Thanks & Regards Amandeep Singh
Were you ever able to resolve this - I'm getting the same error "ImportError: DLL load failed: The specified module could not be found."
from qiskit-tutorials.
Related Issues (20)
- Tutorial missing dependecies HOT 3
- Add a State Fidelities tutorial HOT 1
- AttributeError: 'Estimator' object has no attribute 'draw' HOT 2
- deploy qiskit-tutorials in ecosystem HOT 1
- Broken thumbnail for Grover tutorial HOT 3
- Refer to Trotter Evolution in the video "Time Evolution with Qiskit Nature & Opflow" HOT 2
- Refer to the problem of the tutorial "Max-Cut and Traveling Salesman Problem" HOT 4
- Add a tutorial about Quantum Imaginary Time Evolution HOT 16
- Algorithms tutorials 02_, 03_ and 04_ need amending to not use deprecated code. HOT 5
- For the problem in Qiskit Youtube Video "Time Evolution with Qiskit Nature & Opflow" HOT 2
- HHL algorithm section HOT 1
- Quantum circuit generated by Traveling Salesman Problem raise an error: "Image size of 2228x191753 pixels is too large" HOT 2
- Tutorial on using Qiskit's qiskit.algorithms.time_evolvers.variational package for variational quantum imaginary and real-time evolution based on McLachlan's variational principle HOT 2
- ParameterExpression with unbound parameters ({Parameter($\gammma$)}) cannot be cast to a float HOT 4
- Minimum Eigen Optimizer Solve Function "list index out of range" HOT 4
- Tutorial moving status HOT 3
- Typo error in QI_MIGRATION.PO source string
- Add a tutorial about Quantum Imaginary Time Evolution
- create a tutorial to demonstrate different entangled states HOT 2
- VarQITE module of Qiskit runs for more than 24000 minutes HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qiskit-tutorials.