quil-lang / quilc

The optimizing Quil compiler.
Apache License 2.0
460 stars 72 forks source link

Don't make 16QMUX so special #134

Open stylewarning opened 5 years ago

stylewarning commented 5 years ago

16QMUX chip was made special as a quick fix to adjust the numbering scheme. Instead we should modify build-nq-trivalent-chip to have the correct numbering, then implement build-16qmux out of that.

notmgsk commented 5 years ago

Would this be enough to satisfy this issue

-     ("16QMUX" . ,(quil::build-16QMUX-chip))
+     ("16QMUX" . ,(quil::build-nQ-trivalent-chip 1 1 8 4))
      ("bristlecone" . ,(quil::build-bristlecone-chip))
ecpeterson commented 5 years ago

No: the qubits in build-16QMUX-chip follow a different indexing convention than those in build-nQ-trivalent-chip. I think an ideal solution would take width and height options that describe how many octagons there are tiled in each direction. Someone will need to talk to internal sources (and so maybe this isn't a "good first issue") to figure out what the octagon numbering conventions are when there are more than 3 of them.