# Tag Info

3

I changed the stock parameter to a list of strings and added the line stockmarket = StockMarket.NASDAQ as such: num_assets = 4 # Generate expected return and covariance matrix from (random) time-series stocks = ['MSFT', 'DIS', 'NKE', 'HD'] data = WikipediaDataProvider( token="xeesvko2fu6Bt9jg-B1T", ...

3

There is a lot of proposition how to use quantum computers in finance, see this question. Your are right that you can simulate Hamiltonians on a quantum computer easier than on classical computer. However, in some cases it is difficult to construct respective quantum circuit. On the other hand, circuits for so-called Ising Hamiltonians used for solution of ...

2

The objective of the portfolio optimization problem is to trade off expected return ($\mu^T x$) with the risk taken ($x^T \Sigma$x). This could be achieved by introducing a constraint on the risk, e.g. $x^T \Sigma x \leq R$, for an acceptable risk level $R$ and then maximize the return under this constraint. However, this is not a QUBO, i.e., it cannot be ...

2

I have not read the full details of the paper, but have attempted to skim over the most relevant bits to the question (i.e. I could easily have missed something). As I read the paper, they are doing some calculation with a fixed size of input, and they repeat it many times (see equation 58). They ask how many times do you have to repeat it to get the same ...

2

Based on comment by DaftWullie and my experience with the algortihm, it seems that a title of the article is misleading. The authors claim that algorithm they proposed is efficient. However, this is true only partialy. The authors devised only part of an algorithm for solving TSP. In particular, they are able to calculate length of a Hamiltonian cycle ...

2

One thing that I noticed. If cu3 gate from $q[2]$ to $q[0]$ is some $U$, then the cu3 from $q[2]$ to $q[0]$ should be $U^2$ in the phase estimation algorithm, but the comparisons of operators with the help of numpy.array showed me that it's not true here. I tried to implement by replacing cu3 part of the QASM code with the following: cu3(1.6, -1.12, 2.03) q[...

2

There are tutorials for a lot of the Qiskit Aqua functions kept in the tutorials repository, and I think this talks about the finance problem you are interested in. All of these tutorials are also available on the IBM Q Experience where you can run them in a browser.

2

From "Supervised Learning with Quantum Computers" by M. Schuld & F. Petruccione (p. 157):

2

Hamiltonian is the basic building block for VQE algorithm. Basically, we try to minimize the expectation of the Hamiltonian to find the lowest eigenvalue of the Hamiltonian matrix which is apparently very useful for many problems ranging from chemistry to finance. Find more details on: https://arxiv.org/pdf/1907.04769.pdf

2

