Module: cirq.contrib.acquaintance

Tools for creating and using acquaintance strategies.

Modules

bipartite module

devices module

executor module

gates module

inspection_utils module

mutation_utils module

optimizers module

permutation module

shift module

shift_swap_network module

strategies module: Acquaintance strategies.

testing module

topological_sort module

Classes

class AcquaintanceOperation: Represents an a acquaintance opportunity between a particular set of

class AcquaintanceOpportunityGate: Represents an acquaintance opportunity. An acquaintance opportunity is

class BipartiteGraphType: An enumeration.

class BipartiteSwapNetworkGate: A swap network that acquaints qubits in one half with qubits in the

class CircularShiftGate: Performs a cyclical permutation of the qubits to the left by a specified

class GreedyExecutionStrategy: A greedy execution strategy.

class LinearPermutationGate: A permutation gate that decomposes a given permutation using a linear

class PermutationGate: A permutation gate indicates a change in the mapping from qubits to

class ShiftSwapNetworkGate: A swap network that generalizes the circular shift gate.

class StrategyExecutor: Executes an acquaintance strategy.

class SwapNetworkGate: A single gate representing a generalized swap network.

class SwapPermutationGate: Generic swap gate.

Functions

DECOMPOSE_PERMUTATION_GATES(...)

EXPAND_PERMUTATION_GATES(...)

acquaint(...)

complete_acquaintance_strategy(...): Returns an acquaintance strategy capable of executing a gate corresponding

cubic_acquaintance_strategy(...): Acquaints every triple of qubits.

display_mapping(...): Inserts display gates between moments to indicate the mapping throughout

expose_acquaintance_gates(...): Decomposes any permutation gates that provide acquaintance opportunities

get_acquaintance_size(...): The maximum number of qubits to be acquainted with each other.

get_logical_acquaintance_opportunities(...)

get_logical_operations(...): Gets the logical operations specified by the physical operations and

is_topologically_sorted(...): Whether a given order of operations is consistent with the DAG.

quartic_paired_acquaintance_strategy(...): Acquaintance strategy for pairs of pairs.

random_topological_sort(...)

rectify_acquaintance_strategy(...): Splits moments so that they contain either only acquaintance gates

remove_redundant_acquaintance_opportunities(...): Removes redundant acquaintance opportunities.

replace_acquaintance_with_swap_network(...): Replace every moment containing acquaintance gates (after

return_to_initial_mapping(...)

update_mapping(...): Updates a mapping (in place) from qubits to logical indices according to

uses_consistent_swap_gate(...)

UnconstrainedAcquaintanceDevice