I am trying to understand quantum computing concepts and have gone through alot of websites and books such as: Quantum Computing by Mikio and https://people.eecs.berkeley.edu/~vazirani/f04quantum/notes/lecture1.pdf So I do understand conceptually how to make measurements but I have enclosed images of a circuit i devised for an example and I am not able to attain the result of stage 5 (which is the output of the 1st two qubits only) when represented as matrices?. No paper/text explains this concept with proper examples. Any help is deeply appreciated. I have posted a similar question on the physics forum but they denied to respond as they assumed it some homework problem and had other issues. I am stuck and unable to move forward from here. Also it is not an assignment or anything. Thank you for your help.