ó
    Óz	is  ã                   óô   • S r SSKJrJr  SSKrSSKJr  SSKJ	r	  S\\	R                     S\\	R                     4S jrS\\	R                     S\\	R                     4S	 jrS
\\\4   S\	R                  4S jrg)aN  
A collection of functions that decide the layout of an output image.
See :py:mod:`~qiskit.visualization.timeline.types` for more info on the required data.

There are 2 types of layout functions in this module.

1. layout.bit_arrange

In this stylesheet entry the input data is a list of `types.Bits` and returns a
sorted list of `types.Bits`.


The function signature of the layout is restricted to:

    ```python

    def my_layout(bits: List[types.Bits]) -> List[types.Bits]:

        # your code here: sort input bits and return list of bits
    ```

2. layout.time_axis_map

In this stylesheet entry the input data is `Tuple[int, int]` that represents horizontal
axis limit of the output image. The layout function returns `types.HorizontalAxis` data
which is consumed by the plotter API to make horizontal axis.

The function signature of the layout is restricted to:

    ```python

    def my_layout(time_window: Tuple[int, int]) -> types.HorizontalAxis:

        # your code here: create and return axis config
    ```

Arbitrary layout function satisfying the above format can be accepted.
é    )ÚListÚTupleN)Úcircuit)ÚtypesÚbitsÚreturnc                 óè   • U  Vs/ s H&  n[        U[        R                  5      (       d  M$  UPM(     snU  Vs/ s H&  n[        U[        R                  5      (       d  M$  UPM(     sn-   $ s  snf s  snf )zŽSort bits by ascending order.

Bit order becomes Q0, Q1, ..., Cl0, Cl1, ...

Args:
    bits: List of bits to sort.

Returns:
    Sorted bits.
©Ú
isinstancer   ÚQubitÚClbit©r   Úxs     Ú_/home/james-whalen/.local/lib/python3.13/site-packages/qiskit/visualization/timeline/layouts.pyÚqreg_creg_ascendingr   :   s\   € ñ Ó<’t!œz¨!¬W¯]©]×;A‘tÑ<Ùó@Úˆaœ: a¬¯©×7‘4ñ@ñ ð ùÒ<ùò @s   …#A*¬A*¸#A/ÁA/c                 ó   • U SSS2    Vs/ s H&  n[        U[        R                  5      (       d  M$  UPM(     snU SSS2    Vs/ s H&  n[        U[        R                  5      (       d  M$  UPM(     sn-   $ s  snf s  snf )z—Sort bits by descending order.

Bit order becomes Q_N, Q_N-1, ..., Cl_N, Cl_N-1, ...

Args:
    bits: List of bits to sort.

Returns:
    Sorted bits.
Néÿÿÿÿr
   r   s     r   Úqreg_creg_descendingr   J   sl   € ð ™D˜b˜D’zÓB’z!¤Z°´7·=±=×%AA‘zÑBØ™˜"˜’:óFÚˆa¤¨A¬w¯}©}×!=‘:ñFñ ð ùÒBùò Fs   ‹#A6²A6Á#A;Á+A;Útime_windowc           	      óô   • U u  p[         R                  " [        US5      US5      nUR                  5       nSnU Vs/ s H  ofS PM     nn[        R
                  " X4[        [        X75      5      US9$ s  snf )zÂLayout function for the horizontal axis formatting.

Generate equispaced 6 horizontal axis ticks.

Args:
    time_window: Left and right edge of this graph.

Returns:
    Axis formatter object.
r   é   zSystem cycle time (dt)z.0f)ÚwindowÚaxis_mapÚlabel)ÚnpÚlinspaceÚmaxÚcopyr   ÚHorizontalAxisÚdictÚzip)r   Út0Út1Úaxis_locÚ
axis_labelr   ÚvalÚformatted_labels           r   Útime_map_in_dtr(   Z   sz   € ð F€Bô {Š{œ3˜r 1›: r¨1Ó-€HØ—‘“€Jð %€Eá/9Ó:ªz¨˜c˜’|©z€OÐ:ä×ÒØˆx¤$¤s¨8Ó'EÓ"FÈeñð ùò ;s   ½A5)Ú__doc__Útypingr   r   Únumpyr   Úqiskitr   Úqiskit.visualization.timeliner   ÚBitsr   r   Úintr   r(   © ó    r   Ú<module>r2      s„   ðñ%÷L Û å Ý /ð˜d 5§:¡:Ñ.ð °4¸¿
¹
Ñ3Cô ð ˜t E§J¡JÑ/ð °D¸¿¹Ñ4Dô ð   c¨3 h¡ð °E×4HÑ4Hõ r1   