implement unitary operation n qubit represent square matrix size 2N nonzero element main diagonal antidiagonal zero element elseFor example N 3 matrix operation follow shapeXXXXXXXXXXXXXXXXHere x denote nonzero element matrix complex number square absolute value greater equal 105 denote zero element matrix complex number square absolute value 105the row column index matrix follow little endian format significant bit index store qubit array thus column matrix give coefficient basis state you ll apply unitary 000rangle basis state second column 100rangle basis state etc you use DumpUnitary tool coefficient matrix unitary implement relative phase column correspond pattern Xs sYou implement operation take array n 2 le N le 5 qubit input apply unitary transformation matrix describe shape if multiple unitarie satisfy requirement implement the output operation pattern matrix coefficient implement testing harness UnitaryPatterns katayour code follow signaturenamespace Solution open MicrosoftQuantumPrimitive open MicrosoftQuantumCanon operation Solve qs Qubit Unit code you allow use measurement operation