cirq.contrib.acquaintance.GreedyExecutionStrategy

A greedy execution strategy.

Inherits From: ExecutionStrategy

When an acquaintance opportunity is reached, all gates acting on those qubits in any order are inserted.

gates The gates to insert.
initial_mapping The initial mapping of qubits to logical indices.
device The device upon which to execute the strategy.

NotImplementedError If not all gates are of the same arity.

device The device for which the executed acquaintance strategy should be valid.
initial_mapping The initial mapping of logical indices to qubits.

Methods

canonicalize_gates

View source

Canonicalizes a set of gates by the qubits they act on.

Takes a set of gates specified by ordered sequences of logical indices, and groups those that act on the same qubits regardless of order.

get_operations

View source

Gets the logical operations to apply to qubits.

__call__

View source

Returns the final mapping of logical indices to qubits after executing an acquaintance strategy.

keep_acquaintance False