| 551 | } |
| 552 | |
| 553 | void test_simulation_state(mlir::MLIRContext *ctx) { |
| 554 | { |
| 555 | std::vector<std::complex<double>> data{M_SQRT1_2, M_SQRT1_2, 0., 0., |
| 556 | 0., 0., 0., 0.}; |
| 557 | auto x = cudaq::state(new FakeDeviceState(data.size(), data.data())); |
| 558 | std::vector<void *> v = {static_cast<void *>(&x)}; |
| 559 | doSimpleTest(ctx, "!cc.ptr<!quake.state>", v); |
| 560 | } |
| 561 | |
| 562 | // clang-format off |
| 563 | // CHECK: Source module: |
| 564 | // CHECK: func.func private @callee(!cc.ptr<!quake.state>) |
| 565 | // CHECK: Substitution module: |
| 566 | |
| 567 | // CHECK-LABEL: cc.arg_subst[0] { |
| 568 | // CHECK: %[[VAL_1:.*]] = arith.constant {{.*}} : i64 |
| 569 | // CHECK: %[[VAL_2:.*]] = cc.cast %[[VAL_1]] : (i64) -> !cc.ptr<!quake.state> |
| 570 | // CHECK: } |
| 571 | // clang-format on |
| 572 | } |
| 573 | |
| 574 | void test_combinations(mlir::MLIRContext *ctx) { |
| 575 | { |
no test coverage detected