mindquantum.core.operators.hermitian_conjugated

查看源文件
mindquantum.core.operators.hermitian_conjugated(operator)[源代码]

返回FermionOperator或QubitOperator的厄米共轭。

参数:
  • operator (Union[FermionOperator, QubitOperator, QubitExcitationOperator]) - 输入的算子。

返回:

operator(Union[FermionOperator, QubitOperator, QubitExcitationOperator]), 输入算子的厄米共轭。

样例:

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