cirq.AnnealSequenceSearchStrategy

class cirq.AnnealSequenceSearchStrategy(trace_func: Callable[[List[List[cirq.devices.grid_qubit.GridQubit]], float, float, float, bool], NoneType] = None, seed: int = None)[source]

Linearized sequence search using simulated annealing method.

TODO: This line search strategy is still work in progress and requires efficiency improvements.

__init__(trace_func: Callable[[List[List[cirq.devices.grid_qubit.GridQubit]], float, float, float, bool], NoneType] = None, seed: int = None) → None[source]

Linearized sequence search using simulated annealing method.

Parameters:
  • trace_func – Optional callable which will be called for each simulated annealing step with arguments: solution candidate (list of linear sequences on the chip), current temperature (float), candidate cost (float), probability of accepting candidate (float), and acceptance decision (boolean).
  • seed – Optional seed value for random number generator.
Returns:

List of linear sequences on the chip found by simulated annealing method.

Methods

place_line(device, length) Runs line sequence search.