# Design a quantum circuit from a matrix

I have unitary matrix and I would find the quantum circuit associated. There are 3 qubits input so it's a 8x8 matrix but it's not a simple operation. The number of gates is not specified.

Is there a universal method ? Matrix decomposition with a software ?

Thank you!

• As far as I know, there is no such thing - the branch of interest is sometimes called "quantum compiling". A method you could look into is the cosine-sine decomposition, but I don't have a good link... – Martin Apr 1 '14 at 11:42
• For any given unitary operator, there are many quantum computational networks (it is not a circuit since nothing is going in a loop) that would produce that unitary operator. A quantum computational gate is universal if, by composing instance of that gate you can produce any unitary operator to any degree of accuracy you like. The vast majority of two-qubit gates are universal: arxiv.org/abs/quant-ph/9505018. So you need to be more specific about what kind of decomposition you want. What gate or set of gates do you want to use? – alanf Apr 1 '14 at 11:57
• Maybe you can find a basis of matrix and then write it in sums of them (as you do for vectors) – Antonio Ragagnin Apr 1 '14 at 12:07
• In fact, I don't need to prove something. I have a given matrix and I have to design the corresponding quantum circuit. But it's a 8x8 matrix and it's no easy to see which operators (H,Z,C-U,...) I need. But I think the matrix M can be written as M = U_1*U_2*...*U_n where U_i are unitary operators but I don't know if there is a universal method for these problem ^^ – user43639 Apr 1 '14 at 12:08