fastdla.generators.spin_chain.parity_reflection
- fastdla.generators.spin_chain.parity_reflection(num_spins, reflect_about=None, npmod=np)
Return a function that applies a parity reflection to states.
Parity reflection is uniquely defined under open boundary conditions, but there is a freedom to choose the reflection point for periodic boundary conditions. Spins are indexed from right to left.
- Parameters:
num_spins (
int) – Number of spins.reflect_about (
Union[int,tuple[int,int],None]) – If an integer n, perform the parity reflection that fixes the nth spin. If a tuple of contiguous integers, perform the reflection about the link between the two spins.
- Return type:
tuple[Callable[[numpy.ndarray],numpy.ndarray],int]