Skip to content

Commit 5654933

Browse files
ytdHuangalbertomercurio
authored andcommitted
move get_typename_wrapper to utilities
1 parent 05bee1e commit 5654933

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/qobj/quantum_object_base.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ function _check_QuantumObject(type::OperatorBraQuantumObject, dims, m::Int, n::I
209209
return nothing
210210
end
211211

212-
get_typename_wrapper(A::AbstractQuantumObject) = Base.typename(typeof(A)).wrapper
213-
214212
# functions for getting Float or Complex element type
215213
_FType(A::AbstractQuantumObject) = _FType(eltype(A))
216214
_CType(A::AbstractQuantumObject) = _CType(eltype(A))

src/utilities.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ function convert_unit(value::T, unit1::Symbol, unit2::Symbol) where {T<:Real}
128128
return _FType(T)(value * (_energy_units[unit1] / _energy_units[unit2]))
129129
end
130130

131+
get_typename_wrapper(A) = Base.typename(typeof(A)).wrapper
132+
131133
_get_dense_similar(A::AbstractArray, args...) = similar(A, args...)
132134
_get_dense_similar(A::AbstractSparseMatrix, args...) = similar(nonzeros(A), args...)
133135

0 commit comments

Comments
 (0)