Skip to content

Commit

Permalink
make element-type of zero_ket as complex (qutip#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
ytdHuang authored Aug 13, 2024
2 parents 346bdad + c917a16 commit 5499a17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qobj/states.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ The `dimensions` can be either the following types:
- `dimensions::Int`: Number of basis states in the Hilbert space.
- `dimensions::Vector{Int}`: list of dimensions representing the each number of basis in the subsystems.
"""
zero_ket(dimensions::Int) = QuantumObject(zeros(dimensions), Ket, [dimensions])
zero_ket(dimensions::Vector{Int}) = QuantumObject(zeros(prod(dimensions)), Ket, dimensions)
zero_ket(dimensions::Int) = QuantumObject(zeros(ComplexF64, dimensions), Ket, [dimensions])
zero_ket(dimensions::Vector{Int}) = QuantumObject(zeros(ComplexF64, prod(dimensions)), Ket, dimensions)

@doc raw"""
fock(N::Int, pos::Int=0; dims::Vector{Int}=[N], sparse::Bool=false)
Expand Down

0 comments on commit 5499a17

Please sign in to comment.