Skip to content

Two col zone

get_spec

get_spec(
    num_x: int,
    num_y: int,
    spacing: float = 10.0,
    gate_spacing: float = 2.0,
) -> spec.ArchSpec

Create a static trap spec with a single zone with pairs of traps oriented horizontally.

Parameters:

Name Type Description Default
num_x int

Number of pairs of traps in the x direction.

required
num_y int

Number of pairs of traps in the y direction.

required
spacing float

Spacing between traps in both directions. Default is 10.0.

10.0
gate_spacing float

Spacing between gates. Default is 2.0.

2.0

Returns:

Type Description
ArchSpec

spec.Spec: A specification object containing the layout with a single zone.

Source code in src/bloqade/shuttle/stdlib/layouts/two_col_zone.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
def get_spec(
    num_x: int, num_y: int, spacing: float = 10.0, gate_spacing: float = 2.0
) -> spec.ArchSpec:
    """Create a static trap spec with a single zone with pairs of traps oriented
    horizontally.

    Args:
        num_x (int): Number of pairs of traps in the x direction.
        num_y (int): Number of pairs of traps in the y direction.
        spacing (float): Spacing between traps in both directions. Default is 10.0.
        gate_spacing (float): Spacing between gates. Default is 2.0.

    Returns:
        spec.Spec: A specification object containing the layout with a single zone.

    """
    x_spacing = sum(repeat((gate_spacing, spacing), num_x - 1), ())
    y_spacing = tuple(repeat(spacing, num_y - 1))

    return spec.ArchSpec(
        layout=spec.Layout(
            static_traps={"traps": grid.Grid(x_spacing, y_spacing, 0.0, 0.0)},
            fillable=set(["traps"]),
        )
    )