Skip to content

Commit 152813b

Browse files
committed
Eliminate type parameters from abstract types and add fullbasis function
1 parent 4e5b0fc commit 152813b

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# News
22

3+
## v0.4.0 - 2024-11-26
4+
5+
- Add `OperatorBasis` and `SuperOperatorBasis` abstract types along with corresponding `fullbasis` function to obtain these from instances of subtypes of `AbstractOperator` and `AbstractSuperOperator`.
6+
- Change type parameters for `StateVector`, `AbstractKet` `AbstractBra` `AbstractOperator` `AbstractSuperOperator` to elimitate all type parameters.
7+
8+
39
## v0.3.6 - 2024-09-08
410

511
- Add `coherentstate`, `thermalstate`, `displace`, `squeeze`, `wigner`, previously from QuantumOptics.

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "QuantumInterface"
22
uuid = "5717a53b-5d69-4fa3-b976-0bf2f97ca1e5"
33
authors = ["QuantumInterface.jl contributors"]
4-
version = "0.3.6"
4+
version = "0.4.0"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/QuantumInterface.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ module QuantumInterface
99
1010
Return the basis of an object.
1111
12-
If it's ambiguous, e.g. if an operator has a different left and right basis,
13-
an [`IncompatibleBases`](@ref) error is thrown.
12+
If it's ambiguous, e.g. if an operator or superoperator has a different
13+
left and right basis, an [`IncompatibleBases`](@ref) error is thrown.
1414
"""
1515
function basis end
1616

src/abstract_types.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ in respect to a certain basis. These coefficients are stored in the
2121
`data` field and the basis is defined in the `basis`
2222
field.
2323
"""
24-
abstract type StateVector{B,T} end
25-
abstract type AbstractKet{B,T} <: StateVector{B,T} end
26-
abstract type AbstractBra{B,T} <: StateVector{B,T} end
24+
abstract type StateVector end
25+
abstract type AbstractKet <: StateVector end
26+
abstract type AbstractBra <: StateVector end
2727

2828
"""
2929
Abstract base class for all operators.
@@ -36,7 +36,7 @@ For fast time evolution also at least the function
3636
implemented. Many other generic multiplication functions can be defined in
3737
terms of this function and are provided automatically.
3838
"""
39-
abstract type AbstractOperator{BL,BR} end
39+
abstract type AbstractOperator end
4040

4141
"""
4242
Base class for all super operator classes.
@@ -52,4 +52,4 @@ A_{bl_1,bl_2} = S_{(bl_1,bl_2) ↔ (br_1,br_2)} B_{br_1,br_2}
5252
A_{br_1,br_2} = B_{bl_1,bl_2} S_{(bl_1,bl_2) ↔ (br_1,br_2)}
5353
```
5454
"""
55-
abstract type AbstractSuperOperator{B1,B2} end
55+
abstract type AbstractSuperOperator end

0 commit comments

Comments
 (0)