Skip to content

Commit e6e12cb

Browse files
Fix another typo
1 parent dd81229 commit e6e12cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qobj/states.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function fock(N::Int, j::Int = 0; dims::Union{Int,AbstractVector{Int},Tuple} = N
3737
if getVal(sparse)
3838
array = sparsevec([j + 1], [1.0 + 0im], N)
3939
else
40-
array = [i == j ? 1.0 + 0im : 0.0 + 0im for i in 1:N]
40+
array = [i == (j+1) ? 1.0 + 0im : 0.0 + 0im for i in 1:N]
4141
end
4242
return QuantumObject(array; type = Ket, dims = dims)
4343
end

0 commit comments

Comments
 (0)