I am trying to perform a lattice surgery. Initial state is $|0\rangle+|1\rangle$ and when I perform a smooth merge and split, I think I get $|00\rangle+|11\rangle$ but it doesn't work. Is there something wrong with the code?
include "qelib1.inc";
qreg q1[5];
qreg q2[5];
qreg q3[1];
qreg anc[6];
creg c1[5];
creg c2[5];
creg c3[1];
// initial state |+>
h q1[0];
cx q1[0],q1[3];
reset anc;
h anc[0];
cx anc[0],q1[0];
cx anc[0],q1[1];
cx anc[0],q1[2];
h anc[0];
reset anc;
h anc[0];
cx anc[0],q1[2];
cx anc[0],q1[3];
cx anc[0],q1[4];
h anc[0];
// int bit |+>
h q2[0];
cx q2[0],q2[3];
reset anc;
h anc[0];
cx anc[0],q2[0];
cx anc[0],q2[1];
cx anc[0],q2[2];
h anc[0];
reset anc;
h anc[0];
cx anc[0],q2[2];
cx anc[0],q2[3];
cx anc[0],q2[4];
h anc[0];
// smooth merge
h q3[0];
// Z Stabilizer
reset anc;
h anc[0];
cz anc[0],q1[0];
cz anc[0],q2[3];
cz anc[0],q3[0];
h anc[0];
reset anc;
h anc[0];
cz anc[0],q1[1];
cz anc[0],q2[4];
cz anc[0],q3[0];
h anc[0];
measure q3[0] -> c3[0];
measure q1[0] -> c1[0];
measure q1[1] -> c1[1];
measure q1[2] -> c1[2];
measure q1[3] -> c1[3];
measure q1[4] -> c1[4];
measure q2[0] -> c2[0];
measure q2[1] -> c2[1];
measure q2[2] -> c2[2];
measure q2[3] -> c2[3];
measure q2[4] -> c2[4];