-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending Scripts to the QPU #32
Comments
MINOR DOCUMENTATION FIX
Hi @Bhaney44, Were you able to set up your virtualenv? After setting it up, did you install the dwave-ocean-sdk? The networkx library should be installed as a dependency with dwave-ocean-sdk. Are you able to import dimod? Best regards, Dave. |
Yeah I'm all good. Thanks @davage. |
I was wrong, I tried tonight and had the same problem. The issue is I can run dwave ping and get a fine response. I can also run a random problem. However, the problem is I cannot send python scripts to the QPU. The Docs skip over how to actually send a problem to the QPU. So, here in the docs is the problem. While I can set up a config, but the docs say
But, I'm struggling to accomplish this. The code says:
But, that returns an error for me. Traditionally, if you type python in the command line you can code in python, but that doesn't work with the QPU. Similarly, you can type Python file_name.py to run a file from the command line on the CPU. I want to get to here:
Either directly from the command line or even better if I can save this as a .py file and simply send it to the QPU. But, with the QPU, there isn't an intuitive way to send or run scripts. In short, I have scripts written - how do I send those python scripts to the QPU? In other words how do you get from sending a dwave ping to sending a Python script. I hope this makes sense. Thanks again for your help. I sincerely appreciate it. Brian |
So for the DWaveSampler, every time you run sample() or sample_ising(), you are actually sending the problem to the QPU and the result returned is the sample taken from the QPU. The first part of the code with the client, is probably unnecessary. You should be able to just run the second block of code as is, without the client set up. The dwave ping command will work as long as your virtual environment is activated and your config is set up properly, and as long as dwave ping works, you should be able to send problems to the QPU. |
That makes a lot of sense, thanks. You explained that very clearly, I sincerely appreciate it. |
Description
A clear and concise description of what the bug is.
I keep into the same problem. After I complete the configuration and confirm my computer is linked to the QPU via dwave ping, I am unable to begin sending scripts to the QPU. Indeed, because I have to create a virtual environment to connect to the QPU, none of the scripts on my computer are available to send. Further, when I try to code directly from the command line in Python the return states the module isn't present.
To Reproduce
Stack Overflow provides an excellent guide on how to create a Minimal, Complete and Verifiable example.
For example, once I create a configuration file, I may run $ python:
import networkx as nx
But, the return is
ImportError: No module named networkx
Expected behavior
A clear and concise description of what you expected to happen.
I expected once I was in the virtual environment to have access to the modules. Alternatively, I would want to be able to send scripts to the QPU. I can run some programs through the Jupyter Notebook, but a lot of the modules - like QBoost - aren't available. I would appreciate any advice on how to proceed.
Environment:
Additional context
Add any other context about the problem here.
With thanks,
Brian
The text was updated successfully, but these errors were encountered: