qiskit.aqua.algorithms.HHL.expand_to_powerdim¶
-
static
HHL.
expand_to_powerdim
(matrix, vector)[source]¶ Expand a matrix to the next-larger 2**n dimensional matrix with ones on the diagonal and zeros on the off-diagonal and expand the vector with zeros accordingly.
- Parameters
matrix (
ndarray
) – the input matrixvector (
ndarray
) – the input vector
- Return type
Tuple
[ndarray
,ndarray
]- Returns
the expanded matrix, the expanded vector