cirq.contrib.acquaintance.gates.acquaint_and_shift
Acquaints and shifts a pair of lists of qubits.
cirq.contrib.acquaintance.gates.acquaint_and_shift(
parts: Tuple[List['cirq.Qid'], List['cirq.Qid']],
layers: cirq.contrib.acquaintance.gates.Layers
,
acquaintance_size: Optional[int],
swap_gate: 'cirq.Gate',
mapping: Dict[cirq.Qid
, int]
)
The first part is
acquainted with every qubit individually in the second part, and vice
versa. Operations are grouped into several layers:
* prior_interstitial: The first layer of acquaintance gates.
* prior: The combination of acquaintance gates and swaps that acquaints
the inner halves.
* intra: The shift gate.
* post: The combination of acquaintance gates and swaps that acquaints
the outer halves.
* posterior_interstitial: The last layer of acquaintance gates.
Args |
parts
|
The two lists of qubits to acquaint.
|
layers
|
The layers to put gates into.
|
acquaintance_size
|
The number of qubits to acquaint at a time. If None,
after each pair of parts is shifted the union thereof is
acquainted.
|
swap_gate
|
The gate used to swap logical indices.
|
mapping
|
The mapping from qubits to logical indices. Used to keep track
of the effect of inside-acquainting swaps.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]