Skip to content

How to get classical results from HHL calculation? #6

@lj-cug

Description

@lj-cug

The following Python function was used to get digital results from linear system, the dimension of matrix and vector is 2:

def get_solution_vector(solution):
"""Extracts and normalizes simulated state vector
from LinearSolverResult."""
solution_vector = Statevector(solution.state).data[16:18].real
norm = solution.euclidean_norm
return norm * solution_vector / np.linalg.norm(solution_vector)

How can I get the results from quantum computational results like the above-mentioned function? I am green-hand at HHL.
LI JIAN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions