Cirq
Cirq copied to clipboard
[XEB] random_quantum_circuit_generation assumes neighboring GridQubits are connected
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
Discussed on Cirq Cynque:
- it sounds like the best place for the responsibility to store the adjacency information would be in
Device
(maybe within aDeviceTopology
class)
Yes, we need to store the adjacency information and update the API of the random_quantum_circuit_generation function to take the adjacency information
@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.
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