Skip to content

Commit

Permalink
test mps simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
multiphaseCFD committed May 15, 2024
1 parent 3b2e6cb commit e3927fe
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ TEMPLATE_TEST_CASE("[Identity]", "[StateVectorCudaManaged_Expval]", float,
mps_state.applyOperations({{"Hadamard"}, {"CNOT"}, {"CNOT"}},
{{0}, {0, 1}, {1, 2}},
{{false}, {false}, {false}});
mps_state.get_final_state();
auto ob = NamedObs<StateTensorT>("Identity", {0});
auto res = measure.expval(ob, mps_state);
CHECK(res.real() == Approx(ONE));
Expand Down

0 comments on commit e3927fe

Please sign in to comment.