Skip to main content

ZZNNN

ZZNNN(const List<integer> sites) -> OperatorNamed

Returns a spin-1/2 OperatorNamed for isitesZiZi+2 \sum_{i \in \text{sites}} Z_i \otimes Z_{i+2} operator.

Parameters

  • sites: Vector of site indices where the operator acts (minimum 3 sites).

Example

var zznnn_s = ZZNNN([0, 1, 2])     //  use brackets (vector format)  
var zznnn_m = ZZNNN([0, 1, 2, 3, 4])
// ZZNNN(0, 1, 2) would be INVALID - missing brackets