@@ -32,10 +32,6 @@ void allocLargeRegister(QCProgramBuilder& b) { b.allocQubitRegister(100); }
3232void staticQubits (QCProgramBuilder& b) {
3333 const auto q0 = b.staticQubit (0 );
3434 const auto q1 = b.staticQubit (1 );
35-
36- b.h (q0);
37- b.h (q1);
38- b.ctrl (q0, [&] { b.x (q1); });
3935}
4036
4137void staticQubitsWithOps (QCProgramBuilder& b) {
@@ -44,18 +40,6 @@ void staticQubitsWithOps(QCProgramBuilder& b) {
4440
4541 b.h (q0);
4642 b.h (q1);
47- b.ctrl (q0, [&] { b.x (q1); });
48- }
49-
50- void staticQubitsWithDuplicates (QCProgramBuilder& b) {
51- const auto q0a = b.staticQubit (0 );
52- const auto q1a = b.staticQubit (1 );
53- const auto q0b = b.staticQubit (0 );
54- const auto q1b = b.staticQubit (1 );
55-
56- b.h (q0a);
57- b.h (q1a);
58- b.ctrl (q0b, [&] { b.x (q1b); });
5943}
6044
6145void staticQubitsWithParametricOps (QCProgramBuilder& b) {
@@ -82,6 +66,30 @@ void staticQubitsWithInv(QCProgramBuilder& b) {
8266 b.inv ([&]() { b.t (q0); });
8367}
8468
69+ void staticQubitsWithDuplicates (QCProgramBuilder& b) {
70+ const auto q0a = b.staticQubit (0 );
71+ const auto q1a = b.staticQubit (1 );
72+ const auto q0b = b.staticQubit (0 );
73+ const auto q1b = b.staticQubit (1 );
74+
75+ b.rx (std::numbers::pi / 4 ., q0a);
76+ b.p (std::numbers::pi / 2 ., q1a);
77+ b.rzz (0.123 , q0b, q1b);
78+ b.cx (q0b, q1b);
79+ b.inv ([&]() { b.t (q0a); });
80+ }
81+
82+ void staticQubitsCanonical (QCProgramBuilder& b) {
83+ const auto q0 = b.staticQubit (0 );
84+ const auto q1 = b.staticQubit (1 );
85+
86+ b.rx (std::numbers::pi / 4 ., q0);
87+ b.p (std::numbers::pi / 2 ., q1);
88+ b.rzz (0.123 , q0, q1);
89+ b.cx (q0, q1);
90+ b.inv ([&]() { b.t (q0); });
91+ }
92+
8593void allocDeallocPair (QCProgramBuilder& b) {
8694 auto q = b.allocQubit ();
8795 b.dealloc (q);
0 commit comments