A containerized SQA optimizer from http://doi.org/10.5905/ethz-1007-127 with Python support.
569
The SiQuAn library provides a fast implementation for solving spin glasses (z-Operators only) with higher order z-Interactions. The original implementation can be found here: http://doi.org/10.5905/ethz-1007-127
The container includes python bindings. We can start the Python version with:
docker run -it --entrypoint python siquan:latest
In the interactive Python shell we can use the interface to the C++ solver with the following code snippet:
import siquan
dtsqa = siquan.DTSQA()
# possibility to set various parameters
dtsqa.setHSchedule("[10,iF,0]")
# first param: problem description
# second param: number of qubits
resultDict = dtsqa.minimize(
[(1,[0]), (1.5, [0,1]), (-1., [1,2,3])],
4)
To run the binary executable, a problem file needs to be supplied. We can mount a folder to the container. It is assumed that this folder contains a input.txt file that describes the problem.
docker run \
--mount type=bind,source=/path/to/problem/,target=/siquan/input \
siquan:1.0
Further possible parameters and their default values are:
The schedule can be set differently (p linearly evolves from 0 to 1):
The first line of the input file contains metadata.
# num_variables num_interactions
A sample input.txt file should look like:
# 3 4
0 -10
0 1 -1
1 2 -1
0 2 -1
The last element of each line is the coupling, and the previous elements are the spins that are involved in the couplings. The first coupling descripes a local field that acts on spin 0. The other couplings are interactions between pairs of spins.
Content type
Image
Digest
Size
166.3 MB
Last updated
over 5 years ago
docker pull herrd1/siquan