如何生成“交换”地图又名“交换”地图
我正在寻找一种简单的方法来在 Octave 中生成简单的线性图。我需要的矩阵,称为sigma(n),由以下属性定义:对于所有矩阵A和B(尺寸均为n) 我们有等式:sigma(n) * kron(A,B) = kron(B,A) * sigma(n)
例如,
西格玛(2) = [1,0,0,0; 0,0,1,0; 0,1,0,0; 0,0,0,1]。
是否有一个简单的 sigma(n) 函数?
就我的目的而言,n 将相当小,小于 50,因此效率不是问题。
编辑:现在有了正确的定义方程
I am looking for an easy way to generate a simple linear map in Octave. The matrix I need, call it sigma(n), is defined by the following property: for all matrices A and B (both of dimension n) we have the equation:sigma(n) * kron(A,B) = kron(B,A) * sigma(n)
For example,sigma(2) = [1,0,0,0; 0,0,1,0; 0,1,0,0; 0,0,0,1]
.
Is there a simple function for sigma(n)
?
For my purposes n will be fairly small, less than 50, so efficiency is not a concern.
EDIT: now with the correct defining equation
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我意识到回答自己的问题是一种不好的形式,但是通过少量的挠头,我设法明确地生成了矩阵:
如果有人有更简洁的方法来做到这一点,我仍然感兴趣。
I realise it's bad form to answer one's own question, but with a small amount of head scratching I managed to generate the matrix explicitly:
If anyone has a neater way to do this, I'm still interested.
有趣的问题!
我认为你所要求的完全不可能。然而,这两个克罗内克乘积是相似的,通过一个置换矩阵,即有:
这个置换矩阵是这样的:
Px
的值是通过将 x 逐行放入矩阵中并堆叠得到的结果矩阵的列在一起。编辑 您所要求的证明是不可能的。考虑矩阵
那么两个克罗内克乘积为:
假设您将左侧的第一个矩阵乘以任何矩阵 sigma:最后两列将保持为零,因此结果不能 等于第二个矩阵。量子ED。
Interesting question!
I don't think that what you are asking is exactly possible. However, the two kronecker products are similar, via a permutation matrix, i.e., one has:
This permutation matrix is such that the value of
Px
is obtained by putting x in a matrix row by row, and stacking the columns of that resulting matrix together.Edit A proof that you are asking is not possible. Consider the matrices
Then the two kronecker products are:
Suppose you multiply the first matrix on the left by any matrix sigma: the last two columns will stay at zero, so the result cannot be equal to the second matrix. QED.