qiskit-documentation/docs/api/qiskit/0.26/qiskit.aqua.algorithms.NumP...

66 lines
3.1 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: NumPyLSsolver
description: API reference for qiskit.aqua.algorithms.NumPyLSsolver
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.aqua.algorithms.NumPyLSsolver
---
# qiskit.aqua.algorithms.NumPyLSsolver
<Class id="qiskit.aqua.algorithms.NumPyLSsolver" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/algorithms/linear_solvers/numpy_ls_solver.py" signature="NumPyLSsolver(matrix, vector)" modifiers="class">
The Numpy LinearSystem algorithm (classical).
This linear system solver computes the eigenvalues of a complex-valued square matrix $A$ of dimension $n \times n$ and the solution to the systems of linear equations defined by $A\overrightarrow{x}=\overrightarrow{b}$ with input vector $\overrightarrow{b}$.
This is a classical counterpart to the [`HHL`](qiskit.aqua.algorithms.HHL "qiskit.aqua.algorithms.HHL") algorithm.
**Parameters**
* **matrix** (`Union`\[`List`\[`List`\[`float`]], `ndarray`]) The input matrix of linear system of equations
* **vector** (`Union`\[`List`\[`float`], `ndarray`]) The input vector of linear system of equations
### \_\_init\_\_
<Function id="qiskit.aqua.algorithms.NumPyLSsolver.__init__" signature="__init__(matrix, vector)">
**Parameters**
* **matrix** (`Union`\[`List`\[`List`\[`float`]], `ndarray`]) The input matrix of linear system of equations
* **vector** (`Union`\[`List`\[`float`], `ndarray`]) The input vector of linear system of equations
</Function>
## Methods
| | |
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [`__init__`](#qiskit.aqua.algorithms.NumPyLSsolver.__init__ "qiskit.aqua.algorithms.NumPyLSsolver.__init__")(matrix, vector) | **type matrix**`Union`\[`List`\[`List`\[`float`]], `ndarray`] |
| [`run`](#qiskit.aqua.algorithms.NumPyLSsolver.run "qiskit.aqua.algorithms.NumPyLSsolver.run")() | Execute the classical algorithm. |
## Attributes
| | |
| ------------------------------------------------------------------------------------------------------ | ---------------------- |
| [`random`](#qiskit.aqua.algorithms.NumPyLSsolver.random "qiskit.aqua.algorithms.NumPyLSsolver.random") | Return a numpy random. |
### random
<Attribute id="qiskit.aqua.algorithms.NumPyLSsolver.random">
Return a numpy random.
</Attribute>
### run
<Function id="qiskit.aqua.algorithms.NumPyLSsolver.run" signature="run()">
Execute the classical algorithm.
**Returns**
results of an algorithm.
**Return type**
dict
</Function>
</Class>