qrisp.qaoa.XY_mixer#
- XY_mixer(qv, beta)[source]#
Applies multiple XX+YY gates to
qv
such that each qubit has interacted with it’s neighbour at least once.The XX+YY gate is a two-qubit gate that performs rotations around the XY plane. It is used as a mixer in QAOA to drive transitions between different states.
A defining feature of this mixer is the fact, that it keeps the number of ones (or equivalently zeros) in the binary representation of the state invariant.
- Parameters:
- qvQuantumVariable
The quantum variable to which the XY gate is applied.
- betafloat or sympy.Symbol
The phase shift value for the XY gate.
- Returns:
- qvQuantumVariable
The quantum variable after applying the XY gate.