Professional Documents
Culture Documents
Table 2: Comparison of the four encodings described in Section 2.2. The column Variables refers to the
number of binary variables required to represent a particular problem. The column Largest integer refers
to a worst-case estimate of the largest integer that could be represented based on the limitation
imposed by
the noise level and the ratio between the largest and smallest problem coefficients and n 1/ .
The results for a range of portfolio optimization problems all problems. Results with these improvements are presented
are presented in Table 4. For each problem 100 or 200 ran- in Table 6.
dom instances were generated, depending on the hardware These investigations highlight the importance of having
used. Each instance was solved using one call to D-Waves an in-depth understanding of D-Waves quantum annealer
quantum annealer, with 1000 reads per call. All results were in order to be able to achieve the best results possible.
obtained from chips with a hardware graph with 512 qubits
(the number of active qubits was a little smaller). For valida- 2.4 Discussion
tion purposes, each instance was also solved classically using The success rate and the ability to solve larger problems
an exhaustive integer solver to find the optimal solution.2 are affected by certain hardware parameters of the quantum
As a solution metric we used the percentage of instances annealer. First, there is a level of intrinsic noise which
for each problem for which the quantum annealers result fell manifests as a misspecification errorthe coefficients of the
within perturbation magnitude % of the optimal solution, problem that the quantum annealer actually solves differ
denoted by S(). This metric was evaluated by perturbing from the problem coefficients by up to . As decreases (in
each instance at least 100 times, by adding Gaussian noise future chip generations), the success rate would increase by
with standard deviation given by % of each eigenvalue of virtue of the quantum annealer solving a problem that is
the problem matrix Q. Each perturbed problem was solved closer to the problem passed to it. In addition, the problem
by an exhaustive solver, and the optimal solutions were col- coefficients on the chip have a set coefficient range, and
lected. If the quantum annealers result for that instance if the specified problem has coefficients outside this range,
fell within the range of optimal values collected, then it was the entire problem is scaled down. This can result in coef-
deemed successful (within a margin of error). This proce- ficients becoming smaller than , affecting the success rate.
dure was repeated for each random problem instance, giving These factors are especially relevant for high-precision prob-
a total success rate for that problem. For the case = 0, lems such as the multi-period portfolio optimization problem
this reduces to defining success as the finding of the optimal solved here.
solution. The quantum annealer has a hardware graph that is
To investigate the dependence of the success rate on the currently very sparse and in general does not match the
noise level and qubit yield of the quantum annealer, several problem graph. In order to solve problems that are denser
problems were solved on two different quantum annealing than the hardware graph, multiple physical qubits are iden-
chips. Results for the second chip, which has a lower noise tified with a single binary variable, at the cost of using more
level and fewer inactive qubits and couplers, are presented physical qubits. In order to force the identified qubits to all
in Table 5. We found an increase in all success rates, as well have the same value, a strong coupling is needed. If the re-
as the ability to solve larger problems. quired coupling is outside the range of the couplings in the
In order to investigate the quality of the solution on soft- problem, the result will be an additional scaling, possibly
ware enhancements, we replaced the embedding solver sup- reducing additional coefficients to less than , again impact-
plied with the D-Wave quantum annealer with a proprietary ing the success rate. Generally, the denser the hardware
embedding solver developed by 1QBit, tuned the identifica- graph, the fewer the identifications needed, and the weaker
tion coupling strength, and combined results from calls with the couplings required to identify the qubits.
multiple random gauges.3 We found a large improvement for To solve larger problems, the number of qubits must be
greater. More qubits would also allow the use of an integer
2
For the larger problems, a heuristic solver was run a large encoding scheme that is less sensitive to noise levels (such
number of times in order to find the optimal solution with as unary encoding versus binary encoding). The fabrica-
high confidence.
3
A gauge transformation is accomplished by assigning +1 or the problem matrix accordingly, such that the optimization
1 to each qubit, and flipping the sign of the coefficients in problem remains unchanged.
N T K encoding vars density qubits chain S(0) S(1) S(2)
2 3 3 binary 12 0.52 31 3 100.00 100.00 100.00
2 2 3 unary 12 0.73 45 4 97.00 100.00 100.00
2 4 3 binary 16 0.40 52 4 96.00 100.00 100.00
2 3 3 unary 18 0.53 76 5 94.50 100.00 100.00
2 2 7 binary 12 0.73 38 4 90.50 100.00 100.00
2 5 3 binary 20 0.33 63 4 89.00 100.00 100.00
2 6 3 binary 24 0.28 74 4 50.00 100.00 100.00
3 2 3 unary 18 0.65 91 6 38.50 80.50 95.50
3 3 3 binary 18 0.45 84 5 35.50 80.50 96.50
3 4 3 binary 24 0.35 106 6 9.50 89.50 100.00
Table 4: Results using D-Waves quantum annealer (with 200 instances per problem): N is the number of
assets, T is the number of time steps, K is the number of units to be allocated at each time step and the
maximum allowed holding (with K = K), encoding refers to the method of encoding the integer problem
into binary variables, vars is the number of binary variables required to encode the given problem, density
is the density of the quadratic couplers, qubits is the number of physical qubits that were used, chain
is the maximum number of physical qubits identified with a single binary variable, and S() refers to the
success rate given a perturbation magnitude % (explained in the text).
Table 5: Results using improved hardware (with 100 instances per problem): lower noise and higher yield.
Columns are as in Table 4.
Table 6: Results using custom-tuned parameters and software (with 200 instances per problem): an improved
embedding solver, fine-tuned identification coupling strengths, and averaging over 5 random gauges (200 reads
per gauge, giving a total of 1000 reads per call). Columns are as in Table 4, and the hardware used was the
same as in that table.
tion process is not perfect, resulting in inactive qubits and ample, with fewer identified qubits) would be expected to
couplers. The more inactive qubits and couplers there are increase the success rateoften the structure of the prob-
on a chip, the lower the effective density and the higher the lem can be exploited in order to find better embeddings.
number of identifications required, which typically reduces In addition, when an embedding is used, there are different
the success rate. ways in which the couplings of the identified qubits should
In addition, custom tuning, through software, can be used be set, controlled by the embedding solver. For exam-
to enhance the results. In particular, when the problem to ple, the strength of the couplings could be fine-tuned further
be solved has a graph that differs from the hardware graph, a to give higher success rates, or tuned separately for each set
mapping, referred to as an embedding, must be found from of identified qubits [23]. Finally, it has been observed that
the problem graph to the hardware graph. The development there is a gauge transformation under which the problem
of sophisticated ways to find better embeddings (for ex- and solution remain invariant, but the success rates vary
strongly (due to imperfections in the chip). Combining re- Applied Superconductivity, IEEE Transactions on,
sults from multiple calls to the solver with random gauges, as 24(4):110, 2014.
we did, could provide a large improvement [23]. Software [5] V. Choi. Minor-embedding in adiabatic quantum
error correction [22, 25, 26, 31], such as majority voting computation: I. the parameter setting problem.
(which we employed) when the identified physical qubits do Quantum Information Processing, 7(5):193209, 2008.
not agree, as well as calibration [24], could also lead to [6] V. Choi. Minor-embedding in adiabatic quantum
improved solutions. computation: Ii. minor-universal graph design.
Quantum Information Processing, 10(3):343353, 2011.
3. CONCLUSIONS [7] M. Corazza and D. Favaretto. On the existence of
solutions to the quadratic mixed-integer
In this limited experiment we have demonstrated the po-
meanvariance portfolio selection problem. European
tential of D-Waves quantum annealer to achieve high suc-
Journal of Operational Research, 176(3):19471960,
cess rates when solving an important and difficult multi-
2007.
period portfolio optimization problem. We have also shown
that it is possible to achieve a considerable improvement in [8] A. Finnila, M. Gomez, C. Sebenik, C. Stenson, and
success rates by fine-tuning the operation of the quantum J. Doll. Quantum annealing: a new method for
annealer. minimizing multidimensional functions. Chemical
Although the current size of problems that can be solved physics letters, 219(5):343348, 1994.
is small, technological improvements in future generations [9] S. Galluccio, J.-P. Bouchaud, and M. Potters.
of quantum annealers are expected to provide the ability to Rational decisions, random matrices and spin glasses.
solve larger problems, and at higher success rates. Physica A: Statistical Mechanics and its Applications,
Since larger problems are expected to be intractable on 259(3):449456, 1998.
classical computers, there is much interest in solving them [10] N. G arleanu and L. H. Pedersen. Dynamic trading
efficiently using quantum hardware. with predictable returns and transaction costs. The
Journal of Finance, 68(6):23092340, 2013.
3.1 Acknowledgments [11] I. Hen, J. Job, T. Albash, T. F. Rnnow, M. Troyer,
The authors would like to thank Marko Bucyk for editing and D. Lidar. Probing for quantum speedup in spin
a draft of this paper, and Robyn Foerster, Pooya Ronagh, glass problems with planted solutions. arXiv preprint
Maxwell Rounds, and Arman Zaribafiyan for their useful arXiv:1502.01663, 2015.
comments, as well as Dominic Marchand for his help with [12] I. Hen and F. M. Spedalieri. Quantum annealing for
the numerical results. This work was supported by 1QB constrained optimization. arXiv preprint
Information Technologies (1QBit) and Mitacs. arXiv:1508.04212, 2015.
[13] N. J. Jobst, M. D. Horniman, C. A. Lucas, G. Mitra,
et al. Computational aspects of alternative portfolio
APPENDIX selection models in the presence of discrete asset choice
A. DEFINITION OF SYMBOLS constraints. Quantitative finance, 1(5):489501, 2001.
The symbols used above are defined in Table 7. In addi- [14] T. Kadowaki and H. Nishimori. Quantum annealing in
tion, we use wt to denote the t-th column of the matrix w the transverse ising model. Physical Review E,
(and similarly for ), and t to denote the covariance ma- 58(5):5355, 1998.
trix (N N ) which is the t-th page of the tensor . For [15] H. G. Katzgraber, F. Hamze, and R. S. Andrist.
convenience of notation, the temporary transaction costs c Glassy chimeras could be blind to quantum speedup:
are represented using the tensor , where tnn = cnt nn Designing better benchmarks for quantum annealing
(and similarly for the permanent price impact c and ). machines. Physical Review X, 4(2):021008, 2014.
The difference in holdings is defined as wt wt wt1 . [16] H. Kellerer, R. Mansini, and M. G. Speranza.
Selecting portfolios with fixed costs and minimum
transaction lots. Annals of Operations Research,
B. REFERENCES 99(1-4):287304, 2000.
[1] R. Almgren and N. Chriss. Optimal execution of [17] A. D. King. Performance of a quantum annealer on
portfolio transactions. Journal of Risk, 3:540, 2001. range-limited constraint satisfaction problems. arXiv
[2] S. Boixo, T. F. Rnnow, S. V. Isakov, Z. Wang, preprint arXiv:1502.02098, 2015.
D. Wecker, D. A. Lidar, J. M. Martinis, and [18] M. L opez de Prado. Generalized optimal trading
M. Troyer. Evidence for quantum annealing with more trajectories: A financial quantum computing
than one hundred qubits. Nature Physics, application. Available at SSRN 2575184, 2015.
10(3):218224, 2014. [19] R. Mansini and M. G. Speranza. Heuristic algorithms
[3] P. Bonami and M. A. Lejeune. An exact solution for the portfolio selection problem with minimum
approach for portfolio optimization problems under transaction lots. European Journal of Operational
stochastic and integer constraints. Operations Research, 114(2):219233, 1999.
research, 57(3):650670, 2009. [20] V. Martin-Mayor and I. Hen. Unraveling quantum
[4] P. I. Bunyk, E. M. Hoskinson, M. W. Johnson, annealers using classical hardness. arXiv preprint
E. Tolkacheva, F. Altomare, A. J. Berkley, R. Harris, arXiv:1502.02494, 2015.
J. P. Hilton, T. Lanting, A. J. Przybysz, et al. [21] C. C. McGeoch and C. Wang. Experimental
Architectural considerations in the design of a evaluation of an adiabiatic quantum system for
superconducting quantum annealing processor.
Symbol Type Description
K N1 Number of units to be allocated at each time step
K N1 Largest allowed holding for any asset
N N1 Number of assets
T N1 Number of time steps
RNT Forecast mean returns of each asset at each time step
R Risk aversion
RT NN Forecast covariance matrix for each time step
c RNT Permanent market impact coefficients for each asset at each time step
c RNT Transaction cost coefficients for each asset at each time step
w0 NN0 Initial holdings for each asset
wT +1 NN0 Final holdings for each asset
w NNT
0 Holdings for each asset at each time step (the trading trajectory)