Skip to content

Atom arrangement

AtomArrangement

Bases: ProgramStart, TransformTrait

n_atoms property

n_atoms

number of atoms (filled sites) in the register.

n_dims property

n_dims

number of dimensions in the register.

n_sites property

n_sites

number of sites in the register.

n_vacant property

n_vacant

number of vacant sites in the register.

enumerate

enumerate()

enumerate all locations in the register.

Source code in src/bloqade/ir/location/base.py
def enumerate(self) -> Generator[LocationInfo, None, None]:
    """enumerate all locations in the register."""
    raise NotImplementedError

figure

figure(fig_kwargs=None, **assignments)

obtain a figure object from the atom arrangement.

Source code in src/bloqade/ir/location/base.py
def figure(self, fig_kwargs=None, **assignments):
    """obtain a figure object from the atom arrangement."""
    return get_atom_arrangement_figure(self, fig_kwargs, **assignments)

Chain

Chain(L, lattice_spacing=1.0, vertical_chain=False)

Bases: BoundedBravais

Chain lattice.

  • 1D lattice
  • primitive (cell) vector(s)
    • a1 = (1,0).
  • unit cell (1 atom(s))
    • loc (0,0)

Parameters:

Name Type Description Default
L int

number of sites in the chain

required
lattice_spacing (Scalar, Real)

lattice spacing. Defaults to 1.0.

1.0
  • Possible Next: continue with . to see possible next step in auto-prompt supported setting (IPython, IDE ...)
Source code in src/bloqade/ir/location/bravais.py
@beartype
def __init__(
    self, L: int, lattice_spacing: ScalarType = 1.0, vertical_chain: bool = False
):
    self.vertical = vertical_chain
    super().__init__(L, lattice_spacing=lattice_spacing)

Honeycomb

Honeycomb(L, lattice_spacing=1.0)

Bases: BoundedBravais

Honeycomb lattice.

  • 2D lattice
  • primitive (cell) vector(s)
    • a1 = (1, 0)
    • a2 = (½, sqrt(3)/2)
  • unit cell (2 atom(s))
    • loc1 (0, 0)
    • loc2 (½, 1/(2*sqrt(3))

Parameters:

Name Type Description Default
L int

number of sites in linear direction. n_atoms = L * L * 2.

required
lattice_spacing (Scalar, Real)

lattice spacing. Defaults to 1.0.

1.0
  • Possible Next: continue with . to see possible next step in auto-prompt supported setting (IPython, IDE ...)
Source code in src/bloqade/ir/location/bravais.py
@beartype
def __init__(self, L: int, lattice_spacing: ScalarType = 1.0):
    super().__init__(L, L, lattice_spacing=lattice_spacing)

Kagome

Kagome(L, lattice_spacing=1.0)

Bases: BoundedBravais

Kagome lattice.

  • 2D lattice
  • primitive (cell) vector(s)
    • a1 = (1, 0)
    • a2 = (½, sqrt(3)/2)
  • unit cell (3 atom(s))
    • loc1 (0, 0)
    • loc2 (0.5, 0)
    • loc3 (0.25 ,0.25sqrt(3))

Parameters:

Name Type Description Default
L int

number of sites in linear direction. n_atoms = L * L.

required
lattice_spacing (Scalar, Real)

lattice spacing. Defaults to 1.0.

1.0
  • Possible Next: continue with . to see possible next step in auto-prompt supported setting (IPython, IDE ...)
Source code in src/bloqade/ir/location/bravais.py
@beartype
def __init__(self, L: int, lattice_spacing: ScalarType = 1.0):
    super().__init__(L, L, lattice_spacing=lattice_spacing)

Lieb

Lieb(L, lattice_spacing=1.0)

Bases: BoundedBravais

Lieb lattice.

  • 2D lattice
  • primitive (cell) vector(s)
    • a1 = (1, 0)
    • a2 = (0, 1)
  • unit cell (3 atom(s))
    • loc1 (0, 0)
    • loc2 (0.5, 0)
    • loc3 (0 ,0.5)

Parameters:

Name Type Description Default
L int

number of sites in linear direction. n_atoms = L * L.

required
lattice_spacing (Scalar, Real)

lattice spacing. Defaults to 1.0.

1.0
  • Possible Next: continue with . to see possible next step in auto-prompt supported setting (IPython, IDE ...)
Source code in src/bloqade/ir/location/bravais.py
@beartype
def __init__(self, L: int, lattice_spacing: ScalarType = 1.0):
    super().__init__(L, L, lattice_spacing=lattice_spacing)

Rectangular

Rectangular(
    width,
    height,
    lattice_spacing_x=1.0,
    lattice_spacing_y=None,
)

Bases: BoundedBravais

Rectangular lattice.

  • 2D lattice
  • primitive (cell) vector(s)
    • a1 = (1,0)
    • a2 = (0,1)
  • unit cell (1 atom(s))
    • loc (0,0)

Parameters:

Name Type Description Default
width int

number of sites in x direction.

required
height int

number of sites in y direction.

required
lattice_spacing_x (Scalar, Real)

lattice spacing. Defaults to 1.0.

1.0
lattice_spacing_y (Scalar, Real)

lattice spacing in y direction. optional.

None
  • Possible Next: continue with . to see possible next step in auto-prompt supported setting (IPython, IDE ...)
Source code in src/bloqade/ir/location/bravais.py
@beartype
def __init__(
    self,
    width: int,
    height: int,
    lattice_spacing_x: ScalarType = 1.0,
    lattice_spacing_y: Optional[ScalarType] = None,
):
    super().__init__(width, height, lattice_spacing=lattice_spacing_x)

    if lattice_spacing_y is None:
        self.ratio = cast(1.0) / cast(lattice_spacing_x)
    else:
        self.ratio = cast(lattice_spacing_y) / cast(lattice_spacing_x)

    super().__init__(width, height, lattice_spacing=lattice_spacing_x)

Square

Square(L, lattice_spacing=1.0)

Bases: BoundedBravais

Square lattice.

  • 2D lattice
  • primitive (cell) vector(s)
    • a1 = (1,0)
    • a2 = (0,1)
  • unit cell (1 atom(s))
    • loc (0,0)

Parameters:

Name Type Description Default
L int

number of sites in linear direction. n_atoms = L * L.

required
lattice_spacing (Scalar, Real)

lattice spacing. Defaults to 1.0.

1.0
  • Possible Next: continue with . to see possible next step in auto-prompt supported setting (IPython, IDE ...)
Source code in src/bloqade/ir/location/bravais.py
@beartype
def __init__(self, L: int, lattice_spacing: ScalarType = 1.0):
    super().__init__(L, L, lattice_spacing=lattice_spacing)

Triangular

Triangular(L, lattice_spacing=1.0)

Bases: BoundedBravais

Triangular lattice.

  • 2D lattice
  • primitive (cell) vector(s)
    • a1 = (1, 0)
    • a2 = (½, sqrt(3)/2)
  • unit cell (1 atom(s))
    • loc (0, 0)

Parameters:

Name Type Description Default
L int

number of sites in linear direction. n_atoms = L * L.

required
lattice_spacing (Scalar, Real)

lattice spacing. Defaults to 1.0.

1.0
  • Possible Next: continue with . to see possible next step in auto-prompt supported setting (IPython, IDE ...)
Source code in src/bloqade/ir/location/bravais.py
@beartype
def __init__(self, L: int, lattice_spacing: ScalarType = 1.0):
    super().__init__(L, L, lattice_spacing=lattice_spacing)