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 | |
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 | |
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 | |