intel-qs/unit_test/data/binary_welded_tree.n2s2.qasmf

18341 lines
238 KiB
Plaintext

.malloc 25
qubit scratch0a
qubit scratch1a
qubit scratch2a
qubit addsub0a
qubit ancl0a
qubit weldctrl0a
qubit childctrl0a
qubit root0a
qubit even0a
qubit isparent0a
qubit ischild0a
qubit ismatch0a
qubit direction0a
qubit g0a
qubit g1a
qubit h0a
qubit a0
qubit a1
qubit a2
qubit a3
qubit b0
qubit b1
qubit b2
qubit b3
qubit r0
cbit EXIT0
cbit EXIT1
cbit EXIT2
cbit EXIT3
PrepZ r0
PrepZ a0
X a0
PrepZ b0
PrepZ a1
PrepZ b1
PrepZ a2
PrepZ b2
PrepZ a3
PrepZ b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
X a0
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X a0
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
CNOT ischild0a,even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
CNOT ischild0a,even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
H isparent0a
Tdag even0a
T a0
T isparent0a
CNOT a0,even0a
CNOT even0a,isparent0a
Tdag even0a
CNOT isparent0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T isparent0a
CNOT even0a,isparent0a
S even0a
CNOT isparent0a,a0
CNOT a0,even0a
H isparent0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X a0
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X a0
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ h0a
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X r0
X h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
CNOT h0a,r0
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
T h0a
H h0a
X r0
X b3
H h0a
Tdag a3
T b3
T h0a
CNOT b3,a3
CNOT a3,h0a
Tdag a3
CNOT h0a,b3
CNOT a3,b3
Tdag a3
Tdag b3
T h0a
CNOT a3,h0a
S a3
CNOT h0a,b3
CNOT b3,a3
H h0a
X b3
X b2
H h0a
Tdag a2
T b2
T h0a
CNOT b2,a2
CNOT a2,h0a
Tdag a2
CNOT h0a,b2
CNOT a2,b2
Tdag a2
Tdag b2
T h0a
CNOT a2,h0a
S a2
CNOT h0a,b2
CNOT b2,a2
H h0a
X b2
X b1
H h0a
Tdag a1
T b1
T h0a
CNOT b1,a1
CNOT a1,h0a
Tdag a1
CNOT h0a,b1
CNOT a1,b1
Tdag a1
Tdag b1
T h0a
CNOT a1,h0a
S a1
CNOT h0a,b1
CNOT b1,a1
H h0a
X b1
X b0
H h0a
Tdag a0
T b0
T h0a
CNOT b0,a0
CNOT a0,h0a
Tdag a0
CNOT h0a,b0
CNOT a0,b0
Tdag a0
Tdag b0
T h0a
CNOT a0,h0a
S a0
CNOT h0a,b0
CNOT b0,a0
H h0a
X b0
CNOT a0,b0
X b0
S b0
S b0
S b0
H b0
Tdag b0
CNOT b0,a0
T b0
H b0
S b0
X b0
CNOT a0,b0
CNOT a1,b1
X b1
S b1
S b1
S b1
H b1
Tdag b1
CNOT b1,a1
T b1
H b1
S b1
X b1
CNOT a1,b1
CNOT a2,b2
X b2
S b2
S b2
S b2
H b2
Tdag b2
CNOT b2,a2
T b2
H b2
S b2
X b2
CNOT a2,b2
CNOT a3,b3
X b3
S b3
S b3
S b3
H b3
Tdag b3
CNOT b3,a3
T b3
H b3
S b3
X b3
CNOT a3,b3
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
H b0
Tdag isparent0a
T a1
T b0
CNOT a1,isparent0a
CNOT isparent0a,b0
Tdag isparent0a
CNOT b0,a1
CNOT isparent0a,a1
Tdag isparent0a
Tdag a1
T b0
CNOT isparent0a,b0
S isparent0a
CNOT b0,a1
CNOT a1,isparent0a
H b0
H b1
Tdag isparent0a
T a2
T b1
CNOT a2,isparent0a
CNOT isparent0a,b1
Tdag isparent0a
CNOT b1,a2
CNOT isparent0a,a2
Tdag isparent0a
Tdag a2
T b1
CNOT isparent0a,b1
S isparent0a
CNOT b1,a2
CNOT a2,isparent0a
H b1
H b3
Tdag isparent0a
T a3
T b3
CNOT a3,isparent0a
CNOT isparent0a,b3
Tdag isparent0a
CNOT b3,a3
CNOT isparent0a,a3
Tdag isparent0a
Tdag a3
T b3
CNOT isparent0a,b3
S isparent0a
CNOT b3,a3
CNOT a3,isparent0a
H b3
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X direction0a
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
X direction0a
X a3
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
X a3
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
CNOT addsub0a,weldctrl0a
PrepZ scratch0a
PrepZ scratch1a
H b0
Tdag a0
T addsub0a
T b0
CNOT addsub0a,a0
CNOT a0,b0
Tdag a0
CNOT b0,addsub0a
CNOT a0,addsub0a
Tdag a0
Tdag addsub0a
T b0
CNOT a0,b0
S a0
CNOT b0,addsub0a
CNOT addsub0a,a0
H b0
H b1
Tdag a1
T addsub0a
T b1
CNOT addsub0a,a1
CNOT a1,b1
Tdag a1
CNOT b1,addsub0a
CNOT a1,addsub0a
Tdag a1
Tdag addsub0a
T b1
CNOT a1,b1
S a1
CNOT b1,addsub0a
CNOT addsub0a,a1
H b1
H b1
Tdag scratch0a
T addsub0a
T b1
CNOT addsub0a,scratch0a
CNOT scratch0a,b1
Tdag scratch0a
CNOT b1,addsub0a
CNOT scratch0a,addsub0a
Tdag scratch0a
Tdag addsub0a
T b1
CNOT scratch0a,b1
S scratch0a
CNOT b1,addsub0a
CNOT addsub0a,scratch0a
H b1
X a1
H scratch1a
Tdag scratch0a
T a1
T scratch1a
CNOT a1,scratch0a
CNOT scratch0a,scratch1a
Tdag scratch0a
CNOT scratch1a,a1
CNOT scratch0a,a1
Tdag scratch0a
Tdag a1
T scratch1a
CNOT scratch0a,scratch1a
S scratch0a
CNOT scratch1a,a1
CNOT a1,scratch0a
H scratch1a
X a1
X a1
H scratch1a
Tdag a1
T scratch0a
T scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
Tdag a1
CNOT scratch1a,scratch0a
CNOT a1,scratch0a
Tdag a1
Tdag scratch0a
T scratch1a
CNOT a1,scratch1a
S a1
CNOT scratch1a,scratch0a
CNOT scratch0a,a1
H scratch1a
X a1
H addsub0a
Tdag weldctrl0a
T a3
T addsub0a
CNOT a3,weldctrl0a
CNOT weldctrl0a,addsub0a
Tdag weldctrl0a
CNOT addsub0a,a3
CNOT weldctrl0a,a3
Tdag weldctrl0a
Tdag a3
T addsub0a
CNOT weldctrl0a,addsub0a
S weldctrl0a
CNOT addsub0a,a3
CNOT a3,weldctrl0a
H addsub0a
CNOT weldctrl0a,childctrl0a
PrepZ ancl0a
H ancl0a
Tdag weldctrl0a
T g0a
T ancl0a
CNOT g0a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g0a
CNOT weldctrl0a,g0a
Tdag weldctrl0a
Tdag g0a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g0a
CNOT g0a,weldctrl0a
H ancl0a
H b0
Tdag ancl0a
T a0
T b0
CNOT a0,ancl0a
CNOT ancl0a,b0
Tdag ancl0a
CNOT b0,a0
CNOT ancl0a,a0
Tdag ancl0a
Tdag a0
T b0
CNOT ancl0a,b0
S ancl0a
CNOT b0,a0
CNOT a0,ancl0a
H b0
H ancl0a
Tdag weldctrl0a
T g1a
T ancl0a
CNOT g1a,weldctrl0a
CNOT weldctrl0a,ancl0a
Tdag weldctrl0a
CNOT ancl0a,g1a
CNOT weldctrl0a,g1a
Tdag weldctrl0a
Tdag g1a
T ancl0a
CNOT weldctrl0a,ancl0a
S weldctrl0a
CNOT ancl0a,g1a
CNOT g1a,weldctrl0a
H ancl0a
H b1
Tdag ancl0a
T a1
T b1
CNOT a1,ancl0a
CNOT ancl0a,b1
Tdag ancl0a
CNOT b1,a1
CNOT ancl0a,a1
Tdag ancl0a
Tdag a1
T b1
CNOT ancl0a,b1
S ancl0a
CNOT b1,a1
CNOT a1,ancl0a
H b1
H b2
Tdag a2
T weldctrl0a
T b2
CNOT weldctrl0a,a2
CNOT a2,b2
Tdag a2
CNOT b2,weldctrl0a
CNOT a2,weldctrl0a
Tdag a2
Tdag weldctrl0a
T b2
CNOT a2,b2
S a2
CNOT b2,weldctrl0a
CNOT weldctrl0a,a2
H b2
H weldctrl0a
Tdag direction0a
T childctrl0a
T weldctrl0a
CNOT childctrl0a,direction0a
CNOT direction0a,weldctrl0a
Tdag direction0a
CNOT weldctrl0a,childctrl0a
CNOT direction0a,childctrl0a
Tdag direction0a
Tdag childctrl0a
T weldctrl0a
CNOT direction0a,weldctrl0a
S direction0a
CNOT weldctrl0a,childctrl0a
CNOT childctrl0a,direction0a
H weldctrl0a
H b3
Tdag a3
T childctrl0a
T b3
CNOT childctrl0a,a3
CNOT a3,b3
Tdag a3
CNOT b3,childctrl0a
CNOT a3,childctrl0a
Tdag a3
Tdag childctrl0a
T b3
CNOT a3,b3
S a3
CNOT b3,childctrl0a
CNOT childctrl0a,a3
H b3
CNOT b2,childctrl0a
CNOT b3,childctrl0a
CNOT childctrl0a,ischild0a
H b0
Tdag childctrl0a
T direction0a
T b0
CNOT direction0a,childctrl0a
CNOT childctrl0a,b0
Tdag childctrl0a
CNOT b0,direction0a
CNOT childctrl0a,direction0a
Tdag childctrl0a
Tdag direction0a
T b0
CNOT childctrl0a,b0
S childctrl0a
CNOT b0,direction0a
CNOT direction0a,childctrl0a
H b0
H b1
Tdag childctrl0a
T a0
T b1
CNOT a0,childctrl0a
CNOT childctrl0a,b1
Tdag childctrl0a
CNOT b1,a0
CNOT childctrl0a,a0
Tdag childctrl0a
Tdag a0
T b1
CNOT childctrl0a,b1
S childctrl0a
CNOT b1,a0
CNOT a0,childctrl0a
H b1
H b2
Tdag childctrl0a
T a1
T b2
CNOT a1,childctrl0a
CNOT childctrl0a,b2
Tdag childctrl0a
CNOT b2,a1
CNOT childctrl0a,a1
Tdag childctrl0a
Tdag a1
T b2
CNOT childctrl0a,b2
S childctrl0a
CNOT b2,a1
CNOT a1,childctrl0a
H b2
H b3
Tdag childctrl0a
T a3
T b3
CNOT a3,childctrl0a
CNOT childctrl0a,b3
Tdag childctrl0a
CNOT b3,a3
CNOT childctrl0a,a3
Tdag childctrl0a
Tdag a3
T b3
CNOT childctrl0a,b3
S childctrl0a
CNOT b3,a3
CNOT a3,childctrl0a
H b3
X a2
H childctrl0a
Tdag ischild0a
T a2
T childctrl0a
CNOT a2,ischild0a
CNOT ischild0a,childctrl0a
Tdag ischild0a
CNOT childctrl0a,a2
CNOT ischild0a,a2
Tdag ischild0a
Tdag a2
T childctrl0a
CNOT ischild0a,childctrl0a
S ischild0a
CNOT childctrl0a,a2
CNOT a2,ischild0a
H childctrl0a
X a2
X isparent0a
X ischild0a
H r0
Tdag isparent0a
T ischild0a
T r0
CNOT ischild0a,isparent0a
CNOT isparent0a,r0
Tdag isparent0a
CNOT r0,ischild0a
CNOT isparent0a,ischild0a
Tdag isparent0a
Tdag ischild0a
T r0
CNOT isparent0a,r0
S isparent0a
CNOT r0,ischild0a
CNOT ischild0a,isparent0a
H r0
X ischild0a
X isparent0a
X even0a
CNOT ischild0a,even0a
X even0a
X direction0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
H ismatch0a
Tdag even0a
T a0
T ismatch0a
CNOT a0,even0a
CNOT even0a,ismatch0a
Tdag even0a
CNOT ismatch0a,a0
CNOT even0a,a0
Tdag even0a
Tdag a0
T ismatch0a
CNOT even0a,ismatch0a
S even0a
CNOT ismatch0a,a0
CNOT a0,even0a
H ismatch0a
X root0a
H isparent0a
Tdag root0a
T ismatch0a
T isparent0a
CNOT ismatch0a,root0a
CNOT root0a,isparent0a
Tdag root0a
CNOT isparent0a,ismatch0a
CNOT root0a,ismatch0a
Tdag root0a
Tdag ismatch0a
T isparent0a
CNOT root0a,isparent0a
S root0a
CNOT isparent0a,ismatch0a
CNOT ismatch0a,root0a
H isparent0a
X root0a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
H even0a
Tdag scratch2a
T a2
T even0a
CNOT a2,scratch2a
CNOT scratch2a,even0a
Tdag scratch2a
CNOT even0a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T even0a
CNOT scratch2a,even0a
S scratch2a
CNOT even0a,a2
CNOT a2,scratch2a
H even0a
X scratch2a
CNOT scratch2a,scratch1a
CNOT scratch2a,scratch0a
X scratch2a
H scratch0a
Tdag scratch2a
T a1
T scratch0a
CNOT a1,scratch2a
CNOT scratch2a,scratch0a
Tdag scratch2a
CNOT scratch0a,a1
CNOT scratch2a,a1
Tdag scratch2a
Tdag a1
T scratch0a
CNOT scratch2a,scratch0a
S scratch2a
CNOT scratch0a,a1
CNOT a1,scratch2a
H scratch0a
X scratch2a
CNOT scratch2a,scratch1a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
PrepZ scratch0a
PrepZ scratch1a
PrepZ scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
CNOT scratch1a,scratch2a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch0a,scratch1a
X scratch0a
CNOT root0a,scratch0a
CNOT even0a,scratch0a
X scratch0a
CNOT scratch0a,scratch1a
X scratch1a
H scratch0a
Tdag scratch1a
T a1
T scratch0a
CNOT a1,scratch1a
CNOT scratch1a,scratch0a
Tdag scratch1a
CNOT scratch0a,a1
CNOT scratch1a,a1
Tdag scratch1a
Tdag a1
T scratch0a
CNOT scratch1a,scratch0a
S scratch1a
CNOT scratch0a,a1
CNOT a1,scratch1a
H scratch0a
X scratch1a
CNOT scratch1a,scratch2a
X scratch2a
H scratch1a
Tdag scratch2a
T a2
T scratch1a
CNOT a2,scratch2a
CNOT scratch2a,scratch1a
Tdag scratch2a
CNOT scratch1a,a2
CNOT scratch2a,a2
Tdag scratch2a
Tdag a2
T scratch1a
CNOT scratch2a,scratch1a
S scratch2a
CNOT scratch1a,a2
CNOT a2,scratch2a
H scratch1a
X scratch2a
MeasZ a0
MeasZ a1
MeasZ a2
MeasZ a3