edge_vertex_jordan_wigner¶
- edge_vertex_jordan_wigner(op, num_qubits)¶
Map an
EdgeVertexOperatorto aSparseObservableunder the Jordan-Wigner transformation. [1]Fermionic mode \(j\) is mapped to qubit \(j\) of the resulting
SparseObservable, following Qiskit’s little-endian qubit ordering.- Parameters:
op – the edge-vertex operator to map.
num_qubits – the number of qubits for the resulting qubit operator. This must be strictly greater than the largest mode index in
op(any additional qubits are padded with the identity).
- Returns:
The mapped qubit operator. The result is not guaranteed to be fully simplified; call
simplify()to combine any remaining duplicate terms. Duplicates are merged as the result is assembled, to bound the memory required, so the exact number of terms returned may vary with the number of threads used. This does not affect the operator that the result represents.- Raises:
ValueError – if
num_qubitsis too small to hold the operator’s support, i.e. if it is not larger than the largest mode index acted upon byop.
Definition¶
Writing \(l_\text{min}\) and \(l_\text{max}\) for the smaller and larger of the two indices, the generalized edge operators map onto single Pauli strings,
\[\begin{align} V_l = E_{ll} &\rightarrow \sigma^Z_l \, , \nonumber \\ E_{lr} &\rightarrow \mp \, \sigma^Y_{l_\text{min}} \left( \bigotimes_{l_\text{min} \lt k \lt l_\text{max}} \sigma^Z_k \right) \sigma^X_{l_\text{max}} \nonumber \end{align}\]where the sign is negative for \(l \lt r\) and positive otherwise. The \(\sigma^Z\) chains of the two underlying Majorana operators cancel below the lower index, which is why the \(\sigma^Z\) string spans only the modes strictly between the two endpoints.
Note
Reversing the two indices leaves the Pauli string unchanged and flips only the sign, which is the antisymmetry \(E_{lr} = -E_{rl}\). Contrast
transfer_vertex_jordan_wigner(), where the coefficient is the same for both orientations and the Pauli letters change instead.Note
These Pauli strings differ from those in Eq. (10) of [2] by an exchange of \(\sigma^X\) and \(\sigma^Y\) on the two endpoints. This is a single-qubit basis choice – both conventions satisfy every defining relation of the algebra – and the one used here is the one consistent with
edge_vertex_to_fermion(), so that mapping an operator directly agrees with converting it to aFermionOperatorfirst.Mapping directly also avoids an intermediate blowup: each fermionic action maps onto a two-term sum, so routing a term built from \(L\) edge operators through a
FermionOperatorinflates a single Pauli string into up to \(4^L\) terms before merging them back down. The saving grows with the length of the terms; for single-operator terms the two routes cost about the same.Usage¶
>>> from qiskit_fermions.mappers.library import edge_vertex_jordan_wigner >>> from qiskit_fermions.operators import EdgeVertexOperator >>> eop = EdgeVertexOperator.from_dict({((0, 0),): 2.0, ((0, 1),): 0.5}) >>> edge_vertex_jordan_wigner(eop, 2).simplify() <SparseObservable with 2 terms on 2 qubits: (2+0j)(Z_0) + (-0.5+0j)(X_1 Y_0)>