Processing math: 100%

qml.liealg.concurrence_involution

concurrence_involution(op)[source]

The Concurrence Canonical Decomposition Θ(g)=gT as a Cartan involution function. It is of type AI.

This is defined in quant-ph/0701193. For Pauli words and sentences, it comes down to counting Pauli-Y operators.

Parameters

op (Union[PauliSentence, np.ndarray, Operator]) – Input operator

Returns

Boolean output True or False for odd (k) and even parity subspace (m), respectively

Return type

bool

See also

cartan_decomp()

Example

>>> from pennylane import X, Y, Z
>>> from pennylane.liealg import concurrence_involution
>>> ops = [X(0), X(0) @ Y(1), X(0) @ Y(1) @ Z(2), Y(0) @ Y(2)]
>>> [concurrence_involution(op) for op in ops]
[False, True, True, False]

Operators with an odd number of Y operators yield 1, whereas even ones yield 0.

The function also works with dense matrix representations.

>>> ops_m = [qml.matrix(op, wire_order=range(3)) for op in ops]
>>> [even_odd_involution(op_m) for op_m in ops_m]
[False, True, True, False]