You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -534,7 +536,7 @@ Generates a discrete Fourier transform matrix ``\hat{F}_N`` for [Quantum Fourier
534
536
535
537
The `dimensions` can be either the following types:
536
538
- `dimensions::Int`: Number of basis states in the Hilbert space.
537
-
- `dimensions::Union{AbstractVector{Int},Tuple}`: list of dimensions representing the each number of basis in the subsystems.
539
+
- `dimensions::Union{Dimensions,AbstractVector{Int},Tuple}`: list of dimensions representing the each number of basis in the subsystems.
538
540
539
541
``N`` represents the total dimension, and therefore the matrix is defined as
540
542
@@ -555,7 +557,7 @@ where ``\omega = \exp(\frac{2 \pi i}{N})``.
555
557
It is highly recommended to use `qft(dimensions)` with `dimensions` as `Tuple` or `SVector` to keep type stability. See the [related Section](@ref doc:Type-Stability) about type stability for more details.
Copy file name to clipboardExpand all lines: src/qobj/states.jl
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,13 @@ Returns a zero [`Ket`](@ref) vector with given argument `dimensions`.
14
14
15
15
The `dimensions` can be either the following types:
16
16
- `dimensions::Int`: Number of basis states in the Hilbert space.
17
-
- `dimensions::Union{AbstractVector{Int}, Tuple}`: list of dimensions representing the each number of basis in the subsystems.
17
+
- `dimensions::Union{Dimensions,AbstractVector{Int}, Tuple}`: list of dimensions representing the each number of basis in the subsystems.
18
18
19
19
!!! warning "Beware of type-stability!"
20
20
It is highly recommended to use `zero_ket(dimensions)` with `dimensions` as `Tuple` or `SVector` to keep type stability. See the [related Section](@ref doc:Type-Stability) about type stability for more details.
@@ -71,13 +71,13 @@ Generate a random normalized [`Ket`](@ref) vector with given argument `dimension
71
71
72
72
The `dimensions` can be either the following types:
73
73
- `dimensions::Int`: Number of basis states in the Hilbert space.
74
-
- `dimensions::Union{AbstractVector{Int},Tuple}`: list of dimensions representing the each number of basis in the subsystems.
74
+
- `dimensions::Union{Dimensions,AbstractVector{Int},Tuple}`: list of dimensions representing the each number of basis in the subsystems.
75
75
76
76
!!! warning "Beware of type-stability!"
77
77
If you want to keep type stability, it is recommended to use `rand_ket(dimensions)` with `dimensions` as `Tuple` or `SVector` to keep type stability. See the [related Section](@ref doc:Type-Stability) about type stability for more details.
returnQuantumObject(normalize!(ψ); type = Ket, dims = dimensions)
@@ -144,13 +144,13 @@ Returns the maximally mixed density matrix with given argument `dimensions`.
144
144
145
145
The `dimensions` can be either the following types:
146
146
- `dimensions::Int`: Number of basis states in the Hilbert space.
147
-
- `dimensions::Union{AbstractVector{Int},Tuple}`: list of dimensions representing the each number of basis in the subsystems.
147
+
- `dimensions::Union{Dimensions,AbstractVector{Int},Tuple}`: list of dimensions representing the each number of basis in the subsystems.
148
148
149
149
!!! warning "Beware of type-stability!"
150
150
If you want to keep type stability, it is recommended to use `maximally_mixed_dm(dimensions)` with `dimensions` as `Tuple` or `SVector` to keep type stability. See the [related Section](@ref doc:Type-Stability) about type stability for more details.
0 commit comments