5050
5151The spin operator along the x-axis.
5252
53- See also [`σˣ`](@ref)
53+ See also [`σˣ`](@ref).
5454"""
5555function S_x end
5656S_x (; kwargs... ) = S_x (ComplexF64, Trivial; kwargs... )
9999
100100const Sˣ = S_x
101101
102- """ Pauli x operator."""
102+ """
103+ Pauli ``x`` operator, defined as ``σˣ = 2 ⋅ Sˣ``.
104+
105+ See also [`Sˣ`](@ref S_x).
106+ """
103107σˣ (args... ; kwargs... ) = 2 * S_x (args... ; kwargs... )
104108
105109"""
@@ -108,7 +112,7 @@ const Sˣ = S_x
108112
109113The spin operator along the y-axis.
110114
111- See also [`σʸ`](@ref)
115+ See also [`σʸ`](@ref).
112116"""
113117function S_y end
114118S_y (; kwargs... ) = S_y (ComplexF64, Trivial; kwargs... )
170174
171175const Sʸ = S_y
172176
173- """ Pauli y operator."""
177+ """
178+ Pauli ``y`` operator, defined as ``σʸ = 2 ⋅ Sʸ``.
179+
180+ See also [`Sʸ`](@ref S_y).
181+ """
174182σʸ (args... ; kwargs... ) = 2 * S_y (args... ; kwargs... )
175183
176184"""
@@ -180,7 +188,7 @@ const Sʸ = S_y
180188The spin operator along the z-axis. Possible values for `symmetry` are `Trivial`, `Z2Irrep`,
181189and `U1Irrep`.
182190
183- See also [`σᶻ`](@ref)
191+ See also [`σᶻ`](@ref).
184192"""
185193function S_z end
186194S_z (; kwargs... ) = S_z (ComplexF64, Trivial; kwargs... )
223231
224232const Sᶻ = S_z
225233
226- """ Pauli z operator."""
234+ """
235+ Pauli ``z`` operator, defined as ``σᶻ = 2 ⋅ Sᶻ``.
236+
237+ See also [`Sᶻ`](@ref S_z).
238+ """
227239σᶻ (args... ; kwargs... ) = 2 * S_z (args... ; kwargs... )
228240
229241"""
@@ -232,7 +244,7 @@ const Sᶻ = S_z
232244
233245The spin plus operator.
234246
235- See also [`σ⁺`](@ref)
247+ See also [`σ⁺`](@ref).
236248"""
237249function S_plus end
238250S_plus (; kwargs... ) = S_plus (ComplexF64, Trivial; kwargs... )
284296
285297const S⁺ = S_plus
286298
287- """ Pauli plus operator."""
299+ """
300+ Pauli plus operator, defined as ``σ⁺ = 2 ⋅ S⁺``.
301+
302+ See also [`S⁺`](@ref S_plus).
303+ """
288304σ⁺ (args... ; kwargs... ) = 2 * S_plus (args... ; kwargs... )
289305
290306"""
@@ -293,7 +309,7 @@ const S⁺ = S_plus
293309
294310The spin minus operator.
295311
296- See also [`σ⁻`](@ref)
312+ See also [`σ⁻`](@ref).
297313"""
298314function S_min end
299315S_min (; kwargs... ) = S_min (ComplexF64, Trivial; kwargs... )
@@ -345,23 +361,31 @@ end
345361
346362const S⁻ = S_min
347363
348- """ Pauli minus operator."""
364+ """
365+ Pauli minus operator, defined as ``σ⁻ = 2 ⋅ S⁻``.
366+
367+ See also [`S⁻`](@ref S_min).
368+ """
349369σ⁻ (args... ; kwargs... ) = 2 * S_min (args... ; kwargs... )
350370
351371unicode_table = Dict (:x => :ˣ , :y => :ʸ , :z => :ᶻ , :plus => :⁺ , :min => :⁻ )
352372
353373function spinop_docstring (L:: Symbol , R:: Symbol )
354374 return """
355- S_$L$R ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
356- $(Symbol (:S , unicode_table[L], unicode_table[R])) ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
375+ S_$L$R ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
376+ $(Symbol (:S , unicode_table[L], unicode_table[R])) ([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; spin=1 // 2)
357377
358- The spin $L$R exchange operator.
378+ The spin $L$R exchange operator.
359379
360- See also [`σ$(unicode_table[L])$(unicode_table[R]) `](@ref)
361- """
380+ See also [`σ$(unicode_table[L])$(unicode_table[R]) `](@ref).
381+ """
362382end
363383function pauli_unicode_docstring (L:: Symbol , R:: Symbol )
364- return """ Pauli $L$R operator."""
384+ return """
385+ Pauli $L$R operator, defined as ``σ$(unicode_table[L])$(unicode_table[R]) = 4 ⋅ S$(unicode_table[L])$(unicode_table[R]) ``.
386+
387+ See also [`S$(unicode_table[L])$(unicode_table[R]) `](@ref S_$L$R ).
388+ """
365389end
366390
367391for (L, R) in ((:x , :x ), (:y , :y ), (:z , :z ), (:plus , :min ), (:min , :plus ))
409433
410434The spin exchange operator.
411435
412- See also [`σσ`](@ref)
436+ See also [`σσ`](@ref).
413437"""
414438function S_exchange end
415439S_exchange (; kwargs... ) = S_exchange (ComplexF64, Trivial; kwargs... )
437461
438462const SS = S_exchange
439463
440- """ Pauli exchange operator."""
464+ """
465+ Pauli exchange operator, defined as ``σσ = 4 ⋅ SS``.
466+
467+ See also [`SS`](@ref S_exchange).
468+ """
441469σσ (args... ; kwargs... ) = 4 * S_exchange (args... ; kwargs... )
442470
443471"""
@@ -491,9 +519,9 @@ function weyl_heisenberg_matrices(Q::Int, elt=ComplexF64)
491519end
492520
493521"""
494- potts_Z([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; Q =3)
522+ potts_Z([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; q =3)
495523
496- The Potts Z operator, also known as the clock operator, where Z^q=1 .
524+ The Potts ``Z`` operator, also known as the clock operator, where `` Z^q = 1`` .
497525"""
498526function potts_Z end
499527potts_Z (; kwargs... ) = potts_Z (ComplexF64, Trivial; kwargs... )
@@ -506,10 +534,10 @@ function potts_Z(elt::Type{<:Number}, ::Type{Trivial}; q=3)
506534end
507535
508536"""
509- potts_X([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; Q =3)
510- potts_field([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; Q =3)
537+ potts_X([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; q =3)
538+ potts_field([eltype::Type{<:Number}], [symmetry::Type{<:Sector}]; q =3)
511539
512- The Potts X operator, also known as the shift operator, where X^q=1 .
540+ The Potts ``X`` operator, also known as the shift operator, where `` X^q = 1`` .
513541"""
514542function potts_X end
515543potts_X (; kwargs... ) = potts_X (ComplexF64, Trivial; kwargs... )
0 commit comments