Raw data formatsο
This section briefly discusses the relevant internal data formats. Most of the
source data, namely, instance data and raw QPU logs, are saved in JSON format.
Intermediate computation results are usually stored as comma separated values
(i.e., plain text tables in .csv files).
Problem instancesο
For each problem, we store an original instance data (in π instances/orig
folder) and a respective QUBO formulation (in π instances/QUBO folder).
These two files have the same basename and different suffixes: for example, TSP
instance with TSP1 is represented by two files:
./instances/orig/TSP1_5_pr107.orig.jsonwith original instance data, and./instances/QUBO/TSP1_16_5_pr107.qubo.jsonwith QUBO formulation.
Both files are in the standard JSON
format, which can be parsed by
json package or,
for example, jq command line utility. Besides
jq command, one can use any JSON editor/viewer for visual inspection, one
notable example being the standard JSON viewer built into Firefox browser.
Below we specify the structure of the respective JSON files.
QUBO formulationsο
Filenames: ./instances/QUBO/*.qubo.json*
JSON files corresponding to QUBO formulations have universal format, regardless of the problem type:
Field |
Description |
|
quadratic coefficients matrix |
|
linear coefficients vector |
|
constant (a number) |
|
metadata in subfields: |
β |
a unique instance ID |
β |
|
β |
original instance name (e.g., for TSP β from TSP Lib) |
β |
filename for the original instance |
β |
constant value |
β |
a free-form string comment. |
Note that internally in the code, we assume the following QUBO format:
TSP instances.ο
Filenames: instances/orig/TSP*.orig.json.
TSP instances are generated from the original TSPLIB instances. Namely, in our dataset we have the instances sampled from the following collection of TSPLIB instances:
att48, brazil58, eil101, gr666, hk48, kroA100, kroB100, kroC100, lin105,
pa561.tsp, pr107, pr299, rat575, swiss42, tsp225.
Each original instance file (present in π instances/orig folder) has the
following structure:
Field
Description
Ddistance matrix
descriptionmetadata in subfields:
β
instance_idunique instance ID
β
instance_typevalue
TSPβ
original_instance_namereference to the original instance (from TSPLIB)
β
contentsvalue
Distance matrix D.β
commentsa free-form string comment.
MWC (MaxCut) instances.ο
Filenames: instances/orig/MWC*.json
Field |
Description |
|
a list of node IDs (numbers) |
|
list of tuples (one per edge): |
β (int) |
node id: edge tail |
β (int) |
node id: edge head |
β (float) |
edge weight |
|
metadata in subfields: |
β |
a unique instance ID |
β |
value |
β |
original instance name (N<nodes>E<edges>_ERG_p<P> |
β |
value |
β |
a free-form string comment. |
Note that in the original_instance_name, the parts N and E denote
number of nodes and edges, respectively while p stands for the random graph
model parameter for edge probabilities (in Erdos-Renyi model).
UD-MIS instancesο
Filenames: instances/orig/UDMIS*.json
Field |
Description |
|
nodes in the graph |
β list[int] |
(list of integer labels) |
|
list of edges |
β tuple (int, int) |
(pairs of node labels) |
|
metadata in subfields: |
β |
a unique instance ID |
β |
value |
β |
original instance name (N<nodes>W<width to height>_R<R / size> |
β |
value |
β |
Max x-coordinate of a point (for generation) |
β |
Max y-coordinate of a point (for generation) |
β |
Radius parameter (for generation) |
β |
Points corresponding to vertices: |
β β(node_id)β: (x, y) |
a dict of point coordinates (x,y) keyed by by the respective node ID. |
β |
A free-form string comment. |
QPU run logsο
Raw QPU run logs also constitute JSON files, however, the format is relatively involved, as we tried to preserve as much data from each QPU run as possible. Specific fields from the raw log files that were used in our analysis can be devised from the log parsing source code, namely, the following functions:
Gurobi run logsο
The classical solver outputs and log files are collected in
πΒ run_logs/classic_solutions. Note that besides the summarized csv
solutions data, the intermediate solver outputs are saved into .log files.
Some branch-and-cut data for selected MWC (QUBO) instances are extracted from
the main logfile and placed into πΒ gurobi_MWC_logs to make the
illustrations in the supplementary materials. (See also
run_logs/classic_solutions/gurobi_MWC_logs/format.txt for a few further
notes on the branch-and-cut tree data formats.)
Computed summariesο
Intermediary summary tables in π run_logs folder, including the QPU shots
data in run_logs/*/samples-csv essentially always constitute plain text
tables with comma separated values, which can be easily manipulated with pandas (in Python), dplyr (in R), or basically any spreadsheets software
for quick visual inspection, such as LibreOffice.