from typing import Tuple


def _create_ring_A(n_qubits: int, i_offset: int = 0) -> Tuple[list, list, list]:
    """Generate a ring topology of type A - indicating a ladder-like ordering of the qubits.

    Args:
            n_qubits: The number of qubits composing the ring.
            i_offset: The index offset of the first qubit.
    Returns:
            A tuple with the coupling map, qubit coordinates in the plane (with the first qubit placed
                    at [1, 1]), and a 0-1 pattern array with alternating values for neighboring qubits.
    """
    c_map = []
    q_coordinates = []
    h_z_pat = []
    c_map.extend([[i_offset, i_offset + 1], [i_offset, i_offset + 2]])
    for i in range(i_offset + 1, i_offset + n_qubits - 2):
        c_map.append([i, i + 2])
    c_map.append([i_offset + n_qubits - 2, i_offset + n_qubits - 1])
    h_z_pat.append(0)
    q_coordinates.append([1, 1])
    h_z_ = 1
    for i in range(1, n_qubits - 2, 2):
        h_z_pat.extend([h_z_, h_z_])
        q_coordinates.extend([[2 + int(i / 2), 0], [2 + int(i / 2), 2]])
        h_z_ = 0 if h_z_ == 1 else 1
    h_z_pat.append(h_z_)
    q_coordinates.append([1 + int(n_qubits / 2), 1])
    return c_map, q_coordinates, h_z_pat