diff test/LazyTensors/lazy_tensor_operations_test.jl @ 1097:95464a1af340 feature/dissipation_operators

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 10 May 2022 21:14:38 +0200
parents f857057e61e6 2e606d4c0ab1
children f1bb1b6d85dd
line wrap: on
line diff
--- a/test/LazyTensors/lazy_tensor_operations_test.jl	Tue May 10 21:10:31 2022 +0200
+++ b/test/LazyTensors/lazy_tensor_operations_test.jl	Tue May 10 21:14:38 2022 +0200
@@ -181,6 +181,14 @@
 
     @test (Ã∘B̃*ComplexF64[1.,2.,3.,4.])[1] isa ComplexF64
     @test ((Ã∘B̃)'*ComplexF64[1.,2.])[1] isa ComplexF64
+
+    a = 2.
+    v = rand(3)
+    @test a*Ã isa TensorComposition
+    @test a*Ã == Ã*a
+    @test range_size(a*Ã) == range_size(Ã)
+    @test domain_size(a*Ã) == domain_size(Ã)
+    @test a*Ã*v == a.*A*v
 end