Firstly, you might be interested in paper Elementary gates for quantum computation explaining how complex gates can be decomposed to simpler ones. This would allow you understand how the matrix $U_j$ is decomposed. Before we proceeed further, we have to define gate $U1$ used on IBM Q computer: $$U1(\lambda)= \begin{pmatrix} 1 & 0 \\ 0 & e^{i\lambda} ... 2 Problem solving in Ocean framework goes by modeling the problem into a BinaryQuadraticModel. The pure quantum samplers natively only understand this model. For the hybrid samplers (Leap) one can model the problem into DiscreteQuadraticModel. The bias are the linear terms in those models objective functions. They are derived with respect to the problem after ... 2 The budget constraint is only added as a penalty term (multiplied by ‘penalty’ coefficient) in the Hamiltonian and does not enforce equality. This means the objective function is$$ \text{min}_{x\in\{0,1\}^n} \hspace{0.5em} q x^T \Sigma x - \mu^T x + \text{penalty} \cdot (B - 1^T x)^2$$1 I made a start and end_operation point with the method now(). At the end of the operation it will display the time it needed: from qiskit.utils import algorithm_globals from time import time as now algorithm_globals.random_seed = 1234 backend = provider.get_backend('ibmq_belem') #backend = Aer.get_backend('statevector_simulator') cobyla = COBYLA() cobyla.... 1 Several quantum circuit representations for common distributions are given in uncertainty models. For generic probability distributions, you can train a quantum circuit representation using quantum generative adversarial networks. For a respective tutorial, please see here. 1 The quick answer to your problem is to install Qiskit Aqua directly from GitHub instead of via pip. On the lastest master version, this bug is fixed. You can do this using git clone https://github.com/Qiskit/qiskit-aqua cd qiskit-aqua pip install . more detailed instructions are given on Qiskit's webpage. As to why you're getting this error: This comes ... 1 The Ising model is a formulation of your problem. Variables are variables s_i that can take +1/-1 values.$$ $$\text{E}_{ising}(s) = \sum_{i=1}^N h_i s_i + \sum_{i=1}^N \sum_{j=i+1}^N J_{i,j} s_i s_j$$ $$For a quantum form, we use spin operators \sigma^z, giving you an Ising Hamiltonian, whose eigenvalues correspond to the ... 1 I had to exchange len(qr_state) with num_uncertainty_qubits in the code you posted # in run_ae_for_cdf ae_var = IterativeAmplitudeEstimation(state_preparation=state_preparation, epsilon=epsilon, alpha=alpha, objective_qubits=[num_uncertainty_qubits]) but then for me ... 1 I think it would be also useful to see your Quantum Circuit using %matplotlib inline and qc.draw('mpl') to see whether all gates are correctly connected. I had a similar problem with QAE and figured out by using this method that the order of qubits I tried to append the IntegerComparator onto was wrong. Cheers 1 I am also working with IterativeAmplitudeEstimation in qiskit. I was able to run QAE for 'Credit Analysis with Quantum Computing' as described in https://qiskit.org/documentation/tutorials/finance/09_credit_risk_analysis.html by preparing the quantum circuits from scratch. But when using the libraries as described on the page I got many errors (see below). I ... 1 Qiskit has a tutorial documentation about TSP, you can find more detail at that site. As for the problem of your code, I suggest you use the qiskit-built function tsp.random_tsp(3,seed=123) # 3 for three cities to generate the route, instead of a single distance matrix you have written. Because tsp.random_tsp(3,seed=123) generates the coordinates and ... 1 May be this should be added as a comment, but I do not have the privilege to add comments. Any way, I ran your code as it is and there was no errors: Order: (0, 1, 2, 3) Distance: 720 Order: (0, 1, 3, 2) Distance: 731 Order: (0, 2, 1, 3) Distance: 873 Order: (0, 2, 3, 1) Distance: 731 Order: (0, 3, 1, 2) Distance: 873 Order: (0, 3, 2, 1) ... 1 First, check whether or not the output you are creating is phase sensitive or not. If it's not (e.g. you only use it to control operations and are going to uncompute it later), then you can prepare it much more efficiently by using classical sampling methods and making them reversible. For example, you can use a quantum variant of alias sampling (as ... 1 From this paper: Entanglement types for two-qubit states with real amplitudes there is a theorem on page 3 that said that: If we consider the subsets of two qubits states RQ_2 given by$$\{ |w\rangle = w_1 |00 \rangle + w_2 |01\rangle + w_2|10 \rangle + w_4|11\rangle : w_i \in \mathbb{R} \}  then for any pair of states $|\phi_1 \rangle$ and $|\phi_2 \... 1 Please have a look at article Transformation of quantum states using uniformly controlled rotations, chapters 1 and 2. These provides you with construction of general rotation gate controlled by$n$qubits with different rotations angles for each basis state$|x\rangle\$. You also might be interested in some of these articles on quantum computers application ...

1

Here are two more papers that may be of interest: A Quantum Algorithm For Linear PDEs Arising In Finance Dynamic Portfolio Optimization with Real Datasets Using Quantum Processors and Quantum-Inspired Tensor Networks

1

There are many Qiskit notebooks on quatum computers application in different areas, including finance, in IBM Q web interface. For application in finance, click on icon Qiskit Notebooks, then folder Advanced -> Aqua -> Finance. Here is also website dedicated to quantum computing application in finance: Quantum for Quants.

Only top voted, non community-wiki answers of a minimum length are eligible