Cirq icon indicating copy to clipboard operation
Cirq copied to clipboard

[XEB] random_quantum_circuit_generation assumes neighboring GridQubits are connected

Open mpharrigan opened this issue 3 years ago • 4 comments

The random circuits generated take a list of qubit to implicitly define the device. In particular: it assumes that adjacent GridQubits should be interacted. I don't think this has ever happened, but you can imagine having two neighboring qubits that you don't want to interact; either because you're trying to model a certain circuit topology or if the coupling is physically non-functional between the qubits.

In the first case, you can argue that that is out-of-scope for a GridInteractionLayer and the second case you could argue it's not a big deal since we haven't run into it yet. Wanted to see whether others would see utility in (optionally) taking a graph (list of edges) during circuit generation

mpharrigan avatar Sep 18 '20 22:09 mpharrigan

Discussed on Cirq Cynque:

  • it sounds like the best place for the responsibility to store the adjacency information would be in Device (maybe within a DeviceTopology class)

balopat avatar Oct 14 '20 18:10 balopat

Yes, we need to store the adjacency information and update the API of the random_quantum_circuit_generation function to take the adjacency information

mpharrigan avatar Oct 21 '20 18:10 mpharrigan

@MichaelBroughton Marking this one before-1.0 since it potentially requires Devices changes. Please feel free to change it though if you think it's purely a feature addition.

verult avatar Mar 28 '22 20:03 verult

I think devices now support adjacency information, so that part's fine.

The function in question still needs to learn to consume adjacency information, but that can be a post-1.0 feature addition

mpharrigan avatar Mar 29 '22 00:03 mpharrigan