# Why nf is defined modulus -1 in sitetype "fermion" "electron"

**URL:** <https://itensor.discourse.group/t/why-nf-is-defined-modulus-1-in-sitetype-fermion-electron/2141>\
**Category:** ITensor Julia Questions\
**Created:** [November 27, 2024, 6:49am UTC](https://itensor.discourse.group/t/why-nf-is-defined-modulus-1-in-sitetype-fermion-electron/2141 "2024-11-27T06:49:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZhouGD2000](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/zhougd2000/32/669_2.png) [@ZhouGD2000](https://itensor.discourse.group/u/ZhouGD2000)\
**Post date:** [November 27, 2024, 6:49am UTC](https://itensor.discourse.group/t/why-nf-is-defined-modulus-1-in-sitetype-fermion-electron/2141/1 "2024-11-27T06:49:46Z")

</div>

This is not a problem that affect my using ITensor, but I am curious about this. In sitetypes/fermion.jl and sitetypes/electron.jl, I find that their quantum number are defined by

```auto
zer = QN(qnname_nf, 0, -1) => 1
one = QN(qnname_nf, 1, -1) => 1

```

instead of `QN(qnname_nf, 0, 1), QN(qnname_nf, 1, 1)` . Is there any special reason? I find this when I define my own site type with conserve QN and I also have to use `QN(qnname_nf, 1, -1)` so that they are compatible.

---

<div class="post-metadata">

**Author:** ![miles](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/miles/32/6_2.png) [@miles](https://itensor.discourse.group/u/miles)\
**Post date:** [November 27, 2024, 3:12pm UTC](https://itensor.discourse.group/t/why-nf-is-defined-modulus-1-in-sitetype-fermion-electron/2141/2 "2024-11-27T15:12:07Z")

</div>

The idea behind having the last number (the “modulus”) being negative is that the group or symmetry for fermions is not a regular U(1) but a “fermionic” U(1), which some authors have written as fU(1). So the minus sign is to indicate that. In our code currently, it is just a convenient way to distinguish a fermionic Abelian symmetry from a regular one, and we do use this in our experimental “auto fermion” system. You can see it being checked on the following line of code:  
[https://github.com/ITensor/ITensors.jl/blob/795042b976729ed79768482e01f2c4d31b6325ff/src/fermions/fermions.jl#L23](https://github.com/ITensor/ITensors.jl/blob/795042b976729ed79768482e01f2c4d31b6325ff/src/fermions/fermions.jl#L23)

I think what you are doing is the recommended approach for now, which is to define your own QN’s that are supposed to be compatible with the ones from our definitions in the same way.

---

<div class="post-metadata">

**Author:** ![ZhouGD2000](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/zhougd2000/32/669_2.png) [@ZhouGD2000](https://itensor.discourse.group/u/ZhouGD2000)\
**Post date:** [November 27, 2024, 3:50pm UTC](https://itensor.discourse.group/t/why-nf-is-defined-modulus-1-in-sitetype-fermion-electron/2141/3 "2024-11-27T15:50:15Z")

</div>

Got it. Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/itensor/original/1X/d3072b13e047cd06df7f3981547c0917d940dfa4.png) [@system](https://itensor.discourse.group/u/system)\
**Post date:** [December 21, 2024, 5:25pm UTC](https://itensor.discourse.group/t/why-nf-is-defined-modulus-1-in-sitetype-fermion-electron/2141/4 "2024-12-21T17:25:24Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
