qml.qchem._qubit_operators_equivalent

_qubit_operators_equivalent(openfermion_qubit_operator, pennylane_qubit_operator)[source]

Checks equivalence between OpenFermion QubitOperator and Pennylane VQE Hamiltonian (Tensor product of Pauli matrices).

Equality is based on OpenFermion QubitOperator’s equality.

Parameters
  • openfermion_qubit_operator (QubitOperator) – OpenFermion qubit operator represented as a Pauli summation

  • pennylane_qubit_operator (pennylane.Hamiltonian) – PennyLane Hamiltonian object

Returns

True if equivalent

Return type

(bool)