_qubit_operators_equivalent(openfermion_qubit_operator, pennylane_qubit_operator, wires=None)¶
Checks equivalence between OpenFermion
QubitOperatorand Pennylane VQE
Hamiltonian(Tensor product of Pauli matrices).
Equality is based on OpenFermion
openfermion_qubit_operator (QubitOperator) – OpenFermion qubit operator represented as a Pauli summation
pennylane_qubit_operator (pennylane.Hamiltonian) – PennyLane Hamiltonian object
wires (Wires, list, tuple, dict) – Custom wire mapping used to convert to qubit operator from an observable terms measurable in a PennyLane ansatz. For types Wires/list/tuple, each item in the iterable represents a wire label corresponding to the qubit number equal to its index. For type dict, only int-keyed dict (for qubit-to-wire conversion) is accepted. If None, will map sorted wires from all Pennylane terms to consecutive int.
True if equivalent
- Return type