| 29 | } |
| 30 | |
| 31 | TEST(Tensor, initialization) { |
| 32 | { |
| 33 | cudaq::complex_matrix m0; |
| 34 | string_equal(m0.to_string(), "\n"); |
| 35 | } |
| 36 | { |
| 37 | cudaq::complex_matrix m1({1., 0., 0., 1.}); |
| 38 | string_equal(m1.to_string(), "(1,0) (0,0)\n(0,0) (1,0)\n"); |
| 39 | } |
| 40 | { |
| 41 | cudaq::complex_matrix m1({1., 2., 3., 4., 5., 6.}, {2, 3}); |
| 42 | string_equal(m1.to_string(), "(1,0) (2,0) (3,0)\n(4,0) (5,0) (6,0)\n"); |
| 43 | } |
| 44 | { |
| 45 | cudaq::complex_matrix m1({1., 2., 3., 4., 5., 6.}, {2, 3}, |
| 46 | cudaq::complex_matrix::order::column_major); |
| 47 | string_equal(m1.to_string(), "(1,0) (3,0) (5,0)\n(2,0) (4,0) (6,0)\n"); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | TEST(Tensor, initializationError) { |
| 52 | { |
nothing calls this directly
no test coverage detected