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
@@ -311,7 +311,7 @@ Returns the `n`-qubit [W-state](https://en.wikipedia.org/wiki/W_state):
311
311
If you want to keep type stability, it is recommended to use `w_state(Val(n))` instead of `w_state(n)`. See [this link](https://docs.julialang.org/en/v1/manual/performance-tips/#man-performance-value-type) and the [related Section](@ref doc:Type-Stability) for more details.
312
312
"""
313
313
functionw_state(::Val{n}) where {n}
314
-
(n >=2) ||throw(DomainError("Invalid argument n, must satisfy: n ≥ 2"))
314
+
(n >=2) ||throw(ArgumentError("Invalid argument n, must satisfy: n ≥ 2"))
315
315
316
316
nzind =2.^ (0:(n-1)) .+1
317
317
nzval =fill(ComplexF64(1/sqrt(n)), n)
@@ -336,8 +336,8 @@ Here, `d` specifies the dimension of each qudit. Default to `d=2` (qubit).
336
336
If you want to keep type stability, it is recommended to use `ghz_state(Val(n))` instead of `ghz_state(n)`. See [this link](https://docs.julialang.org/en/v1/manual/performance-tips/#man-performance-value-type) and the [related Section](@ref doc:Type-Stability) for more details.
337
337
"""
338
338
functionghz_state(::Val{n}; d::Int=2) where {n}
339
-
(n >=2) ||throw(DomainError("Invalid argument n, must satisfy: n ≥ 2"))
340
-
(d >=2) ||throw(DomainError("Invalid argument d, must satisfy: d ≥ 2"))
339
+
(n >=2) ||throw(ArgumentError("Invalid argument n, must satisfy: n ≥ 2"))
340
+
(d >=2) ||throw(ArgumentError("Invalid argument d, must satisfy: d ≥ 2"))
0 commit comments