Skip to content

Commit 56d87ea

Browse files
authored
Update api docs (#35)
1 parent 39df26d commit 56d87ea

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33

44
[compat]
5-
Documenter = "~0.25"
5+
Documenter = "~0.26"

docs/src/api.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ SparseSuperOperator
8989
basisstate
9090
```
9191

92+
```@docs
93+
sparsebasisstate
94+
```
95+
9296
```@docs
9397
identityoperator
9498
```
@@ -123,6 +127,10 @@ QuantumOpticsBase.samebases
123127
QuantumOpticsBase.check_samebases
124128
```
125129

130+
```@docs
131+
@samebases
132+
```
133+
126134
```@docs
127135
QuantumOpticsBase.multiplicable
128136
```
@@ -149,6 +157,10 @@ projector(a::Ket)
149157
projector(a::Bra)
150158
```
151159

160+
```@docs
161+
sparseprojector
162+
```
163+
152164
```@docs
153165
dm
154166
```
@@ -221,15 +233,15 @@ FockBasis
221233
```
222234

223235
```@docs
224-
number(::FockBasis)
236+
number(::Type{T}, ::FockBasis) where T
225237
```
226238

227239
```@docs
228-
destroy(::FockBasis)
240+
destroy(::Type{C}, ::FockBasis) where C
229241
```
230242

231243
```@docs
232-
create(::FockBasis)
244+
create(::Type{C}, ::FockBasis) where C
233245
```
234246

235247
```@docs
@@ -256,7 +268,7 @@ NLevelBasis
256268
```
257269

258270
```@docs
259-
transition(::NLevelBasis, ::Integer, ::Integer)
271+
transition(::Type{T}, ::NLevelBasis, ::Integer, ::Integer) where T
260272
```
261273

262274
```@docs
@@ -316,13 +328,13 @@ samplepoints
316328
```
317329

318330
```@docs
319-
position(b::PositionBasis)
320-
position(b::MomentumBasis)
331+
position(::Type{T}, b::PositionBasis) where T
332+
position(::Type{T}, b::MomentumBasis) where T
321333
```
322334

323335
```@docs
324-
momentum(b::PositionBasis)
325-
momentum(b::MomentumBasis)
336+
momentum(::Type{T}, b::PositionBasis) where T
337+
momentum(::Type{T}, b::MomentumBasis) where T
326338
```
327339

328340
```@docs
@@ -360,7 +372,7 @@ QuantumOpticsBase.orthonormalize
360372
```
361373

362374
```@docs
363-
projector(b1::SubspaceBasis, b2::SubspaceBasis)
375+
projector(::Type{T}, b1::SubspaceBasis, b2::SubspaceBasis) where T
364376
```
365377

366378
### [Many-body](@id API: Many-body)
@@ -378,20 +390,20 @@ bosonstates
378390
```
379391

380392
```@docs
381-
number(::ManyBodyBasis, index)
382-
number(::ManyBodyBasis)
393+
number(::Type{T}, ::ManyBodyBasis, index) where T
394+
number(::Type{T}, ::ManyBodyBasis) where T
383395
```
384396

385397
```@docs
386-
destroy(::ManyBodyBasis, index)
398+
destroy(::Type{T}, ::ManyBodyBasis, index) where T
387399
```
388400

389401
```@docs
390-
create(::ManyBodyBasis, index)
402+
create(::Type{T}, ::ManyBodyBasis, index) where T
391403
```
392404

393405
```@docs
394-
transition(::ManyBodyBasis, i, j)
406+
transition(::Type{T}, ::ManyBodyBasis, i, j) where T
395407
```
396408

397409
```@docs

src/states.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ end
157157

158158
# Creation of basis states.
159159
"""
160-
basisstate(b, index)
161-
basisstate(::Type{T}, b, index)
160+
basisstate([T=ComplexF64, ]b, index)
162161
163162
Basis vector specified by `index` as ket state.
164163
@@ -179,8 +178,7 @@ end
179178
basisstate(b::Basis, indices) = basisstate(ComplexF64, b, indices)
180179

181180
"""
182-
sparsebasisstate(b, index)
183-
sparsebasisstate(::Type{T}, b, index)
181+
sparsebasisstate([T=ComplexF64, ]b, index)
184182
185183
Sparse version of [`basisstate`](@ref).
186184
"""

src/subspace.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ end
106106
"""
107107
sparseprojector([T,] b1, b2)
108108
109-
Sparse version of [projector](@ref).
109+
Sparse version of [`projector`](@ref).
110110
"""
111111
function sparseprojector(::Type{T}, b1::SubspaceBasis, b2::SubspaceBasis) where T
112112
if b1.superbasis != b2.superbasis

0 commit comments

Comments
 (0)