Skip to content

Latest commit

 

History

History

tutorials

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Tutorials

D-Wave Setup

  1. Install pyQBTNs:

    pip install git+https://gitlab.lanl.gov/epelofske/qbtns/-/tree/master
    • Option 2: Install from source
    git clone https://gitlab.lanl.gov/epelofske/qbtns/-/tree/master
    cd qbtns
    conda create --name pyQBTNs python=3.7.3
    source activate pyQBTNs
    python setup.py install
  2. Sign up with D-Wave Leap.

    • Make sure that you have at least 1 minute of QPU time on your free acccount. This is the default amount of QPU time given by D-Wave for free accounts. You may need to supply a developer github which makes use of D-Wave Leap for your project as part of this setup process.
  3. Set up D-Wave config file:

    • Configuration file can be created using the command line tool. It will prompt several questions:
    dwave config create
    • It will ask for configuration path. Provide the path or leave empty and press enter:
    Configuration file path:
    • Type new if it asks for Profile or choose from the provided list:
    Profile (create new or choose from: prod): new
    • Next, it will ask for API entpoint URL. You can get the URL from D-Wave dashboard:
    API endpoint URL [skip]: https://cloud.dwavesys.com/sapi/
    • Next, it will prompt for an authentication token. Your token can be found in D-Wave dashboard under API Token:
    Authentication token [skip]:TOKEN
    • After the token is provided, you will be prompted to enter a client class name. We will use qpu:
    Default client class [skip]: qpu
    
    • Now we need to enter the solver name. You can choose a solver from your D-Wave solver dashboard under Available Solvers. Since we are using the QPU class, example solver names could be Advantage_system1.1 or DW_2000Q_6. Note that these names could change; therefore, see the D-Wave dashboard to get the solver name:
    Default client class [skip]: DW_2000Q_6
  4. Run an example (download the example from here):

python -m unittest TestMatrixFactorizationQuantum.py

Note that if the installation is done from the source in step 1, example code in step 4 can be run from the tests directory after cd tests.