edge_vertex_ternary_tree

edge_vertex_ternary_tree(op, encoding, num_qubits)

Map an EdgeVertexOperator to a SparseObservable under a ternary-tree encoding.

Parameters:
  • op – the edge-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 op acts on a mode the encoding does not cover.

Note

Unlike under Jordan-Wigner, a vertex operator is not in general the weight-1 Pauli \(Z_l\): that is a property of the chain, where the two Majorana strings’ \(Z\) chains cancel. On the balanced tree at \(n = 4\) a vertex operator has weight 3.