Skip to content

Spatial

Location

Location(labels, scales, parent=None)

Bases: SpatialModulation

Source code in src/bloqade/builder/spatial.py
@beartype
def __init__(
    self,
    labels: List[int],
    scales: List[ScalarType],
    parent: Optional[Builder] = None,
) -> None:
    from bloqade.ir.scalar import cast
    from bloqade.ir.control.field import Location

    super().__init__(parent)
    self._scaled_locations = {
        Location(label): cast(scale) for label, scale in zip(labels, scales)
    }

Uniform

Uniform(parent=None)

Bases: SpatialModulation

The node specify a uniform spacial modulation. Which is ready to apply waveform (See Waveform for available waveform options)

Examples:

- To hit this node from the start node:

>>> reg = bloqade.start.add_position([(0,0),(1,1),(2,2),(3,3)])
>>> loc = reg.rydberg.detuning.uniform

- Apply Linear waveform:

>>> wv = bloqade.ir.Linear(start=0,stop=1,duration=0.5)
>>> reg = bloqade.start.add_position([(0,0),(1,1),(2,2),(3,3)])
>>> loc = reg.rydberg.detuning.uniform.apply(wv)
Source code in src/bloqade/builder/base.py
def __init__(
    self,
    parent: Optional["Builder"] = None,
) -> None:
    self.__parent__ = parent