qml.labs.phox.create_lattice_gates¶
- create_lattice_gates(rows, cols, distance=1, max_weight=2, periodic=False)[source]¶
Generates gates based on nearest-neighbor interactions on a 2D lattice.
- Parameters:
rows (int) – Lattice height.
cols (int) – Lattice width.
distance (int) – Maximum graph distance to consider for interactions.
max_weight (int) – Maximum weight of the generators.
periodic (bool) – Whether to use periodic boundary conditions.
- Returns:
Gate structure.
- Return type:
dict[int, list[list[int]]]
code/api/api/pennylane.labs.phox.create_lattice_gates
Download Python script
Download Notebook
View on GitHub