Skip to content

Commit

Permalink
Minor changes for docstrings (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomercurio authored Jun 23, 2024
2 parents 38881af + b41f924 commit d042bcc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/qobj/arithmetic_and_attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ LinearAlgebra.Hermitian(
QuantumObject(Hermitian(A.data, uplo), A.type, A.dims)

@doc raw"""
tr(A::QuantumObject})
tr(A::QuantumObject)
Returns the trace of [`QuantumObject`](@ref).
Expand Down Expand Up @@ -355,9 +355,12 @@ LinearAlgebra.rmul!(B::QuantumObject{<:AbstractArray}, a::Number) = (rmul!(B.dat
mul!(y, A.data, x, α, β)

@doc raw"""
√(A)
sqrt(A::QuantumObject)
Square root of [`QuantumObject`](@ref)
Matrix square root of [`QuantumObject`](@ref)
Note that `√(A)` is a synonym for `sqrt(A)`
"""
LinearAlgebra.sqrt(A::QuantumObject{<:AbstractArray{T}}) where {T} =
QuantumObject(sqrt(sparse_to_dense(A.data)), A.type, A.dims)
Expand Down

0 comments on commit d042bcc

Please sign in to comment.