View source on GitHub |
A 2-qubit gate compiler based on precomputing/tabulating gate products.
cirq.TwoQubitGateTabulation(
base_gate: np.ndarray,
kak_vecs: np.ndarray,
single_qubit_gates: Sequence[Sequence[_SingleQubitGatePair]],
max_expected_infidelity: float,
summary: str,
missed_points: Tuple[np.ndarray, ...]
)
Attributes | |
---|---|
base_gate
|
Dataclass field |
kak_vecs
|
Dataclass field |
single_qubit_gates
|
Dataclass field |
max_expected_infidelity
|
Dataclass field |
summary
|
Dataclass field |
missed_points
|
Dataclass field |
Methods
compile_two_qubit_gate
compile_two_qubit_gate(
unitary: np.ndarray
) -> cirq.TwoQubitGateTabulationResult
Compute single qubit gates required to compile a desired unitary.
Given a desired unitary U, this computes the sequence of 1-local gates \(k_j\) such that the product
\(k_{n-1} A k_{n-2} A ... k_1 A k_0\)
is close to U. Here A is the base_gate of the tabulation.
Args | |
---|---|
unitary
|
Unitary (U above) to compile. |
Returns | |
---|---|
A TwoQubitGateTabulationResult object encoding the required local unitaries and resulting product above. |
__eq__
__eq__(
other
)
Return self==value.