UnitDiskMapping.jl icon indicating copy to clipboard operation
UnitDiskMapping.jl copied to clipboard

how to do automatic simplification (tries)?

Open RobG-LHind opened this issue 1 year ago • 3 comments

Hello & thank you for your library on this interesting topic.

sorry, if I may miss the obvious (this is my first contact to julia-libraries).

I created a simple all-to-all graph for 4 qbits:

grafik

as far as I understand, the simplest implementation to a unit-disk graph should be just 2x2 atoms connected to each other (left upper corner). surely the automatic mapping creates something much more complicated (unweighted_res = map_graph(graph; vertex_order=MinhThiTrick());):

grafik

how do I apply simplification on this mapping? i tried unweighted_res2 = map_graph( UnWeighted(), graph, vertex_order=MinhThiTrick(), ruleset=UnitDiskMapping.default_simplifier_ruleset(UnWeighted())) (did not find functions for vertex-reordering).

RobG-LHind avatar Aug 29 '24 14:08 RobG-LHind

The reduction in this package is a generic one. Although the method claims to be "optimal up to a constant factor", which can be far from the optimal.

Post-processing based on the mapped graph may help. However, it is not considered a lot in this package.

GiggleLiu avatar Aug 30 '24 09:08 GiggleLiu

Thank you @GiggleLiu for your quick response. Do I understand you right, that this was the right approach:

unweighted_res2 = map_graph( UnWeighted(), graph, vertex_order=MinhThiTrick(), ruleset=UnitDiskMapping.default_simplifier_ruleset(UnWeighted()))

and that those rulesets (and maybe added rulesets by me) are working on the grid-(string-)representation (local?)?

is there / do you have an example of using methods of simplifiers.jl on a grid > (4,3) (as in tests)?

RobG-LHind avatar Aug 30 '24 10:08 RobG-LHind

Thank you @GiggleLiu for your quick response. Do I understand you right, that this was the right approach:

unweighted_res2 = map_graph( UnWeighted(), graph, vertex_order=MinhThiTrick(), ruleset=UnitDiskMapping.default_simplifier_ruleset(UnWeighted()))

and that those rulesets (and maybe added rulesets by me) are working on the grid-(string-)representation (local?)?

is there / do you have an example of using methods of simplifiers.jl on a grid > (4,3) (as in tests)?

You are right. The simplification rules will be applied repeatedly and locally on the grid. Currently, only the rule of removing dangling edges are considered in the package. I think the grid size is not an issue.

Here is an example of calling simplifier explicitly: https://github.com/QuEraComputing/UnitDiskMapping.jl/blob/4ef1965cb8679cc9bdfbe264fa17744e178345e8/test/mapping.jl#L40

GiggleLiu avatar Aug 31 '24 00:08 GiggleLiu