93 lines
4.1 KiB
Plaintext
93 lines
4.1 KiB
Plaintext
---
|
||
title: LinearSolverResult
|
||
description: API reference for qiskit.algorithms.LinearSolverResult
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.algorithms.LinearSolverResult
|
||
---
|
||
|
||
# qiskit.algorithms.LinearSolverResult
|
||
|
||
<Class id="qiskit.algorithms.LinearSolverResult" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.17/qiskit/algorithms/linear_solvers/linear_solver.py" signature="LinearSolverResult" modifiers="class">
|
||
A base class for linear systems results.
|
||
|
||
The linear systems algorithms return an object of the type `LinearSystemsResult` with the information about the solution obtained.
|
||
|
||
### \_\_init\_\_
|
||
|
||
<Function id="qiskit.algorithms.LinearSolverResult.__init__" signature="__init__()">
|
||
Initialize self. See help(type(self)) for accurate signature.
|
||
</Function>
|
||
|
||
## Methods
|
||
|
||
| | |
|
||
| ----------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||
| [`__init__`](#qiskit.algorithms.LinearSolverResult.__init__ "qiskit.algorithms.LinearSolverResult.__init__")() | Initialize self. |
|
||
| [`combine`](#qiskit.algorithms.LinearSolverResult.combine "qiskit.algorithms.LinearSolverResult.combine")(result) | Any property from the argument that exists in the receiver is updated. |
|
||
|
||
## Attributes
|
||
|
||
| | |
|
||
| --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||
| [`circuit_results`](#qiskit.algorithms.LinearSolverResult.circuit_results "qiskit.algorithms.LinearSolverResult.circuit_results") | return the results from the circuits |
|
||
| [`euclidean_norm`](#qiskit.algorithms.LinearSolverResult.euclidean_norm "qiskit.algorithms.LinearSolverResult.euclidean_norm") | return the euclidean norm if the algorithm knows how to calculate it |
|
||
| [`observable`](#qiskit.algorithms.LinearSolverResult.observable "qiskit.algorithms.LinearSolverResult.observable") | return the (list of) calculated observable(s) |
|
||
| [`state`](#qiskit.algorithms.LinearSolverResult.state "qiskit.algorithms.LinearSolverResult.state") | return either the circuit that prepares the solution or the solution as a vector |
|
||
|
||
### circuit\_results
|
||
|
||
<Attribute id="qiskit.algorithms.LinearSolverResult.circuit_results">
|
||
return the results from the circuits
|
||
|
||
**Return type**
|
||
|
||
`Union`\[`List`\[`float`], `List`\[`Result`]]
|
||
</Attribute>
|
||
|
||
### combine
|
||
|
||
<Function id="qiskit.algorithms.LinearSolverResult.combine" signature="combine(result)">
|
||
Any property from the argument that exists in the receiver is updated. :type result: `AlgorithmResult` :param result: Argument result with properties to be set.
|
||
|
||
**Raises**
|
||
|
||
**TypeError** – Argument is None
|
||
|
||
**Return type**
|
||
|
||
`None`
|
||
</Function>
|
||
|
||
### euclidean\_norm
|
||
|
||
<Attribute id="qiskit.algorithms.LinearSolverResult.euclidean_norm">
|
||
return the euclidean norm if the algorithm knows how to calculate it
|
||
|
||
**Return type**
|
||
|
||
`float`
|
||
</Attribute>
|
||
|
||
### observable
|
||
|
||
<Attribute id="qiskit.algorithms.LinearSolverResult.observable">
|
||
return the (list of) calculated observable(s)
|
||
|
||
**Return type**
|
||
|
||
`Union`\[`float`, `List`\[`float`]]
|
||
</Attribute>
|
||
|
||
### state
|
||
|
||
<Attribute id="qiskit.algorithms.LinearSolverResult.state">
|
||
return either the circuit that prepares the solution or the solution as a vector
|
||
|
||
**Return type**
|
||
|
||
`Union`\[`QuantumCircuit`, `ndarray`]
|
||
</Attribute>
|
||
</Class>
|
||
|