Open mpharrigan opened 3 years ago
There's also a problem if you are operating on a topology that is a subset of a grid, for example: a line. The random circuit function for cycles divisible by 4 + 1 or 2 may not add any entangling layers.
Options:
The arguments for
random_rotations_between_grid_interaction_layers_circuit
combinesqubits
withpattern: Sequence[GridInteractionLayer]
to figure out what pairs to activate.This assumes that all neighboring GridQubits are able to be activated, which may not always be the case. It also prevents easy adaptability to other topologies or other qubit types. [Granted, this would be a little more work since
GridInteractionLayer
is pretty griddy, but we really only use a containment check so other types ofxxInteractionLayer
s could be introduced]The newer parallel-xeb fidelity code uses a
device_graph
argument where nodes are qubits and edges give couplable pairs. We should modify the code to accept a device graph. This can be done in a backwards compatible way by checking if qubits were passed and usingcirq.contrib.routing.gridqubits_to_graph_device
, which should be made faster and put into regular cirq