# Path: openfermioncirq/gates/common_gates.py
# class FSwapPowGate(cirq.EigenGate, cirq.InterchangeableQubitsGate,
#                    cirq.TwoQubitGate):
# class XXYYPowGate(cirq.EigenGate, cirq.InterchangeableQubitsGate,
#                   cirq.TwoQubitGate):
# class YXXYPowGate(cirq.EigenGate, cirq.TwoQubitGate):
#     def num_qubits(self):
#     def _eigen_components(self):
#     def _apply_unitary_(self,
#                         args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
#     def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
#                               ) -> cirq.CircuitDiagramInfo:
#     def __str__(self) -> str:
#     def __repr__(self) -> str:
#     def __init__(self, *args, **kwargs):
#     def num_qubits(self):
#     def _eigen_components(self):
#     def _apply_unitary_(self,
#                         args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
#     def _decompose_(self, qubits):
#     def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
#                               ) -> cirq.CircuitDiagramInfo:
#     def __repr__(self):
#     def __init__(self, *args, **kwargs):
#     def num_qubits(self):
#     def _eigen_components(self):
#     def _apply_unitary_(self,
#                         args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
#     def _decompose_(self, qubits):
#     def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
#                               ) -> cirq.CircuitDiagramInfo:
#     def __repr__(self):
# def Rxxyy(rads: float) -> cirq.ISwapPowGate:
# def Ryxxy(rads: float) -> cirq.PhasedISwapPowGate:
# def Rzz(rads: float) -> cirq.ZZPowGate:
# def rot11(rads: float) -> cirq.CZPowGate:
# FSWAP = FSwapPowGate()
#     XXYY = XXYYPowGate()
#     YXXY = YXXYPowGate()


from typing import Optional
from openfermioncirq.gates import common_gates
import warnings
import numpy as np
import cirq
import deprecation
        # Note: Clifford optimization would merge this CZ into the CCZ decomp.
        yield cirq.CZ(control, b)**(-self.exponent / 2)
        yield cirq.H(a)
        yield cirq.CNOT(a, b)

    def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
                               ) -> cirq.CircuitDiagramInfo:
        return cirq.CircuitDiagramInfo(wire_symbols=('@', 'XXYY', 'XXYY'),
                                       exponent=self._diagram_exponent(args))

    def __repr__(self):
        if self.exponent == 1:
            return 'CXXYY'
        return 'CXXYY**{!r}'.format(self.exponent)


class CYXXYPowGate(cirq.EigenGate, cirq.ThreeQubitGate):
    """Controlled YX - XY interaction."""

    @deprecation.deprecated(
        deprecated_in='v0.4.0',
        removed_in='v0.5.0',
        details=('Use cirq.ControlledGate and cirq.PhasedISwapPowGate, '
                 'instead.'))
    def __init__(self, *args, **kwargs):
        super(CYXXYPowGate, self).__init__(*args, **kwargs)

    def _apply_unitary_(self,
                        args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
        return cirq.apply_unitary(cirq.ControlledGate(

# Path: openfermioncirq/gates/common_gates.py
# class FSwapPowGate(cirq.EigenGate, cirq.InterchangeableQubitsGate,
#                    cirq.TwoQubitGate):
# class XXYYPowGate(cirq.EigenGate, cirq.InterchangeableQubitsGate,
#                   cirq.TwoQubitGate):
# class YXXYPowGate(cirq.EigenGate, cirq.TwoQubitGate):
#     def num_qubits(self):
#     def _eigen_components(self):
#     def _apply_unitary_(self,
#                         args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
#     def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
#                               ) -> cirq.CircuitDiagramInfo:
#     def __str__(self) -> str:
#     def __repr__(self) -> str:
#     def __init__(self, *args, **kwargs):
#     def num_qubits(self):
#     def _eigen_components(self):
#     def _apply_unitary_(self,
#                         args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
#     def _decompose_(self, qubits):
#     def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
#                               ) -> cirq.CircuitDiagramInfo:
#     def __repr__(self):
#     def __init__(self, *args, **kwargs):
#     def num_qubits(self):
#     def _eigen_components(self):
#     def _apply_unitary_(self,
#                         args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
#     def _decompose_(self, qubits):
#     def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
#                               ) -> cirq.CircuitDiagramInfo:
#     def __repr__(self):
# def Rxxyy(rads: float) -> cirq.ISwapPowGate:
# def Ryxxy(rads: float) -> cirq.PhasedISwapPowGate:
# def Rzz(rads: float) -> cirq.ZZPowGate:
# def rot11(rads: float) -> cirq.CZPowGate:
# FSWAP = FSwapPowGate()
#     XXYY = XXYYPowGate()
#     YXXY = YXXYPowGate()


# Path: openfermioncirq/gates/three_qubit_gates.py
from typing import Optional
from openfermioncirq.gates import common_gates
import warnings
import numpy as np
import cirq
import deprecation

        # Note: Clifford optimization would merge this CZ into the CCZ decomp.
        yield cirq.CZ(control, b)**(-self.exponent / 2)
        yield cirq.H(a)
        yield cirq.CNOT(a, b)

    def _circuit_diagram_info_(self, args: cirq.CircuitDiagramInfoArgs
                               ) -> cirq.CircuitDiagramInfo:
        return cirq.CircuitDiagramInfo(wire_symbols=('@', 'XXYY', 'XXYY'),
                                       exponent=self._diagram_exponent(args))

    def __repr__(self):
        if self.exponent == 1:
            return 'CXXYY'
        return 'CXXYY**{!r}'.format(self.exponent)


class CYXXYPowGate(cirq.EigenGate, cirq.ThreeQubitGate):
    """Controlled YX - XY interaction."""

    @deprecation.deprecated(
        deprecated_in='v0.4.0',
        removed_in='v0.5.0',
        details=('Use cirq.ControlledGate and cirq.PhasedISwapPowGate, '
                 'instead.'))
    def __init__(self, *args, **kwargs):
        super(CYXXYPowGate, self).__init__(*args, **kwargs)

    def _apply_unitary_(self,
                        args: cirq.ApplyUnitaryArgs) -> Optional[np.ndarray]:
        return cirq.apply_unitary(cirq.ControlledGate(

            common_gates.YXXY**self.exponent),