ckron()#
- static CubicOperator.ckron(state)[source]#
Calculate the compressed cubic Kronecker product of a vector with itself.
For a vector \(\qhat = [~\hat{q}_{1}~~\cdots~~\hat{q}_{r}~]\trp\), the cubic Kronecker product of \(\qhat\) with itself is given by
\[\begin{split}\qhat \otimes \qhat \otimes \qhat = \left[\begin{array}{c} \hat{q}_{1}(\qhat \otimes \qhat) \\ \vdots \\ \hat{q}_{r}(\qhat \otimes \qhat) \end{array}\right] \in\RR^{r^3}.\end{split}\]Cross terms \(\hat{q}_i \hat{q}_j \hat{q}_j\) for \(i,j,k\) not all equal appear multiple times in \(\qhat\otimes\qhat\otimes\qhat\). The compressed cubic Kronecker product \(\qhat\,\hat{\otimes}\,\qhat\,\hat{\otimes}\,\qhat\) consists of the unique terms of \(\qhat\otimes\qhat\otimes\qhat\):
\[\begin{split}\qhat\,\hat{\otimes}\,\qhat\,\hat{\otimes}\,\qhat = \left[\begin{array}{c} \hat{q}_{1}^3 \\ \hat{q}_{2}[\![\qhat\,\hat{\otimes}\,\qhat]\!]_{1:2} \\ \vdots \\ \hat{q}_{r}[\![\qhat\,\hat{\otimes}\,\qhat]\!]_{1:r} \end{array}\right] \in \RR^{r(r+1)(r+2)/6}.\end{split}\]See
opinf.operators.QuadraticOperator.ckron()
. For matrices, the product is computed columnwise.- Parameters:
- state(r,) or (r, k) numpy.ndarray
State vector or matrix where each column is a state vector.
- Returns:
- product(r(r+1)(r+2)/6,) or (r(r+1)(r+2)/6, k) ndarray
The compressed triple Kronecker product of
state
with itself.