Skip to content

dq.sprepost

sprepost(x: QArrayLike, y: QArrayLike) -> QArray

Returns the superoperator formed from pre- and post-multiplication by operators.

Pre-multiplication by matrix AA and post-multiplication by matrix BB is defined by the superoperator BTAB^\mathrm{T} \otimes A in vectorized form: AXB(BTA)X ⁣. AXB \to (B^\mathrm{T} \otimes A) \kett{X}.

Parameters

  • x (qarray-like of shape (..., n, n))

    Operator for pre-multiplication.

  • y (qarray-like of shape (..., n, n))

    Operator for post-multiplication.

Returns

(Qarray of shape (..., n^2, n^2)) Pre- and post-multiplication superoperator.

Examples

>>> dq.sprepost(dq.destroy(3), dq.create(3)).shape
(9, 9)