View source on GitHub |
Split an operator (instance of QubitOperator) into sub-operator
QubitOperators, where each sub-operator has terms that are diagonal in the same tensor product basis.
openfermion.measurements.group_into_tensor_product_basis_sets(
operator, seed=None
)
Each sub-operator
can be measured using the same qubit post-rotations
in expectation estimation. Grouping into these tensor product basis
sets has been found to improve the efficiency of expectation estimation
significantly for some Hamiltonians in the context of
VQE (see section V(A) in the supplementary material of
https://arxiv.org/pdf/1704.05018v2.pdf). The more general problem
of grouping operators into commutitative groups is discussed in
section IV (B2) of https://arxiv.org/pdf/1509.04279v1.pdf The
original input operator is the union of all output sub-operators,
and all sub-operators are disjoint (do not share any terms).
Raises | |
---|---|
TypeError
|
Operator of invalid type. |