コード例 #1
0
ファイル: optimize_for_sycamore.py プロジェクト: daxfohl/Cirq
def _get_xmon_optimizers_part_cz(
    tolerance: float, tabulation: Optional[cirq.TwoQubitGateTabulation]
) -> List[Callable[[cirq.Circuit], None]]:
    if tabulation is not None:
        # coverage: ignore
        raise ValueError("Gate tabulation not supported for xmon")
    return [
        convert_to_xmon_gates.ConvertToXmonGates().optimize_circuit,
    ]
コード例 #2
0
ファイル: optimize_for_sycamore.py プロジェクト: ybc1991/Cirq
def _get_xmon_optimizers_part_cz(
    tolerance: float, tabulation: Optional[GateTabulation]
) -> List[Callable[[cirq.Circuit], None]]:
    if tabulation is not None:
        # coverage: ignore
        raise ValueError("Gate tabulation not supported for xmon")
    return [
        convert_to_xmon_gates.ConvertToXmonGates().optimize_circuit,
        cirq.MergeInteractions(tolerance=tolerance,
                               allow_partial_czs=True).optimize_circuit,
        lambda c: cirq.merge_single_qubit_gates_into_phxz(c, tolerance),
        *_get_common_cleanup_optimizers(tolerance=tolerance),
    ]
コード例 #3
0
ファイル: xmon_device.py プロジェクト: kevinsung/Cirq
 def decompose_operation(self, operation: cirq.Operation) -> cirq.OP_TREE:
     return convert_to_xmon_gates.ConvertToXmonGates().convert(operation)