mindquantum.core.operators.hermitian_conjugated

View Source On Gitee
mindquantum.core.operators.hermitian_conjugated(operator)[source]

Return Hermitian conjugate of FermionOperator or QubitOperator.

Parameters

operator (Union[FermionOperator, QubitOperator, QubitExcitationOperator]) – The input operator.

Returns

operator (Union[FermionOperator, QubitOperator, QubitExcitationOperator]), the hermitian form of the input operator.

Examples

>>> from mindquantum.core.operators import QubitOperator, hermitian_conjugated
>>> q = QubitOperator('X0', {'a' : 2j})
>>> hermitian_conjugated(q)
(-2j)*a [X0]