The first part of this talk will introduce generalized Jordan–Wigner transformation on arbitrary triangulation of any manifold in 2d, 3d, and general dimensions. This gives a duality between all fermionic systems and a new class of Z2 lattice gauge theories. This map preserves the locality and has an explicit dependence on the second Stiefel–Whitney class and a choice of spin structure on the manifold. In the Euclidean picture, this mapping is equivalent to introducing topological terms (Chern-Simon term in 2d or the Steenrod square term in general) to the Euclidean action. We can increase the code distance of this mapping, such that this mapping can correct all 1-qubit and 2-qubits errors and is useful for the simulation of fermions on the quantum computer. The second part of my talk is related to symmetry-protected-topological (SPT) phases. By the boson-fermion duality, we can show the equivalent between any supercohomology fermionic SPT and higher-group bosonic SPT phases. Particularly in (3+1)D, we have constructed a finite-depth local unitary quantum circuit for any supercohomology fermionic SPT state with gapped boundary construction. This fermionic SPT state is derived by gauging higher-form Z2 symmetry in the higher-group bosonic SPT and apply the boson-fermion duality.