Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

Document easy way to displays circuits on grids

Open dabacon opened this issue 5 years ago • 5 comments

That would automatically make Foxtail programs compatible with Bristlecone.

dabacon avatar Sep 10 '18 19:09 dabacon

Columns 5 and 6 of bristlecone are equivalent to foxtail, rotated on its side. We could add a function to map a foxtail circuit into those two columns.

maffoo avatar Sep 10 '18 20:09 maffoo

Ah I was thinking about moving the grid of Foxtail, but probably this is a bad idea because there is a nice convention for containing box containing 0,0 as grid point.

dabacon avatar Sep 10 '18 20:09 dabacon

OK so embedding seems wrong but something to convert might be useful.

dabacon avatar Sep 18 '18 16:09 dabacon

I think what is missing here is just a simple method that creates the Callable between cirq.Qid's that is used in Circuit.with_device. Actually I think can just pass lambda x: x+(1,2) to do the appropriate displacement.

Keep this open as it might be nice to add this to doc string for with_device

dabacon avatar May 01 '20 05:05 dabacon

@karlunho

dabacon avatar May 01 '20 05:05 dabacon

Circuit.with_device is now deprecated and replaced by GridDevice and GridDeviceMetadata which consume the device graph. This seems obsolete now so I'll go ahead and close it but please reopen if you think there's stuff that needs to be done.

cc @verult for more context.

tanujkhattar avatar Feb 02 '24 07:02 tanujkhattar