ó
    Óz	i€  ã                   óN   • S r SSKrSSKJr  SSKJr  S\R                  S\4S jrg)aÑ  
Synthesis of an n-qubit circuit containing only CZ gates for
linear nearest neighbor (LNN) connectivity, using CX and phase (S, Sdg or Z) gates.
The two-qubit depth of the circuit is bounded by 2*n+2.
This algorithm reverts the order of qubits.

References:
    [1]: Dmitri Maslov, Martin Roetteler,
         Shorter stabilizer circuits via Bruhat decomposition and quantum circuit transformations,
         `arXiv:1705.09176 <https://arxiv.org/abs/1705.09176>`_.
é    N)ÚQuantumCircuit)Úsynth_cz_depth_line_mrÚmatÚreturnc                 ód   • [         R                  " [        U R                  [        5      5      SS9$ )aï  Synthesis of a CZ circuit for linear nearest neighbor (LNN) connectivity,
based on Maslov and Roetteler.

Note that this method *reverts* the order of qubits in the circuit,
and returns a circuit containing :class:`.CXGate`\s and phase gates
(:class:`.SGate`, :class:`.SdgGate` or :class:`.ZGate`).

Args:
    mat: an upper-diagonal matrix representing the CZ circuit.
        ``mat[i][j]=1 for i<j`` represents a ``cz(i,j)`` gate

Returns:
    A circuit implementation of the CZ circuit of depth :math:`2n+2` for LNN
    connectivity.

References:
    1. Dmitri Maslov, Martin Roetteler,
       *Shorter stabilizer circuits via Bruhat decomposition and quantum circuit transformations*,
       `arXiv:1705.09176 <https://arxiv.org/abs/1705.09176>`_.
T)Úlegacy_qubits)r   Ú_from_circuit_dataÚsynth_cz_depth_line_mr_innerÚastypeÚbool)r   s    Úd/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/synthesis/linear_phase/cz_depth_lnn.pyr   r   !   s*   € ô. ×,Ò,Ü$ S§Z¡Z´Ó%5Ó6Àdñð ó    )	Ú__doc__ÚnumpyÚnpÚqiskit.circuitr   Ú)qiskit._accelerate.synthesis.linear_phaser   r
   Úndarray© r   r   Ú<module>r      s.   ðñ
ó Ý )õð
 §
¡
ð ¨~õ r   