map_node_single_register¶
- map_node_single_register(in_node, f2q_layout)¶
Map the single fermionic mode register acted upon by the circuit operation.
Given a
DAGOpNodeand aF2QLayoutthis function will:ensure that all acted-upon fermionic modes belong to the same register
map the node’s indices to their global indices with respect to said fermionic mode register
map this fermionic mode register to the corresponding qubit register
Caution
The returned global fermionic mode register indices are knowingly dependent on the order of the fermionic modes during the construction of their original
FermionicRegister. This is unlikely to cause any issues but makes the usage ofRelabelModespossibly more generally.- Parameters:
in_node (DAGOpNode) – the node whose indices to parse.
f2q_layout (dict[QuantumRegister, QuantumRegister]) – the mapping of fermionic to qubit registers.
- Returns:
The list of the global fermionic mode indices and mapped qubit register instance.
- Raises:
NotImplementedError – when the provided node acts on fermionic modes that do not all belong to the same
FermionicRegister.- Return type: