Skip to content

Latest commit

 

History

History
65 lines (53 loc) · 2.89 KB

README.md

File metadata and controls

65 lines (53 loc) · 2.89 KB

D-Wave Ising Sample Collector (D-WISC)

The D-WISC toolset is used to collect larger numbers of samples, on the order of millions, from a specific D-Wave QPU. The dwisc.py collection script takes a bqpjson file as input (typically generated by D-WIG) and outputs a solution json document that provides detailing the collected samples. The helper script combis.py can be used to combine many solution documents from repeated runs of dwisc.py.

The remainder of this documentation assumes that,

  1. You have access to a D-Wave QPU
  2. You have installed the dwave-cloud-client
  3. You are using a bash terminal

Basic Usage

The primary entry point of the D-WISC toolset is dwisc.py this script is used to collect samples from a D-Wave QPU. For example, the following command will collect 25000 samples of from the bqpjson file ran1_1.json and send the resulting sample data to standard output,

./dwisc.py -f test/data/ran1_1.json 

Bash stream redirection can be used to save the standard output to a file, for example,

./dwisc.py -f test/data/ran1_1.json > ran1_1_is_1.json

A detailed list of all command line options can be viewed via,

./dwisc.py --help

It is fairly common to combine results from several runs of dwisc.py. If multiple sample files are placed in a directory, combis.py can be used to quickly combine those files and send the resulting sample data to standard output,

./combis.py -sd test/result

Again, bash stream redirection can be used to save the standard output to a file, for example,

./combis.py -sd test/result > result.json

Connecting to a QPU

D-WISC uses the dwave-cloud-client for connecting to the QPU and will use your dwave.conf file for the configuration details. A specific profile can be selected with the command line argument --profile <label>. If no configuration details are found, D-WISC will produce an error.

Solution JSON File

The solution file output by D-WISC is a JSON document with has the following structure,

{
  "collection_start": "<UTC start time of sample collection>",
  "collection_end": "<UTC end time of sample collection>",
  "metadata": {<QPU identification data>},
  "solve_ising_args": {<arguments passed to solve_ising>},
  "timing": {<aggregate QPU timing information>}
  "variable_ids": [<an ordered list of QPU variable ids>],
  "solutions":[
    {
      "solution":[<variable assignments of -1 and 1>],
      "num_occurrences":<int>,
      "energy":<float>
    },
    ...
  ]
}

The metadata and solve_ising_args fields are optional, all other fields are required.

License

D-WISC is provided under a BSD-ish license with a "modifications must be indicated" clause. See the LICENSE.md file for the full text. This package is part of the Hybrid Quantum-Classical Computing suite, known internally as LA-CC-16-032.