@@ -169,47 +169,67 @@ check_dimensions(A::AbstractQuantumObject...) = check_dimensions(A)
169169
170170function _check_QuantumObject (type:: KetQuantumObject , dimensions:: Dimensions , m:: Int , n:: Int )
171171 (n != 1 ) && throw (DomainError ((m, n), " The size of the array is not compatible with Ket" ))
172- (prod (dimensions) != m) && throw (DimensionMismatch (" Ket with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ))
172+ (prod (dimensions) != m) && throw (
173+ DimensionMismatch (" Ket with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ),
174+ )
173175 return nothing
174176end
175177
176178function _check_QuantumObject (type:: BraQuantumObject , dimensions:: Dimensions , m:: Int , n:: Int )
177179 (m != 1 ) && throw (DomainError ((m, n), " The size of the array is not compatible with Bra" ))
178- (prod (dimensions) != n) && throw (DimensionMismatch (" Bra with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ))
180+ (prod (dimensions) != n) && throw (
181+ DimensionMismatch (" Bra with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ),
182+ )
179183 return nothing
180184end
181185
182186function _check_QuantumObject (type:: OperatorQuantumObject , dimensions:: Dimensions , m:: Int , n:: Int )
183187 L = prod (dimensions)
184- (L == m == n) || throw (DimensionMismatch (" Operator with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ))
188+ (L == m == n) || throw (
189+ DimensionMismatch (
190+ " Operator with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ,
191+ ),
192+ )
185193 return nothing
186194end
187195
188196function _check_QuantumObject (type:: OperatorQuantumObject , dimensions:: GeneralDimensions , m:: Int , n:: Int )
189197 ((m == 1 ) || (n == 1 )) && throw (DomainError ((m, n), " The size of the array is not compatible with Operator" ))
190- ((prod (dimensions. to) != m) || (prod (dimensions. from) != n)) &&
191- throw (DimensionMismatch (" Operator with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ))
198+ ((prod (dimensions. to) != m) || (prod (dimensions. from) != n)) && throw (
199+ DimensionMismatch (
200+ " Operator with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ,
201+ ),
202+ )
192203 return nothing
193204end
194205
195206function _check_QuantumObject (type:: SuperOperatorQuantumObject , dimensions:: Dimensions , m:: Int , n:: Int )
196207 (m != n) && throw (DomainError ((m, n), " The size of the array is not compatible with SuperOperator" ))
197- (prod (dimensions) != sqrt (m)) &&
198- throw (DimensionMismatch (" SuperOperator with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ))
208+ (prod (dimensions) != sqrt (m)) && throw (
209+ DimensionMismatch (
210+ " SuperOperator with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ,
211+ ),
212+ )
199213 return nothing
200214end
201215
202216function _check_QuantumObject (type:: OperatorKetQuantumObject , dimensions:: Dimensions , m:: Int , n:: Int )
203217 (n != 1 ) && throw (DomainError ((m, n), " The size of the array is not compatible with OperatorKet" ))
204- (prod (dimensions) != sqrt (m)) &&
205- throw (DimensionMismatch (" OperatorKet with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ))
218+ (prod (dimensions) != sqrt (m)) && throw (
219+ DimensionMismatch (
220+ " OperatorKet with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ,
221+ ),
222+ )
206223 return nothing
207224end
208225
209226function _check_QuantumObject (type:: OperatorBraQuantumObject , dimensions:: Dimensions , m:: Int , n:: Int )
210227 (m != 1 ) && throw (DomainError ((m, n), " The size of the array is not compatible with OperatorBra" ))
211- (prod (dimensions) != sqrt (n)) &&
212- throw (DimensionMismatch (" OperatorBra with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ))
228+ (prod (dimensions) != sqrt (n)) && throw (
229+ DimensionMismatch (
230+ " OperatorBra with dims = $(_get_dims_string (dimensions)) does not fit the array size = $((m, n)) ." ,
231+ ),
232+ )
213233 return nothing
214234end
215235
0 commit comments