The decompose() function decomposes the encapsulated quantum module into sets of elementary quantum gates. But what is the math behind its operation? For example how is a diag[1,1,1,1,1-1,1,1,1,1] decomposed into the following circuit? If I also want to decompose diag[1,-1,-1,1,1,1,1,-1,1] what will be its laws?

enter image description here



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.