1 #include "gtest/gtest.h"
2 #include "qpp.h"
3 
4 using namespace qpp;
5 
6 // Unit testing reported issues and pull requests
7 
8 /******************************************************************************/
9 TEST(qpp_PR, 110) {
10     auto const state = (0_ket + 1_ket).normalized().eval();
11     auto const res = measure(state, gt.Id2);
12     auto const& resulting_states = std::get<ST>(res);
13 
14     EXPECT_EQ(resulting_states[0][0], 1.);
15     EXPECT_EQ(resulting_states[1][1], 1.);
16 }
17 /******************************************************************************/
18 TEST(qpp_PR, 113) {
19     auto circuit = QCircuit{1, 1};
20     circuit.measureV(gt.Id2, 0, 0);
21 
22     auto engine = QEngine{circuit};
23     EXPECT_NO_THROW(engine.execute());
24 }
25 /******************************************************************************/
26