TrivialOccupationFermionicMeasureSynthesis
class TrivialOccupationFermionicMeasureSynthesis
Bases: object
A F2QSynthesisPlugin for transpiling FermionicMeasure with trivial occupation.
Under an occupation-basis encoding, the occupation of fermionic mode is the computational-basis value of the single qubit that mode is mapped onto. A mode measurement therefore lowers to exactly one qubit Measure, writing into the very classical bit the FermionicMeasure was given.
Warning
This transpilation pass plugin makes the following assumptions:
- an occupation-basis encoding (like Jordan-Wigner)
- a trivial fermion-to-qubit layout (i.e. no change in their register lengths)
- a 1-to-1 mapping of fermionic mode indices to qubit indices
Methods
run
run(in_node, out_dag, *, f2q_layout)
Runs this transpilation plugin.
Parameters
- in_node (DAGOpNode) – the input fermion-based circuit instruction. When this plugin gets called, the
in_node.opattribute must be of typeFermionicMeasure. - 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 F2QSynthesisPlugin for more detailed explanations of the arguments.
Raises
- NotImplementedError – when
in_nodeacts on fermionic modes that are spread across multipleFermionicRegisterinstances. - ValueError – when the mapped qubit register does not have the same length as the fermionic mode register, in which case a mode has no single qubit whose measurement would yield its occupation.
Parameters
- in_node (DAGOpNode)
- out_dag (DAGCircuit)
- f2q_layout (dict[QuantumRegister, QuantumRegister])
Return type
None
Was this page helpful?
Report a bug, typo, or request content on GitHub.