We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docs for sigma operators
The documentation of the ladder operator `netket.operator.spin.sigmap` says `σ^+ = σ^x + i σ^y`, but in fact it is defined as `σ^+ = 1/2(σ^x + i σ^y)` in the code.

The same error is in the documentation of `netket.operator.spin.sigmam` operator.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `netket/operator/spin.py`
Content:
```
1 # Copyright 2021 The NetKet Authors - All rights reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 from netket.hilbert import AbstractHilbert
16 from netket.utils.types import DType
17 
18 from ._local_operator import LocalOperator as _LocalOperator
19 
20 
21 def sigmax(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:
22     """
23     Builds the :math:`\\sigma^x` operator acting on the `site`-th of the Hilbert
24     space `hilbert`.
25 
26     If `hilbert` is a non-Spin space of local dimension M, it is considered
27     as a (M-1)/2 - spin space.
28 
29     :param hilbert: The hilbert space
30     :param site: the site on which this operator acts
31     :return: a nk.operator.LocalOperator
32     """
33     import numpy as np
34 
35     N = hilbert.size_at_index(site)
36     S = (N - 1) / 2
37 
38     D = [np.sqrt((S + 1) * 2 * a - a * (a + 1)) for a in np.arange(1, N)]
39     mat = np.diag(D, 1) + np.diag(D, -1)
40     return _LocalOperator(hilbert, mat, [site], dtype=dtype)
41 
42 
43 def sigmay(
44     hilbert: AbstractHilbert, site: int, dtype: DType = complex
45 ) -> _LocalOperator:
46     """
47     Builds the :math:`\\sigma^y` operator acting on the `site`-th of the Hilbert
48     space `hilbert`.
49 
50     If `hilbert` is a non-Spin space of local dimension M, it is considered
51     as a (M-1)/2 - spin space.
52 
53     :param hilbert: The hilbert space
54     :param site: the site on which this operator acts
55     :return: a nk.operator.LocalOperator
56     """
57     import numpy as np
58 
59     N = hilbert.size_at_index(site)
60     S = (N - 1) / 2
61 
62     D = np.array([1j * np.sqrt((S + 1) * 2 * a - a * (a + 1)) for a in np.arange(1, N)])
63     mat = np.diag(D, -1) + np.diag(-D, 1)
64     return _LocalOperator(hilbert, mat, [site], dtype=dtype)
65 
66 
67 def sigmaz(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:
68     """
69     Builds the :math:`\\sigma^z` operator acting on the `site`-th of the Hilbert
70     space `hilbert`.
71 
72     If `hilbert` is a non-Spin space of local dimension M, it is considered
73     as a (M-1)/2 - spin space.
74 
75     :param hilbert: The hilbert space
76     :param site: the site on which this operator acts
77     :return: a nk.operator.LocalOperator
78     """
79     import numpy as np
80 
81     N = hilbert.size_at_index(site)
82     S = (N - 1) / 2
83 
84     D = np.array([2 * m for m in np.arange(S, -(S + 1), -1)])
85     mat = np.diag(D, 0)
86     return _LocalOperator(hilbert, mat, [site], dtype=dtype)
87 
88 
89 def sigmam(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:
90     """
91     Builds the :math:`\\sigma^{-} = \\sigma^x - i \\sigma^y` operator acting on the
92     `site`-th of the Hilbert space `hilbert`.
93 
94     If `hilbert` is a non-Spin space of local dimension M, it is considered
95     as a (M-1)/2 - spin space.
96 
97     :param hilbert: The hilbert space
98     :param site: the site on which this operator acts
99     :return: a nk.operator.LocalOperator
100     """
101     import numpy as np
102 
103     N = hilbert.size_at_index(site)
104     S = (N - 1) / 2
105 
106     S2 = (S + 1) * S
107     D = np.array([np.sqrt(S2 - m * (m - 1)) for m in np.arange(S, -S, -1)])
108     mat = np.diag(D, -1)
109     return _LocalOperator(hilbert, mat, [site], dtype=dtype)
110 
111 
112 def sigmap(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:
113     """
114     Builds the :math:`\\sigma^{+} = \\sigma^x + i \\sigma^y` operator acting on the
115     `site`-th of the Hilbert space `hilbert`.
116 
117     If `hilbert` is a non-Spin space of local dimension M, it is considered
118     as a (M-1)/2 - spin space.
119 
120     :param hilbert: The hilbert space
121     :param site: the site on which this operator acts
122     :return: a nk.operator.LocalOperator
123     """
124     import numpy as np
125 
126     N = hilbert.size_at_index(site)
127     S = (N - 1) / 2
128 
129     S2 = (S + 1) * S
130     D = np.array([np.sqrt(S2 - m * (m + 1)) for m in np.arange(S - 1, -(S + 1), -1)])
131     mat = np.diag(D, 1)
132     return _LocalOperator(hilbert, mat, [site], dtype=dtype)
133 
134 
135 # clean up the module
136 del AbstractHilbert, DType
137
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/netket/operator/spin.py b/netket/operator/spin.py
--- a/netket/operator/spin.py
+++ b/netket/operator/spin.py
@@ -88,7 +88,7 @@
 
 def sigmam(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:
     """
-    Builds the :math:`\\sigma^{-} = \\sigma^x - i \\sigma^y` operator acting on the
+    Builds the :math:`\\sigma^{-} = \\frac{1}{2}(\\sigma^x - i \\sigma^y)` operator acting on the
     `site`-th of the Hilbert space `hilbert`.
 
     If `hilbert` is a non-Spin space of local dimension M, it is considered
@@ -111,7 +111,7 @@
 
 def sigmap(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:
     """
-    Builds the :math:`\\sigma^{+} = \\sigma^x + i \\sigma^y` operator acting on the
+    Builds the :math:`\\sigma^{+} = \\frac{1}{2}(\\sigma^x + i \\sigma^y)` operator acting on the
     `site`-th of the Hilbert space `hilbert`.
 
     If `hilbert` is a non-Spin space of local dimension M, it is considered

{"golden_diff": "diff --git a/netket/operator/spin.py b/netket/operator/spin.py\n--- a/netket/operator/spin.py\n+++ b/netket/operator/spin.py\n@@ -88,7 +88,7 @@\n \n def sigmam(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n     \"\"\"\n-    Builds the :math:`\\\\sigma^{-} = \\\\sigma^x - i \\\\sigma^y` operator acting on the\n+    Builds the :math:`\\\\sigma^{-} = \\\\frac{1}{2}(\\\\sigma^x - i \\\\sigma^y)` operator acting on the\n     `site`-th of the Hilbert space `hilbert`.\n \n     If `hilbert` is a non-Spin space of local dimension M, it is considered\n@@ -111,7 +111,7 @@\n \n def sigmap(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n     \"\"\"\n-    Builds the :math:`\\\\sigma^{+} = \\\\sigma^x + i \\\\sigma^y` operator acting on the\n+    Builds the :math:`\\\\sigma^{+} = \\\\frac{1}{2}(\\\\sigma^x + i \\\\sigma^y)` operator acting on the\n     `site`-th of the Hilbert space `hilbert`.\n \n     If `hilbert` is a non-Spin space of local dimension M, it is considered\n", "issue": "Docs for sigma operators\nThe documentation of the ladder operator `netket.operator.spin.sigmap` says `\u03c3^+ = \u03c3^x + i \u03c3^y`, but in fact it is defined as `\u03c3^+ = 1/2(\u03c3^x + i \u03c3^y)` in the code.\r\n\r\nThe same error is in the documentation of `netket.operator.spin.sigmam` operator.\n", "before_files": [{"content": "# Copyright 2021 The NetKet Authors - All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom netket.hilbert import AbstractHilbert\nfrom netket.utils.types import DType\n\nfrom ._local_operator import LocalOperator as _LocalOperator\n\n\ndef sigmax(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^x` operator acting on the `site`-th of the Hilbert\n    space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    D = [np.sqrt((S + 1) * 2 * a - a * (a + 1)) for a in np.arange(1, N)]\n    mat = np.diag(D, 1) + np.diag(D, -1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmay(\n    hilbert: AbstractHilbert, site: int, dtype: DType = complex\n) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^y` operator acting on the `site`-th of the Hilbert\n    space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    D = np.array([1j * np.sqrt((S + 1) * 2 * a - a * (a + 1)) for a in np.arange(1, N)])\n    mat = np.diag(D, -1) + np.diag(-D, 1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmaz(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^z` operator acting on the `site`-th of the Hilbert\n    space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    D = np.array([2 * m for m in np.arange(S, -(S + 1), -1)])\n    mat = np.diag(D, 0)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmam(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^{-} = \\\\sigma^x - i \\\\sigma^y` operator acting on the\n    `site`-th of the Hilbert space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    S2 = (S + 1) * S\n    D = np.array([np.sqrt(S2 - m * (m - 1)) for m in np.arange(S, -S, -1)])\n    mat = np.diag(D, -1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmap(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^{+} = \\\\sigma^x + i \\\\sigma^y` operator acting on the\n    `site`-th of the Hilbert space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    S2 = (S + 1) * S\n    D = np.array([np.sqrt(S2 - m * (m + 1)) for m in np.arange(S - 1, -(S + 1), -1)])\n    mat = np.diag(D, 1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\n# clean up the module\ndel AbstractHilbert, DType\n", "path": "netket/operator/spin.py"}], "after_files": [{"content": "# Copyright 2021 The NetKet Authors - All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom netket.hilbert import AbstractHilbert\nfrom netket.utils.types import DType\n\nfrom ._local_operator import LocalOperator as _LocalOperator\n\n\ndef sigmax(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^x` operator acting on the `site`-th of the Hilbert\n    space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    D = [np.sqrt((S + 1) * 2 * a - a * (a + 1)) for a in np.arange(1, N)]\n    mat = np.diag(D, 1) + np.diag(D, -1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmay(\n    hilbert: AbstractHilbert, site: int, dtype: DType = complex\n) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^y` operator acting on the `site`-th of the Hilbert\n    space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    D = np.array([1j * np.sqrt((S + 1) * 2 * a - a * (a + 1)) for a in np.arange(1, N)])\n    mat = np.diag(D, -1) + np.diag(-D, 1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmaz(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^z` operator acting on the `site`-th of the Hilbert\n    space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    D = np.array([2 * m for m in np.arange(S, -(S + 1), -1)])\n    mat = np.diag(D, 0)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmam(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^{-} = \\\\frac{1}{2}(\\\\sigma^x - i \\\\sigma^y)` operator acting on the\n    `site`-th of the Hilbert space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    S2 = (S + 1) * S\n    D = np.array([np.sqrt(S2 - m * (m - 1)) for m in np.arange(S, -S, -1)])\n    mat = np.diag(D, -1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\ndef sigmap(hilbert: AbstractHilbert, site: int, dtype: DType = float) -> _LocalOperator:\n    \"\"\"\n    Builds the :math:`\\\\sigma^{+} = \\\\frac{1}{2}(\\\\sigma^x + i \\\\sigma^y)` operator acting on the\n    `site`-th of the Hilbert space `hilbert`.\n\n    If `hilbert` is a non-Spin space of local dimension M, it is considered\n    as a (M-1)/2 - spin space.\n\n    :param hilbert: The hilbert space\n    :param site: the site on which this operator acts\n    :return: a nk.operator.LocalOperator\n    \"\"\"\n    import numpy as np\n\n    N = hilbert.size_at_index(site)\n    S = (N - 1) / 2\n\n    S2 = (S + 1) * S\n    D = np.array([np.sqrt(S2 - m * (m + 1)) for m in np.arange(S - 1, -(S + 1), -1)])\n    mat = np.diag(D, 1)\n    return _LocalOperator(hilbert, mat, [site], dtype=dtype)\n\n\n# clean up the module\ndel AbstractHilbert, DType\n", "path": "netket/operator/spin.py"}]}