diff --git a/src/QuantumOpticsBase.jl b/src/QuantumOpticsBase.jl index 14608f2e..dc835eee 100644 --- a/src/QuantumOpticsBase.jl +++ b/src/QuantumOpticsBase.jl @@ -3,7 +3,7 @@ module QuantumOpticsBase using SparseArrays, LinearAlgebra, LRUCache, Strided, UnsafeArrays, FillArrays import LinearAlgebra: mul!, rmul! -import QuantumInterface: dagger, directsum, ⊕, dm, embed, expect, identityoperator, identitysuperoperator, +import QuantumInterface: dagger, directsum, ⊕, dm, embed, nsubsystems, expect, identityoperator, identitysuperoperator, permutesystems, projector, ptrace, reduced, tensor, ⊗, variance, apply!, basis, AbstractSuperOperator # index helpers diff --git a/src/apply.jl b/src/apply.jl index 24e2d7f7..2336cb6d 100644 --- a/src/apply.jl +++ b/src/apply.jl @@ -1,11 +1,3 @@ -nsubsystems(s::Ket) = nsubsystems(s.basis) -function nsubsystems(s::Operator) - s.basis_l == s.basis_r || throw(ArgumentError("`nsubsystem(::Operator)` is well defined only if the left and right bases are the same")) - nsubsystems(s.basis_l) -end -nsubsystems(b::CompositeBasis) = length(b.bases) -nsubsystems(b::Basis) = 1 - function is_apply_shortcircuit(state, indices, operation) if nsubsystems(state) == 1 basis(state)==basis(operation) || throw(ArgumentError("`apply!` failed due to incompatible bases of the state and the operation attempted to be applied on it"))