Skip to content

statements

fill

fill(
    zone: Grid[Nx, Ny], filled: IList[tuple[int, int], Any]
) -> FilledGrid[Nx, Ny]

Create a FilledGrid by filling specified positions in a grid.

Parameters:

Name Type Description Default
zone Grid[Nx, Ny]

The original grid in which positions will be filled.

required
filled IList[tuple[int, int], Any]

An IList of (x_index, y_index) tuples indicating positions to fill

required

Returns:

Type Description
FilledGrid[Nx, Ny]

A FilledGrid with the specified positions filled.

Source code in src/bloqade/geometry/dialects/filled/_interface.py
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@_wraps(Fill)
def fill(
    zone: grid.Grid[Nx, Ny],
    filled: ilist.IList[tuple[int, int], Any],
) -> FilledGrid[Nx, Ny]:
    """Create a FilledGrid by filling specified positions in a grid.

    Args:
        zone: The original grid in which positions will be filled.
        filled: An IList of (x_index, y_index) tuples indicating positions to fill

    Returns:
        A FilledGrid with the specified positions filled.

    """
    ...

get_parent

get_parent(
    filled_grid: FilledGrid[Nx, Ny],
) -> grid.Grid[Nx, Ny]

Retrieve the parent grid of a FilledGrid.

Parameters:

Name Type Description Default
filled_grid FilledGrid[Nx, Ny]

The FilledGrid whose parent grid is to be retrieved.

required

Returns:

Type Description
Grid[Nx, Ny]

The parent grid of the provided FilledGrid.

Source code in src/bloqade/geometry/dialects/filled/_interface.py
51
52
53
54
55
56
57
58
59
60
61
62
@_wraps(GetParent)
def get_parent(filled_grid: FilledGrid[Nx, Ny]) -> grid.Grid[Nx, Ny]:
    """Retrieve the parent grid of a FilledGrid.

    Args:
        filled_grid: The FilledGrid whose parent grid is to be retrieved.

    Returns:
        The parent grid of the provided FilledGrid.

    """
    ...

vacate

vacate(
    zone: Grid[Nx, Ny],
    vacancies: IList[tuple[int, int], Any],
) -> FilledGrid[Nx, Ny]

Create a FilledGrid by vacating specified positions from a grid.

Parameters:

Name Type Description Default
zone Grid[Nx, Ny]

The original grid from which positions will be vacated.

required
vacancies IList[tuple[int, int], Any]

An IList of (x_index, y_index) tuples indicating positions to vacate

required

Returns:

Type Description
FilledGrid[Nx, Ny]

A FilledGrid with the specified vacancies.

Source code in src/bloqade/geometry/dialects/filled/_interface.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@_wraps(Vacate)
def vacate(
    zone: grid.Grid[Nx, Ny],
    vacancies: ilist.IList[tuple[int, int], Any],
) -> FilledGrid[Nx, Ny]:
    """Create a FilledGrid by vacating specified positions from a grid.

    Args:
        zone: The original grid from which positions will be vacated.
        vacancies: An IList of (x_index, y_index) tuples indicating positions to vacate

    Returns:
        A FilledGrid with the specified vacancies.

    """
    ...