Hi: I'm new to J and am trying to apply a unitary transformation to a collection of column vectors in a single operation. This would probably take a second to the J gurus out there....
Something like: | 0 1 | |1| |0| |0| |1| | 1 0 | dot |0| |1| |1| |0| where "dot" is the matrix product For example, I have defined a 2x2 matrix: pauliX =: 2 2 $ (0 1 1 0) a couple of column vectors qb0 =: 2 1 $ 1 0 qb1 =: 2 1 $ 0 1 and the matrix product dot =: 4 : ' x +/ . * y' and would like to write something like pauliX dot qb1 qb1 qb0 qb0 which should then return four column vectors with their value inverted (or a 2x4 matrix). Should I define a 2xN matrix first? How can I then apply the dot product a 2x2 matrix to each column of a 2xN matrix? Any help/suggestion would be appreciated. thanks Pascal -- We can't solve problems by using the same kind of thinking we used when we created them. - Albert Einstein www.quotator.net ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
