# 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
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
"""Common gates that target three qubits."""





def rot111(rads: float) -> cirq.CCZPowGate:
    """Phases the |111> state of three qubits by e^{i rads}."""
    return cirq.CCZ**(rads / np.pi)


class CXXYYPowGate(cirq.EigenGate, cirq.ThreeQubitGate):
    """Controlled XX + YY interaction."""

    @deprecation.deprecated(
        deprecated_in='v0.4.0',
        removed_in='v0.5.0',
        details=('Use cirq.ControlledGate and cirq.ISwapPowGate with '
                 'negated exponent, instead.'))
    def __init__(self, *args, **kwargs):
        super(CXXYYPowGate, 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

#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
"""Common gates that target three qubits."""





def rot111(rads: float) -> cirq.CCZPowGate:
    """Phases the |111> state of three qubits by e^{i rads}."""
    return cirq.CCZ**(rads / np.pi)


class CXXYYPowGate(cirq.EigenGate, cirq.ThreeQubitGate):
    """Controlled XX + YY interaction."""

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

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

            common_gates.XXYY**self.exponent),