datablock()#

static CubicOperator.datablock(states, inputs=None)[source]#

Return the data matrix block corresponding to the operator, the Khatri–Rao product of the state with itself three times: \(\Qhat\odot\Qhat\odot\Qhat\) where \(\Qhat\) is states.

Since \(\Ophat_\ell(\qhat,\u) = \Ohat_{\ell}\d_{\ell}(\qhat,\u)\) with \(\Ohat_{\ell} = \Ghat\) and \(\d_{\ell}(\qhat,\u) = \qhat\otimes\qhat\otimes\qhat\), the data block should be

\[\D\trp = \left[\begin{array}{ccc} \d_{\ell}(\qhat_0,\u_0) & \cdots & \d_{\ell}(\qhat_{k-1},\u_{k-1}) \end{array}\right] = \left[\begin{array}{ccc} \qhat_0\otimes\qhat_0\otimes\qhat_0 & \cdots & \qhat_{k-1}\otimes\qhat_{k-1}\otimes\qhat_{k-1} \end{array}\right] \in \RR^{r^3 \times k}.\]

Internally, a compressed triple Kronecker product with \(r(r+1)(r+2)/2 < r^{2}\) degrees of freedom is used for efficiency, hence the data block is actually

\[\D\trp = \left[\begin{array}{ccc} \qhat_0\tilde{\otimes}\qhat_0\tilde{\otimes}\qhat_0 & \cdots & \qhat_{k-1}\tilde{\otimes}\qhat_{k-1}\tilde{\otimes}\qhat_{k-1} \end{array}\right] \in\RR^{r(r+1)(r+2)/6 \times k}.\]
Parameters
states(r, k) or (k,) ndarray

State vectors. Each column is a single state vector. If one dimensional, it is assumed that \(r = 1\).

inputs(m, k) or (k,) ndarray or None

Input vectors (not used).

Returns
product_(r(r+1)(r+2)/6, k) ndarray

Compressed triple Khatri–Rao product of states with itself.