doc: improve docstrings related to TensorNetworkResult
This commit is contained in:
@@ -126,9 +126,6 @@ class QMatchaTeaBackend(QibotnBackend, NumpyBackend):
|
|||||||
prob_type = "U"
|
prob_type = "U"
|
||||||
prob_kwargs = {"num_samples": 500}
|
prob_kwargs = {"num_samples": 500}
|
||||||
|
|
||||||
# To be sure the setup is correct and no modifications have been done
|
|
||||||
self._setup_qmatchatea_backend()
|
|
||||||
|
|
||||||
# TODO: check
|
# TODO: check
|
||||||
circuit = self._qibocirc_to_qiskitcirc(circuit)
|
circuit = self._qibocirc_to_qiskitcirc(circuit)
|
||||||
run_qk_params = qmatchatea.preprocessing.qk_transpilation_params(False)
|
run_qk_params = qmatchatea.preprocessing.qk_transpilation_params(False)
|
||||||
@@ -189,7 +186,9 @@ class QMatchaTeaBackend(QibotnBackend, NumpyBackend):
|
|||||||
(e.g., `X(0)*Y(1)` or `Z(0)*Z(1) + 1.5*Y(2)`).
|
(e.g., `X(0)*Y(1)` or `Z(0)*Z(1) + 1.5*Y(2)`).
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
qmatchatea.SimulationResult [TEMPORARY]
|
qibotn.TensorNetworkResult class, providing methods to retrieve
|
||||||
|
probabilities, frequencies and state always according to the chosen
|
||||||
|
simulation setup.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# From Qibo to Qiskit
|
# From Qibo to Qiskit
|
||||||
|
|||||||
@@ -10,6 +10,20 @@ from qibotn.backends.abstract import QibotnBackend
|
|||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class TensorNetworkResult:
|
class TensorNetworkResult:
|
||||||
|
"""
|
||||||
|
Object to store and process the output of a Tensor Network simulation of a quantum circuit.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
nqubits (int): number of qubits involved in the simulation;
|
||||||
|
backend (QibotnBackend): specific backend on which the simulation has been performed;
|
||||||
|
measures (dict): measures (if performed) during the tensor network simulation;
|
||||||
|
measured_probabilities (Union[dict, ndarray]): probabilities of the final state
|
||||||
|
according to the simulation;
|
||||||
|
prob_type (str): string identifying the method used to compute the probabilities.
|
||||||
|
Especially useful in case the `QmatchateaBackend` is selected.
|
||||||
|
statevector (ndarray): if computed, the reconstructed statevector.
|
||||||
|
"""
|
||||||
|
|
||||||
nqubits: int
|
nqubits: int
|
||||||
backend: QibotnBackend
|
backend: QibotnBackend
|
||||||
measures: dict
|
measures: dict
|
||||||
|
|||||||
Reference in New Issue
Block a user