MapperFnEvolutionSynthesis¶
- class MapperFnEvolutionSynthesis(mapper_fn)¶
Bases:
objectA
F2QSynthesisPluginfor transpilingEvolutionunder a custom mapping.This plugin maps the fermionic Hamiltonian \(H\) of the incoming
Evolutiongate to a qubit operator usingmapper_fnand emits aPauliEvolutionGate. It thereby preserves the \(e^{-i t H}\) convention of theEvolutiongate, with the same evolution time \(t\).Initializing this transpiler pass plugin can be done with the arguments listed below.
- Parameters:
mapper_fn (MapperFunction) – the fermion-to-qubit operator mapping function.
Attributes
- mapper_fn: Callable[[OperatorTrait, int], SparseObservable]¶
The fermion-to-qubit operator mapping function.
The two input arguments should be the following:
the operator to be mapped.
the number of qubits that the resulting operator should be defined on.
Note
It is the user’s responsibility to ensure that this function is in-sync with the global transpilation
F2QLayoutsetting.
Methods
- run(in_node, out_dag, *, f2q_layout)¶
Runs this transpilation plugin.
The fermionic Hamiltonian of the incoming
Evolutiongate is mapped to a qubit operator viamapper_fn, simplified, and appended toout_dagas aPauliEvolutionGateimplementing \(e^{-i t H}\) with the original evolution time \(t\).- Parameters:
in_node (DAGOpNode) – the input fermion-based circuit instruction. When this plugin gets called, the
in_node.opattribute must be of typeEvolution.out_dag (DAGCircuit) – the output qubit-based circuit.
f2q_layout (dict[QuantumRegister, QuantumRegister]) – the global transpilation
F2QLayoutsetting.
- Return type:
None
See also
The documentation of
F2QSynthesisPluginfor more detailed explanations of the arguments.- Raises:
NotImplementedError – when
in_nodeacts on fermionic modes that are spread across multipleFermionicRegisterinstances.- Parameters:
in_node (DAGOpNode)
out_dag (DAGCircuit)
f2q_layout (dict[QuantumRegister, QuantumRegister])
- Return type:
None