@@ -10,53 +10,47 @@ export isunitary
1010
1111Checks if the [`QuantumObject`](@ref) `A` is a [`Bra`](@ref). Default case returns `false` for any other inputs.
1212"""
13- isbra (A:: QuantumObject ) = isbra (typeof (A))
14- isbra (:: Type{<:QuantumObject{Bra,N}} ) where {N} = true
13+ isbra (A:: QuantumObject{Bra} ) = true
1514isbra (A) = false # default case
1615
1716@doc raw """
1817 isket(A)
1918
2019Checks if the [`QuantumObject`](@ref) `A` is a [`Ket`](@ref). Default case returns `false` for any other inputs.
2120"""
22- isket (A:: QuantumObject ) = isket (typeof (A))
23- isket (:: Type{<:QuantumObject{Ket,N}} ) where {N} = true
21+ isket (A:: QuantumObject{Ket} ) = true
2422isket (A) = false # default case
2523
2624@doc raw """
2725 isoper(A)
2826
2927Checks if the [`AbstractQuantumObject`](@ref) `A` is a [`Operator`](@ref). Default case returns `false` for any other inputs.
3028"""
31- isoper (A:: AbstractQuantumObject ) = isoper (typeof (A))
32- isoper (:: Type{<:AbstractQuantumObject{Operator,N}} ) where {N} = true
29+ isoper (A:: AbstractQuantumObject{Operator} ) = true
3330isoper (A) = false # default case
3431
3532@doc raw """
3633 isoperbra(A)
3734
3835Checks if the [`QuantumObject`](@ref) `A` is a [`OperatorBra`](@ref). Default case returns `false` for any other inputs.
3936"""
40- isoperbra (A:: QuantumObject ) = isoperbra (typeof (A))
41- isoperbra (:: Type{<:QuantumObject{OperatorBra,N}} ) where {N} = true
37+ isoperbra (A:: QuantumObject{OperatorBra} ) = true
4238isoperbra (A) = false # default case
4339
4440@doc raw """
4541 isoperket(A)
4642
4743Checks if the [`QuantumObject`](@ref) `A` is a [`OperatorKet`](@ref). Default case returns `false` for any other inputs.
4844"""
49- isoperket (A:: QuantumObject ) = isoperket (typeof (A))
50- isoperket (:: Type{<:QuantumObject{OperatorKet,N}} ) where {N} = true
45+ isoperket (A:: QuantumObject{OperatorKet} ) = true
5146isoperket (A) = false # default case
5247
5348@doc raw """
5449 issuper(A)
5550
5651Checks if the [`AbstractQuantumObject`](@ref) `A` is a [`SuperOperator`](@ref). Default case returns `false` for any other inputs.
5752"""
58- issuper (A:: AbstractQuantumObject ) = issuper (typeof (A))
59- issuper (:: Type{<:AbstractQuantumObject{<:SuperOperatorType,N}} ) where {N} = true
53+ issuper (A:: AbstractQuantumObject{<:SuperOperatorType} ) = true
6054issuper (A) = false # default case
6155
6256@doc raw """
0 commit comments