Skip to content

Commit

Permalink
API fix
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph committed Aug 22, 2023
1 parent 29b2fa3 commit dc7edcb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
18 changes: 18 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -594,3 +594,21 @@ DenseChiMatrix
```@docs
QuantumOpticsBase.set_printing
```

## [LazyTensor functions](@id API: LazyTensor functions)

```@docs
lazytensor_enable_cache
```

```@docs
lazytensor_disable_cache
```

```@docs
lazytensor_cachesize
```

```@docs
lazytensor_clear_cache
```
6 changes: 2 additions & 4 deletions src/operators_sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ const SparseOpPureType{BL,BR} = Operator{BL,BR,<:SparseMatrixCSC}
const SparseOpAdjType{BL,BR} = Operator{BL,BR,<:Adjoint{<:Number,<:SparseMatrixCSC}}
const SparseOpType{BL,BR} = Union{SparseOpPureType{BL,BR},SparseOpAdjType{BL,BR}}


"""
SparseOperator(b1[, b2, data])
Sparse array implementation of Operator.
The matrix is stored as the julia built-in type `SparseMatrixCSC`
in the `data` field.
The matrix is stored as the julia built-in type `SparseMatrixCSC` in the `data` field.
"""
SparseOperator(b1::Basis, b2::Basis, data) = Operator(b1, b2, SparseMatrixCSC(data))
SparseOperator(b1::Basis, b2::Basis, data::SparseMatrixCSC) = Operator(b1, b2, data)
Expand Down Expand Up @@ -89,7 +87,7 @@ identityoperator(::Type{T}, b::Basis) where T<:Number = identityoperator(DataOpe
"""
diagonaloperator(b::Basis)
Create a diagonal operator of type [`SparseOperator`](@ref).
Create a diagonal operator of type [`SparseOperator`](@ref).
"""
function diagonaloperator(b::Basis, diag)
@assert 1 <= length(diag) <= length(b)
Expand Down

0 comments on commit dc7edcb

Please sign in to comment.