quilc
quilc copied to clipboard
Add a simple addresser as a reference
In order to support possible future work with respect to the quilc addresser, it would be nice if we had a simple reference implementation. As described in https://github.com/quil-lang/quilc/blob/master/src/addresser/README.md , the main things expected from an addresser are
- cost heuristics, to e.g. assign a "cost" to a logical schedule
- search heuristics, to e.g. control swap placement
and that these can be implemented via appropriately defined methods.
As far as what constitutes a "simple" scheme, perhaps something which has the effect of placing native gates via conjugations by swaps, e.g. to address CZ 0 2 on a chip with topology 0-1-2, we generate code like
SWAP 0 1
CZ 1 2
SWAP 0 1
However, some investigation would be required to decide whether this actually is the "simplest" from an implementor's point of view (i.e. with respect to the expectations described in the addresser README).
Good idea. Also, there are “ladder SWAP” constructors already written that would almost certainly make this the simplest option to implement.