LogicalQ.Library.Gates ====================== .. py:module:: LogicalQ.Library.Gates Attributes ---------- .. autoapisummary:: LogicalQ.Library.Gates.UGate LogicalQ.Library.Gates.zzgate LogicalQ.Library.Gates.ZZGate_def LogicalQ.Library.Gates.gates LogicalQ.Library.Gates.clifford_gates LogicalQ.Library.Gates.clifford_gates_1q LogicalQ.Library.Gates.pauli_gates LogicalQ.Library.Gates.gates_1q LogicalQ.Library.Gates.gates_2q LogicalQ.Library.Gates.gate_sets Classes ------- .. autoapisummary:: LogicalQ.Library.Gates.ZZGate Functions --------- .. autoapisummary:: LogicalQ.Library.Gates.string_to_gate_class LogicalQ.Library.Gates.string_to_gate_set LogicalQ.Library.Gates.get_num_params Module Contents --------------- .. py:data:: UGate .. py:class:: ZZGate(label=None) Bases: :py:obj:`qiskit.circuit.library.RZZGate` A parametric 2-qubit :math:`Z \otimes Z` interaction (rotation about ZZ). This gate is symmetric, and is maximally entangling at :math:`\theta = \pi/2`. Can be applied to a :class:`~qiskit.circuit.QuantumCircuit` with the :meth:`~qiskit.circuit.QuantumCircuit.rzz` method. **Circuit Symbol:** .. code-block:: text q_0: ───■──── │zz(θ) q_1: ───■──── **Matrix Representation:** .. math:: \newcommand{\rotationangle}{\frac{\theta}{2}} R_{ZZ}(\theta) = \exp\left(-i \rotationangle Z{\otimes}Z\right) = \begin{pmatrix} e^{-i \rotationangle} & 0 & 0 & 0 \\ 0 & e^{i \rotationangle} & 0 & 0 \\ 0 & 0 & e^{i \rotationangle} & 0 \\ 0 & 0 & 0 & e^{-i \rotationangle} \end{pmatrix} This is a direct sum of RZ rotations, so this gate is equivalent to a uniformly controlled (multiplexed) RZ gate: .. math:: R_{ZZ}(\theta) = \begin{pmatrix} RZ(\theta) & 0 \\ 0 & RZ(-\theta) \end{pmatrix} **Examples:** .. math:: R_{ZZ}(\theta = 0) = I .. math:: R_{ZZ}(\theta = 2\pi) = -I .. math:: R_{ZZ}(\theta = \pi) = - i Z \otimes Z .. math:: R_{ZZ}\left(\theta = \frac{\pi}{2}\right) = \frac{1}{\sqrt{2}} \begin{pmatrix} 1-i & 0 & 0 & 0 \\ 0 & 1+i & 0 & 0 \\ 0 & 0 & 1+i & 0 \\ 0 & 0 & 0 & 1-i \end{pmatrix} .. py:attribute:: _standard_gate :value: None .. py:attribute:: name :value: 'zz' Return the name. .. py:method:: __eq__(other) Two instructions are the same if they have the same name, same dimensions, and same params. :param other: other instruction :type other: instruction :returns: are self and other equal. :rtype: bool .. py:data:: zzgate .. py:data:: ZZGate_def .. py:data:: gates .. py:function:: string_to_gate_class(_gate_string) .. py:data:: clifford_gates .. py:data:: clifford_gates_1q .. py:data:: pauli_gates .. py:data:: gates_1q .. py:data:: gates_2q .. py:data:: gate_sets .. py:function:: string_to_gate_set(_gate_set_string) .. py:function:: get_num_params(gate_class)