transfer_vertex_ternary_tree
transfer_vertex_ternary_tree(op, encoding, num_qubits)
Map a TransferVertexOperator to a SparseObservable under 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, ornum_qubitsis smaller than the encoding’s mode count. - OverflowError – if
num_qubitsis negative or does not fit in 32 bits.
Was this page helpful?
Report a bug, typo, or request content on GitHub.