transfer_vertex_ternary_tree¶
- transfer_vertex_ternary_tree(op, encoding, num_qubits)¶
Map a
TransferVertexOperatorto aSparseObservableunder a ternary-tree encoding.- Parameters:
op – the transfer-vertex operator to map.
encoding – the compiled encoding to map through.
num_qubits – the number of qubits for the resulting qubit operator. Must be at least the encoding’s mode count; a larger value pads with the identity.
- Returns:
The mapped qubit operator, subject to the same simplification and grouping caveats as
fermion_ternary_tree().- Raises:
ValueError – if
opacts on a mode the encoding does not cover.