qiskit.finance.applications.ising.portfolio¶
Convert portfolio optimization instances into Pauli list
Functions
|
get qubit op |
|
returns portfolio expected value |
|
returns portfolio value |
|
returns portfolio variance |
|
Generate random model (mu, sigma) for portfolio optimization problem. |
-
get_operator
(mu, sigma, q, budget, penalty)[Quellcode]¶ get qubit op
-
portfolio_expected_value
(x, mu)[Quellcode]¶ returns portfolio expected value
-
portfolio_value
(x, mu, sigma, q, budget, penalty)[Quellcode]¶ returns portfolio value
-
portfolio_variance
(x, sigma)[Quellcode]¶ returns portfolio variance
-
random_model
(n, seed=None)[Quellcode]¶ Generate random model (mu, sigma) for portfolio optimization problem.
- Parameter
n (int) – number of assets.
seed (int or None) – random seed - if None, will not initialize.
- Rückgabe
expected return vector numpy.ndarray: covariance matrix
- Rückgabetyp
numpy.narray