Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/XanaduAI/quantum-inspired-algorithms
/ functions
Functions
14 in github.com/XanaduAI/quantum-inspired-algorithms
⨍
Functions
14
◇
Types & classes
0
↓ 4 callers
Function
ls_probs
r"""Function generating the length-squared (LS) probability distributions for sampling matrix A. Args: m (int): number of rows of matrix
quantum_inspired.py:21
↓ 4 callers
Function
sample_C
r"""Function used to generate matrix C by performing LS sampling of rows and columns of matrix A. Args: A (array[complex]): rectangular,
quantum_inspired.py:59
↓ 4 callers
Function
uvl_vector
r""" Function to reconstruct right-singular vector of matrix A Args: l (int): singular vector index A (array[complex]): rectangul
quantum_inspired.py:363
↓ 3 callers
Function
print_output
r""" Function printing out numerical results and running times Args: r (int): number of sampled rows from matrix A c (int): numbe
quantum_inspired.py:463
↓ 3 callers
Function
sample_from_x
r""" Function to perform LS sampling of the solution vector :math: '\bm{x}' Args: A (array[complex]): rectangular, in general, complex ma
quantum_inspired.py:278
↓ 2 callers
Function
approx_solution
r""" Function to compute the approximated value for a specific entry of the solution vector :math: '\widetilde{x}_\mathrm{comp}' for the system of
quantum_inspired.py:395
↓ 2 callers
Function
sample_me_rsys
r""" Function to estimate the coefficients :math: '\lambda_l = \langle A_\mathrm{user}^\mathrm{T}, v^l \rangle' Args: A (array[complex]):
quantum_inspired.py:212
↓ 1 callers
Function
approx_solution_rsys
r""" Function to compute the matrix element :math: 'A_{\mathrm{user}, \mathrm{comp}}' of the preference matrix A Args: A (array[complex])
quantum_inspired.py:430
↓ 1 callers
Function
sample_me_lsyst
r""" Function to estimate the coefficients :math: '\lambda_l = \langle v^l \vert A^\dagger \vert b \rangle' Args: A (array[complex]): rec
quantum_inspired.py:142
Function
linear_eqs
r""" Function to solve the the linear system of equations :math:'A \bm{x} = b' using the quantum-inspired algorithm Args: A (array[co
quantum_inspired.py:524
Function
linear_eqs_fkv
r""" Function to solve the the linear system of equations :math:'A \bm{x} = b' using FKV algorithm and a direct calculation of the coefficients :m
quantum_inspired.py:785
Function
linear_eqs_portopt
r""" Function to optimize the portfolio allocation vector for different assets for a given expected return Args: A (array[complex]):
quantum_inspired.py:697
Function
recomm_syst
r""" Function to compute missing entries of preference matrix row :math: 'A_{\mathrm{user}.}' for the user "user" Args: A (array[complex]
quantum_inspired.py:611
Function
vl_vector
r""" Function to reconstruct right-singular vector of matrix A Args: l (int): singular vector index A (array[complex]): rectangul
quantum_inspired.py:335