dq.spre
spre(x: QArrayLike) -> QArray
Returns the superoperator formed from pre-multiplication by an operator.
Pre-multiplication by matrix \(A\) is defined by the superoperator \(I_n \otimes A\) in vectorized form: $$ AX \to (I_n \otimes A) \kett{X}. $$
Parameters
-
x
(qarray-like of shape (..., n, n))
–
Operator.
Returns
(qarray of shape (..., n^2, n^2)) Pre-multiplication superoperator.
Examples
>>> dq.spre(dq.destroy(3)).shape
(9, 9)