How to resolve "No solver with the name DW_200Q_2 was available"?
I'm trying to use DWave_NetworkX via qbsolv with a fixed embedding. When I call minorminer.find_embedding
275 EMBEDDED_COMPLETE_GRAPH_SIZE = 60
276 compG = nx.complete_graph(EMBEDDED_COMPLETE_GRAPH_SIZE)
277 embeddedCompG = mm.find_embedding(compG.edges, DWaveSampler().edgelist)
I get the error "KeyError: 'No solver with the name DW_2000Q_2 was available'". I looked at my ~/.config/dwave.conf file, which had "solver = DW_2000Q_2", and changed it to "DW_2000Q_VFYC_3" (and saved the changes and opened a new macOS Terminal in which to run iPython) and am still getting the same failure. What other config should I change?
Comments
Have you tried just solver = 'DW_2000Q_3'?
Note: the graph configurations is different for this solver
Then do from your terminal "dwave ping", you should see something like this if connected:
[11:25:14]-[Ahmed]: dwave ping
Using endpoint: https://cloud.dwavesys.com/sapi/
Using solver: DW_2000Q_3
Submitted problem ID: xxXXxxxXXXXXXxxxxXXX [this will be your problem id number ]
Wall clock time:
* Solver definition fetch: 2018.389 ms
* Problem submit and results fetch: 496.002 ms
* Total: 2514.391 ms
QPU timing:
* total_real_time = 9326 us
* qpu_access_overhead_time = 999 us
* anneal_time_per_run = 20 us
* post_processing_overhead_time = 1855 us
* qpu_sampling_time = 164 us
* readout_time_per_run = 123 us
* qpu_delay_time_per_sample = 21 us
* qpu_anneal_time_per_sample = 20 us
* total_post_processing_time = 1855 us
* qpu_programming_time = 9162 us
* run_time_chip = 164 us
* qpu_access_time = 9326 us
* qpu_readout_time_per_sample = 123 us
--------------------------------------------------------------------------
Hello Steve, I understand from a private discussion that you were able to resolve the issue. I would like to document the resolution here in case any other users experience the same problem.
The cause of the response, "No solver with the name DW_2000Q_2 was available" is that the right configuration file was not updated. The document at ~/.config/dwave.conf was not the active file referenced by Ocean tools, and the active configuration file was unchanged.
Here are some helpful python commands if you are having a similar issue. To locate the active configuration file:
To inspect the configuration and see information about the default solver:
To test the connection to D-Wave:
To see all paths examined for configuration files:
Hello,
I have read and checked all the comments above.
I have located the correct active configuration and when I test the connection to D-Wave, it pushes that error:
Invalid configuration: 'solver = DW_2000Q_3' (code: 1)
Can anyone help me to overcome this error, please?
Hi Serkan,
Currently the DW_2000Q_3 solver is not available - the active solver is now DW_2000Q_2_1.
(You can find this information on the Leap Dashboard under "Connecting to Quantum Cloud Services")
Could you confirm that you have updated your configuration file to reference DW_2000Q_2_1?
Hi again,
I have updated the configuration file to to reference DW_2000Q_2_1 instead of DW_2000Q_3 as you have mentioned. However, a similar error appears:
Error: Invalid configuration: 'solver = DW_2000Q_2_1' (code: 1)
What am I missing this time?
I am having the same issue. I have tried 2000Q_2_1, as well a installing ocean sdk without a venv
Here is my setup output and result:
c:\Users\amunr\AppData\Local\dwavesystem\dwave>pip install dwave-ocean-sdk
Collecting dwave-ocean-sdk
Using cached dwave_ocean_sdk-2.2.0-py3-none-any.whl (6.9 kB)
Collecting dwave-system==0.9.5
Using cached dwave_system-0.9.5-py3-none-any.whl (87 kB)
Collecting dwave-networkx==0.8.6
Using cached dwave_networkx-0.8.6-py2.py3-none-any.whl (81 kB)
Requirement already satisfied: penaltymodel-mip==0.2.3; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.2.3)
Requirement already satisfied: penaltymodel==0.16.3 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.16.3)
Collecting dwave-hybrid==0.4.3
Using cached dwave_hybrid-0.4.3-py2.py3-none-any.whl (90 kB)
Requirement already satisfied: dwavebinarycsp==0.1.2 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.1.2)
Requirement already satisfied: penaltymodel-cache==0.4.1 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.4.1)
Requirement already satisfied: dimod==0.9.2 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.9.2)
Processing c:\users\amunr\appdata\local\pip\cache\wheels\9e\e0\5f\5b645ab06099f4c5d3ca6e8180a84b8f0bc17c01fa21a03ec1\pyqubo-0.4.0-py3-none-any.whl
Collecting dwave-inspector==0.2.1
Using cached dwave_inspector-0.2.1-py2.py3-none-any.whl (24 kB)
Requirement already satisfied: penaltymodel-lp==0.1.3 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.1.3)
Collecting dwave-cloud-client==0.7.2
Using cached dwave_cloud_client-0.7.2-py2.py3-none-any.whl (83 kB)
Collecting dwave-neal==0.5.4
Using cached dwave_neal-0.5.4-cp38-cp38-win_amd64.whl (87 kB)
Requirement already satisfied: dwave-tabu==0.3.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.3.0)
Requirement already satisfied: dwave-qbsolv==0.3.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-ocean-sdk) (0.3.0)
Collecting minorminer==0.1.9
Using cached minorminer-0.1.9.tar.gz (129 kB)
Requirement already satisfied: numpy<2.0.0,>=1.14.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-system==0.9.5->dwave-ocean-sdk) (1.18.5)
Requirement already satisfied: networkx<3.0,>=2.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-system==0.9.5->dwave-ocean-sdk) (2.4)
Requirement already satisfied: six<2.0.0,>=1.11.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-system==0.9.5->dwave-ocean-sdk) (1.15.0)
Requirement already satisfied: homebase<2.0.0,>=1.0.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-system==0.9.5->dwave-ocean-sdk) (1.0.1)
Requirement already satisfied: decorator<5.0.0,>=4.1.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-networkx==0.8.6->dwave-ocean-sdk) (4.4.2)
Requirement already satisfied: ortools<8.0.0,>=6.6.4659 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from penaltymodel-mip==0.2.3; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64"->dwave-ocean-sdk) (7.7.7810)
Collecting plucky>=0.4.3
Using cached plucky-0.4.3-py2.py3-none-any.whl (10 kB)
Collecting click>5
Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Flask>=1.1.1
Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Requirement already satisfied: scipy<2.0.0,>=0.15.0 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from penaltymodel-lp==0.1.3->dwave-ocean-sdk) (1.4.1)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-cloud-client==0.7.2->dwave-ocean-sdk) (2.8.1)
Requirement already satisfied: requests[socks]>=2.18 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from dwave-cloud-client==0.7.2->dwave-ocean-sdk) (2.23.0)
Requirement already satisfied: protobuf>=3.12.2 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from ortools<8.0.0,>=6.6.4659->penaltymodel-mip==0.2.3; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64"->dwave-ocean-sdk) (3.12.2)
Requirement already satisfied: Jinja2>=2.10.1 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from Flask>=1.1.1->dwave-inspector==0.2.1->dwave-ocean-sdk) (2.11.2)
Collecting itsdangerous>=0.24
Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Werkzeug>=0.15
Using cached Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from requests[socks]>=2.18->dwave-cloud-client==0.7.2->dwave-ocean-sdk) (1.25.9)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from requests[socks]>=2.18->dwave-cloud-client==0.7.2->dwave-ocean-sdk) (2020.4.5.2)
Requirement already satisfied: idna<3,>=2.5 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from requests[socks]>=2.18->dwave-cloud-client==0.7.2->dwave-ocean-sdk) (2.9)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from requests[socks]>=2.18->dwave-cloud-client==0.7.2->dwave-ocean-sdk) (3.0.4)
Collecting PySocks!=1.5.7,>=1.5.6; extra == "socks"
Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)
Requirement already satisfied: setuptools in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from protobuf>=3.12.2->ortools<8.0.0,>=6.6.4659->penaltymodel-mip==0.2.3; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64"->dwave-ocean-sdk) (47.3.1)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\amunr\appdata\local\programs\python\python38\lib\site-packages (from Jinja2>=2.10.1->Flask>=1.1.1->dwave-inspector==0.2.1->dwave-ocean-sdk) (1.1.1)
Using legacy setup.py install for minorminer, since package 'wheel' is not installed.
Installing collected packages: minorminer, click, plucky, dwave-cloud-client, dwave-networkx, dwave-system, dwave-neal, dwave-hybrid, pyqubo, itsdangerous, Werkzeug, Flask, dwave-inspector, dwave-ocean-sdk, PySocks
Running setup.py install for minorminer ... done
Successfully installed Flask-1.1.2 PySocks-1.7.1 Werkzeug-1.0.1 click-7.1.2 dwave-cloud-client-0.7.2 dwave-hybrid-0.4.3 dwave-inspector-0.2.1 dwave-neal-0.5.4 dwave-networkx-0.8.6 dwave-ocean-sdk-2.2.0 dwave-system-0.9.5 itsdangerous-1.1.0 minorminer-0.1.9 plucky-0.4.3 pyqubo-0.4.0
c:\Users\amunr\AppData\Local\dwavesystem\dwave>dwave install -a
D-Wave Drivers
These drivers enable some automated performance-tuning features.
This package is available under the D-Wave EULA license.
The terms of the license are available online: https://docs.ocean.dwavesys.com/eula
Install (y/n)? [y]:
Installing: D-Wave Drivers
Successfully installed D-Wave Drivers.
D-Wave Problem Inspector
This tool visualizes problems submitted to the quantum computer and the results returned.
This package is available under the D-Wave EULA license.
The terms of the license are available online: https://docs.ocean.dwavesys.com/eula
Install (y/n)? [y]:
Installing: D-Wave Problem Inspector
Successfully installed D-Wave Problem Inspector.
c:\Users\amunr\AppData\Local\dwavesystem\dwave>dwave setup
Optionally install non-open-source packages and configure your environment.
Do you want to select non-open-source packages to install (y/n)? [y]: y
D-Wave Drivers already installed.
D-Wave Problem Inspector already installed.
Creating the D-Wave configuration file.
Found existing configuration file: .\dwave.conf
Configuration file path [.\dwave.conf]:
Profile (create new or choose from: prod, prod1): prod
API endpoint URL [https://cloud.dwavesys.com/sapi]:
Authentication token [DEV-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]:
Default client class [qpu]:
Default solver [DW_2000Q_3]:
Configuration saved.
c:\Users\amunr\AppData\Local\dwavesystem\dwave>dwave ping
Using endpoint: https://cloud.dwavesys.com/sapi
Error: Solver not available. (code: 6)
c:\Users\amunr\AppData\Local\dwavesystem\dwave>dwave setup
Optionally install non-open-source packages and configure your environment.
Do you want to select non-open-source packages to install (y/n)? [y]: n
Creating the D-Wave configuration file.
Found existing configuration file: .\dwave.conf
Configuration file path [.\dwave.conf]: c:\Users\amunr\AppData\Local\dwavesystem\
Profile (create new) [prod]:
API endpoint URL [skip]:
Authentication token [skip]: DEV-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Default client class [skip]:
Default solver [skip]:
Error writing to configuration file: [Errno 2] No such file or directory: 'c:\\Users\\amunr\\AppData\\Local\\dwavesystem\\'
c:\Users\amunr\AppData\Local\dwavesystem\dwave>cd ..
c:\Users\amunr\AppData\Local\dwavesystem>dwave setup
Optionally install non-open-source packages and configure your environment.
Do you want to select non-open-source packages to install (y/n)? [y]:
D-Wave Drivers already installed.
D-Wave Problem Inspector already installed.
Creating the D-Wave configuration file.
Found existing configuration file: C:\Users\amunr\AppData\Local\dwavesystem\dwave\dwave.conf
Configuration file path [C:\Users\amunr\AppData\Local\dwavesystem\dwave\dwave.conf]:
Profile (create new or choose from: prod, prod1): prod
API endpoint URL [https://cloud.dwavesys.com/sapi]:
Authentication token [DEV-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]:
Default client class [qpu]:
Default solver [DW_2000Q_3]:
Configuration saved.
c:\Users\amunr\AppData\Local\dwavesystem>dwave ping
Using endpoint: https://cloud.dwavesys.com/sapi
Error: Solver not available. (code: 6)
c:\Users\amunr\AppData\Local\dwavesystem>ping cloud.dwavesys.com/sapi
Ping request could not find host cloud.dwavesys.com/sapi. Please check the name and try again.
c:\Users\amunr\AppData\Local\dwavesystem>ping cloud.dwavesys.com
Pinging cloud.dwavesys.com [54.213.246.2] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 54.213.246.2:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
c:\Users\amunr\AppData\Local\dwavesystem>
Hello,
Does replacing DW_2000Q_2_1 with DW_2000Q_6 solve the issue?
You can see which solvers are available to you on the leap dashboard near the bottom:
https://cloud.dwavesys.com/leap/
I hope this helps!
Yes. I works now. Thank you very much!
Please sign in to leave a comment.