The interaction operator that is the sum of the generators of the specified fermionic simulation gates.
openfermion.circuits.sum_of_interaction_operator_gate_generators(
n_modes: int, gates: Dict[Tuple[int, ...], Union[float, cirq.Gate]]
) -> 'openfermion.InteractionOperator'
The gates are specified as a dictionary whose items are (indices, gate),
where
* indices is a tuple of ints specifying the modes on which the gate
acts;
* gate is one of type
- float, which is interpreted as a constant, regardless of the
indices,
- cirq.ZPowGate, which is interpreted as a "linear" fermionic
simulation gate,
- openfermion.InteractionOperatorFermionicGate.
Args |
n_modes
|
The number of modes.
|
gates
|
The gates.
|
Returns |
The interaction operator.
|