PauliOrderStrategy

class PauliOrderStrategy(value)[source]

Bases: Enum

Enumeration of different Pauli-orderings.

When constructing a Hamiltonian on a colored set of edges, the generated Pauli terms can be ordered in different ways. This order of terms in the Hamiltonian is preserved during its time evolution and, thus, directly impacts the resulting quantum circuit.

Attributes

ColorThenInteraction = 1

This strategy first iterates all edges (sorted by their color value) and then the interactions (sorted as X, Y, Z).

InteractionThenColor = 2

This strategy is the inverse to ColorThenInteraction. It first iterates the interactions (sorted as X, Y, Z) and then all edges (sorted by their color value).

InteractionThenColorZigZag = 3

This strategy is similar to the InteractionThenColor one. However, it alternates between iterating the edges by incrementing and decrementing color values as it jumps from one interaction to the next. For example, if only X and Y interactions are included and three color values are used ({1, 2, 3}), this will result in the following order: ["X on 1", "X on 2", "X on 3", "Y on 3", "Y on 2", "Y on 1"].