Skip to main content

OperatorPermute

Represents a permutation operator that rearranges or transforms qubit states. Create instances using factory functions like Flip(), FlipAll(), Reflect(), or Translate().

Factories

Flip(const List<integer> sites) -> OperatorPermute

Creates a spin-1/2 OperatorPermute that flips spins at specified sites.

Parameters

  • sites: Vector of site indices where spins are flipped.

Flip(integer site) -> OperatorPermute

Creates a spin-1/2 OperatorPermute that flips the spin at a single site.

Parameters

  • site: The site index where the spin is flipped.

FlipAll() -> OperatorPermute

Creates a spin-1/2 OperatorPermute that flips all spins.

Permute(const List<integer> permutation, const List<integer> sites) -> OperatorPermute

Creates a spin-1/2 OperatorPermute that permutes spins according to a specified permutation.

Parameters

  • permutation: Vector defining the permutation of spins (destination indices).
  • sites: Vector of site indices where the permutation is applied.

Reflect() -> OperatorPermute

Creates a spin-1/2 OperatorPermute that reflects all spins about the center.

Translate(integer shift) -> OperatorPermute

Creates a spin-1/2 OperatorPermute that translates spins by a specified shift.

Parameters

  • shift: Number of sites by which the spins are shifted (default: 1).

Constructors

OperatorPermute(const OperatorPermute other) -> OperatorPermute

Copy constructor for OperatorPermute.

Parameters

Symbols

NameDescription
=Assignment operator for OperatorPermute.