§
    º³ÙgË  ã                   óJ   — d Z ddlmZ ddlmZ ddlmZ ddlmZ dedefd„Z	d	S )
zK
Circuit synthesis for the CNOTDihedral class for all-to-all connectivity.
é    )ÚQuantumCircuit)ÚCNOTDihedral)Úsynth_cnotdihedral_two_qubits)Úsynth_cnotdihedral_generalÚelemÚreturnc                 óX   — | j         }|dk     rt          | ¦  «        S t          | ¦  «        S )a{  Decompose a :class:`.CNOTDihedral` element into a :class:`.QuantumCircuit`.

    For :math:`N \leq 2` qubits this is based on optimal CX-cost decomposition from reference [1].
    For :math:`N > 2` qubits this is done using the general non-optimal compilation
    routine from reference [2].

    Args:
        elem: A :class:`.CNOTDihedral` element.

    Returns:
        A circuit implementation of the :class:`.CNOTDihedral` element.

    References:
        1. Shelly Garion and Andrew W. Cross, *Synthesis of CNOT-Dihedral circuits
           with optimal number of two qubit gates*, `Quantum 4(369), 2020
           <https://quantum-journal.org/papers/q-2020-12-07-369/>`_
        2. Andrew W. Cross, Easwar Magesan, Lev S. Bishop, John A. Smolin and Jay M. Gambetta,
           *Scalable randomized benchmarking of non-Clifford gates*,
           npj Quantum Inf 2, 16012 (2016).
    é   )Ú
num_qubitsr   r   )r   r   s     úo/granary/edev/quantum/lib/python3.11/site-packages/qiskit/synthesis/cnotdihedral/cnotdihedral_decompose_full.pyÚsynth_cnotdihedral_fullr      s0   € ð, ”€Jà�A‚~€~Ý,¨TÑ2Ô2Ð2å% dÑ+Ô+Ð+ó    N)
Ú__doc__Úqiskit.circuitr   Úqiskit.quantum_infor   Ú?qiskit.synthesis.cnotdihedral.cnotdihedral_decompose_two_qubitsr   Ú<qiskit.synthesis.cnotdihedral.cnotdihedral_decompose_generalr   r   © r   r   ú<module>r      s”   ððð ð *Ð )Ð )Ð )Ð )Ð )Ø ,Ð ,Ð ,Ð ,Ð ,Ð ,ðð ð ð ð ð ð dÐ cÐ cÐ cÐ cÐ cð, ,ð ,°>ð ,ð ,ð ,ð ,ð ,ð ,r   