ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
876 stars 271 forks source link

Example get probabilities on IBM Backend #363

Closed quantum-rookie closed 4 years ago

quantum-rookie commented 4 years ago

I tried to run this example in pycharm, but after a while, it doesn't work, what happened? image

Takishima commented 4 years ago

Hi,

What versions of Python, pip and ProjectQ are you currently using? Also, do you get any error/warning messages? If yes, could you please provide them?

quantum-rookie commented 4 years ago

Hi,

Python 3.7, pip 20.0.2, ProjectQ 0.5.0 there is no any error/warning messages, just like this..

image

quantum-rookie commented 4 years ago

eng = MainEngine(IBMBackend(use_hardware=True, toke=token, num_runs=1024, verbose=False, device=device)) Should i add IBM account and password to this code? such as: user='', password=''.

dbretaud commented 4 years ago

could you run your code with verbose=True?

quantum-rookie commented 4 years ago

no, there is no any change . all examples about IBM as backend are useless, i don't know why.

dbretaud commented 4 years ago

the fact we don't see even 'IBM Q token> ' makes me think it's just a prompt issue. (also little bug: your MainEngine is defined only if device is None). Try to run it by replacing the prompts by your IBMQ token and the device you want to run it with.

dbretaud commented 4 years ago

Anyway, seems IBMQ already upgraded their job submission mechanism; submitting circuits (what we were doing) via the POST method is getting deprecated: https://github.com/Qiskit/qiskit-ibmq-provider/commit/e33b17ad260f86bdefd27e4e72f7fb2083719f69

quantum-rookie commented 4 years ago

ok thanks for your help.