written by Nicholas Chancellor
Based on the work in Nicholas Chancellor 2019 Quantum Sci. Technol. 4 045004 https://doi.org/10.1088/2058-9565/ab33c2
feel free to resuse/modify but please attribute the source and cite the paper in any published work


This folder contains an easy utility for creating the domain wall encoding described in 'Domain wall encoding of integer variables for quantum annealing and QAOA', it also contains all the numberic code for producing the data and data plots from that paper. All code was written in Python 3.5, but may also be Python 2 compatible (not tested). The files contained in this directory are as follow:

ez_domain_wall.py- A python module designed to allow integer problems to easily be converted to a domain wall encoding, the primary function in this module is 'make_domain_wall_encoding', which creates the encoding from a list of variable lengths, vectors of single variable potentials, and matricies listing pairwise interactions between different values of terms.

ez_dw_examples.ipynb- A jupyter notbook which gives a few examples of how to use 'ez_domain_wall.py'

domain_wall_and_one_hot_encode.py- Primary module of functions used to produce the data for the paper, included for reproducability purposes

*.npy- data files used in the paper, * is a descriptive name of which data it is

script_*.py- scripts to produce data from the paper, included for reproducibility purposes, * is a descriptive name of what kind of data is produced
