https://github.com/lanl-ansi/dwisc
D-Wave Ising Sample Collector (D-WISC)
https://github.com/lanl-ansi/dwisc
aqc d-wave ising-model quantum-annealing sampler
Last synced: 20 days ago
JSON representation
D-Wave Ising Sample Collector (D-WISC)
- Host: GitHub
- URL: https://github.com/lanl-ansi/dwisc
- Owner: lanl-ansi
- License: other
- Created: 2017-11-05T17:22:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-23T00:38:14.000Z (over 1 year ago)
- Last Synced: 2025-04-05T11:22:55.323Z (about 1 month ago)
- Topics: aqc, d-wave, ising-model, quantum-annealing, sampler
- Language: Python
- Homepage:
- Size: 127 KB
- Stars: 4
- Watchers: 6
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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](http://bqpjson.readthedocs.io/en/stable/) file as input (typically generated by [D-WIG](https://github.com/lanl-ansi/dwig)) 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
2. 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 `. 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": "",
"collection_end": "",
"metadata": {},
"solve_ising_args": {},
"timing": {}
"variable_ids": [],
"solutions":[
{
"solution":[],
"num_occurrences":,
"energy":
},
...
]
}
```
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.