QuEraComputing / UnitDiskMapping.jl

Reduce several arbitrary-connectivity optimization problems into maximum independent set problems on a grid
https://github.com/QuEraComputing/UnitDiskMapping.jl
Other
16 stars 3 forks source link

lines field in unweighted mappings #45

Open simonenotarnicola opened 1 year ago

simonenotarnicola commented 1 year ago

Let's suppose I define the peterson graph, then its unweighted mapping unweight_res (as in the example notebook). How should the field unweighted_res.lines be interpreted? For example: UnitDiskMapping.CopyLine 10: vslot → [1:1,1], hslot → [1,1:6] 10 is the label of the vertex in the original graph, but how should [1:1,1] and [1,1:6] be interpreted?

GiggleLiu commented 1 year ago

The meaning of CopyLine is explained here: https://github.com/QuEraComputing/UnitDiskMapping.jl/blob/e5bac7dcd1969856615e8976f1c42c5b03fc9c63/src/copyline.jl#L1

A copy line is not a true line, it is two segments forming the "|-" shape. So

simonenotarnicola commented 1 year ago

thank you. so is there no way to connect the lines coordinates to the coordinates of the vertices in the mapped graph?

GiggleLiu commented 1 year ago

thank you. so is there no way to connect the lines coordinates to the coordinates of the vertices in the mapped graph?

The line has been transformed by other gadgets in the mapped graph. The vertices in the mapped graph does not correspond to any line since they may have multiple sources.

simonenotarnicola commented 1 year ago

there is no way to reverse the transformation via the mapping_history? what do the numbers in each element of the mapping history represent?