Skip to content

Fermions (Majorana Jordan-Wigner mapping)

Majorana-fermion → qubit (Jordan-Wigner) mapping, one qubit per two Majorana modes: chi_{2j-1} = (prod_{k<j} Z_k) X_j, chi_{2j} = (prod_{k<j} Z_k) Y_j. Each chi_i is Hermitian and unit- normalized (chi_i^2 = I), and the anticommutation relation {chi_a, chi_b} = 2*delta_ab*I holds exactly — verified against the actual matrices, not assumed from the textbook formula alone.

Combine the returned Pauli term with pauli_hamiltonian_to_matrix to build any Majorana-operator Hamiltonian as a dense matrix, e.g. a sparse Sachdev-Ye-Kitaev (SYK) model: H = sum_{ijkl} J_ijkl * chi_i*chi_j*chi_k*chi_l.

fermions

Majorana-fermion -> qubit (Jordan-Wigner) mapping.

Standard convention, one qubit per two Majorana modes: chi_{2j-1} = (prod_{k<j} Z_k) X_j chi_{2j} = (prod_{k<j} Z_k) Y_j mode_index is 1-indexed (chi_1 .. chi_{2n_qubits}). Each chi_i is Hermitian and satisfies chi_i^2 = I by this normalization; the anticommutation relation {chi_a, chi_b} = 2delta_ab*I holds exactly (verified in tests/test_fermions.py against the actual matrices, not assumed from the textbook formula alone).

Originated in research/wormhole_syk.py (a traversable-wormhole-inspired quantum teleportation reproduction, arXiv:2604.10090) -- promoted here because Jordan-Wigner fermion mapping is a generic building block, not specific to that one experiment, and nothing like it existed anywhere in this package before (dashboard_core/hamiltonians.py only has PennyLane's molecule-specific Hartree-Fock Jordan-Wigner, not a general Majorana map).

Combine the returned Pauli term with dense_evolution.pauli_hamiltonian_to_matrix to build any Majorana-operator Hamiltonian as a dense matrix, e.g. a sparse SYK model: H = sum_{ijkl} J_ijkl * chi_ichi_jchi_k*chi_l.

majorana_pauli_terms

majorana_pauli_terms(mode_index, n_qubits)

Jordan-Wigner term for one Majorana mode.

Parameters

mode_index : int 1-indexed Majorana mode, 1 <= mode_index <= 2n_qubits. n_qubits : int Number of qubits the fermionic system is mapped onto (n_majorana_modes = 2n_qubits).

Returns

(float, dict) A (coeff, pauli_dict) term -- coeff is always 1.0, pauli_dict is {qubit: 'X'|'Y'|'Z'} -- ready for dense_evolution.pauli_hamiltonian_to_matrix.

Source code in dense_evolution/fermions.py
def majorana_pauli_terms(mode_index, n_qubits):
    """Jordan-Wigner term for one Majorana mode.

    Parameters
    ----------
    mode_index : int
        1-indexed Majorana mode, 1 <= mode_index <= 2*n_qubits.
    n_qubits : int
        Number of qubits the fermionic system is mapped onto
        (n_majorana_modes = 2*n_qubits).

    Returns
    -------
    (float, dict)
        A (coeff, pauli_dict) term -- coeff is always 1.0, pauli_dict is
        {qubit: 'X'|'Y'|'Z'} -- ready for
        dense_evolution.pauli_hamiltonian_to_matrix.
    """
    if not (1 <= mode_index <= 2 * n_qubits):
        raise ValueError(f"mode_index must be in [1, {2*n_qubits}], got {mode_index}")
    j = (mode_index - 1) // 2
    is_even = (mode_index % 2 == 0)
    pauli = {k: 'Z' for k in range(j)}
    pauli[j] = 'Y' if is_even else 'X'
    return (1.0, pauli)

See also: entropy and trotter, the other two modules promoted alongside this one from a real traversable- wormhole-inspired quantum teleportation reproduction (Gao-Jafferis-Wall theory, arXiv:2604.10090) — see the MCP Server section and Dense-Evolution-Discovery for the real experiments built on top of these three modules.