├── Examples ├── fourier_transform8qubit_example.sh ├── howToWriteQASMfiles.txt ├── linegraph_example.sh ├── maxcut_example.sh ├── quickbb_treewidth_example.sh └── stochastic_example.sh ├── LICENSE ├── Makefile ├── README.txt ├── Samples ├── 3regRand30Node50.dgf ├── 4regRand20Node1-p1.qasm ├── 4regRand20Node5-p1.qasm ├── 4regRand30Node1-p1.qasm ├── 4regRand30Node26-circ.qasm ├── 4regRand30Node26.dgf ├── 4regRand30Node5-p1.qasm ├── arbitrary2qubitmatrixset │ ├── matrix0.gate │ ├── matrix1.gate │ ├── matrix10.gate │ ├── matrix11.gate │ ├── matrix12.gate │ ├── matrix13.gate │ ├── matrix14.gate │ ├── matrix15.gate │ ├── matrix16.gate │ ├── matrix17.gate │ ├── matrix18.gate │ ├── matrix19.gate │ ├── matrix2.gate │ ├── matrix20.gate │ ├── matrix21.gate │ ├── matrix22.gate │ ├── matrix23.gate │ ├── matrix24.gate │ ├── matrix25.gate │ ├── matrix26.gate │ ├── matrix27.gate │ ├── matrix28.gate │ ├── matrix29.gate │ ├── matrix3.gate │ ├── matrix30.gate │ ├── matrix31.gate │ ├── matrix32.gate │ ├── matrix33.gate │ ├── matrix34.gate │ ├── matrix35.gate │ ├── matrix36.gate │ ├── matrix37.gate │ ├── matrix38.gate │ ├── matrix39.gate │ ├── matrix4.gate │ ├── matrix40.gate │ ├── matrix41.gate │ ├── matrix42.gate │ ├── matrix43.gate │ ├── matrix44.gate │ ├── matrix45.gate │ ├── matrix46.gate │ ├── matrix47.gate │ ├── matrix48.gate │ ├── matrix49.gate │ ├── matrix5.gate │ ├── matrix50.gate │ ├── matrix51.gate │ ├── matrix52.gate │ ├── matrix53.gate │ ├── matrix54.gate │ ├── matrix55.gate │ ├── matrix56.gate │ ├── matrix57.gate │ ├── matrix58.gate │ ├── matrix59.gate │ ├── matrix6.gate │ ├── matrix60.gate │ ├── matrix61.gate │ ├── matrix62.gate │ ├── matrix63.gate │ ├── matrix64.gate │ ├── matrix65.gate │ ├── matrix66.gate │ ├── matrix67.gate │ ├── matrix68.gate │ ├── matrix69.gate │ ├── matrix7.gate │ ├── matrix70.gate │ ├── matrix71.gate │ ├── matrix72.gate │ ├── matrix73.gate │ ├── matrix74.gate │ ├── matrix75.gate │ ├── matrix76.gate │ ├── matrix77.gate │ ├── matrix78.gate │ ├── matrix79.gate │ ├── matrix8.gate │ ├── matrix80.gate │ ├── matrix81.gate │ ├── matrix82.gate │ ├── matrix83.gate │ ├── matrix84.gate │ ├── matrix85.gate │ ├── matrix86.gate │ ├── matrix87.gate │ ├── matrix88.gate │ ├── matrix89.gate │ ├── matrix9.gate │ ├── matrix90.gate │ ├── matrix91.gate │ ├── matrix92.gate │ ├── matrix93.gate │ ├── matrix94.gate │ ├── matrix95.gate │ ├── matrix96.gate │ ├── matrix97.gate │ ├── matrix98.gate │ └── matrix99.gate ├── arbitraryGateExample.qasm ├── bell_pair.qasm ├── catState100Qubits.qasm ├── catStateEightQubits.qasm ├── contract_using_linegraph_example.inp ├── contract_using_stochastic_example.inp ├── control_phase.qasm ├── cz.gate ├── hadamard.qasm ├── measure125.txt ├── measureSampleOne.txt ├── measureSampleThree.txt ├── measureSampleTwo.txt ├── qft4.qasm ├── qft8.qasm ├── qft8qubitScript.inp ├── rand-nq6-cn2-d10_rx.qasm ├── rand-nq6-cn2-d10_rxyz.qasm ├── rand-nq6-cn2-d10_rxz.qasm ├── rotationRz.qasm ├── s.gate ├── swap.qasm ├── t.gate ├── tdagger.gate ├── teleportation.qasm ├── test_JW.qasm ├── tofolli.qasm ├── treewidth_example.inp └── zee.gate ├── XregGraphGen ├── GraphNode.h ├── Makefile └── main.cpp ├── bin ├── quickbb_32 └── quickbb_64 ├── nlopt-2.4.2 ├── .libs │ ├── libnlopt.0.dylib │ ├── libnlopt.a │ ├── libnlopt.dylib │ ├── libnlopt.la │ └── libnlopt.lai ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── TODO ├── aclocal.m4 ├── api │ ├── .deps │ │ ├── deprecated.Plo │ │ ├── f77api.Plo │ │ ├── general.Plo │ │ ├── optimize.Plo │ │ └── options.Plo │ ├── .libs │ │ ├── deprecated.o │ │ ├── f77api.o │ │ ├── general.o │ │ ├── libapi.a │ │ ├── libapi.la │ │ ├── optimize.o │ │ └── options.o │ ├── Makefile.am │ ├── Makefile.in │ ├── deprecated.c │ ├── f77api.c │ ├── f77funcs.h │ ├── f77funcs_.h │ ├── general.c │ ├── nlopt-in.hpp │ ├── nlopt-internal.h │ ├── nlopt.3 │ ├── nlopt.f │ ├── nlopt.h │ ├── nlopt.hpp │ ├── optimize.c │ └── options.c ├── auglag │ ├── .deps │ │ └── auglag.Plo │ ├── .libs │ │ ├── auglag.o │ │ ├── libauglag.a │ │ └── libauglag.la │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── auglag.c │ └── auglag.h ├── autogen.sh ├── bobyqa │ ├── .deps │ │ └── bobyqa.Plo │ ├── .libs │ │ ├── bobyqa.o │ │ ├── libbobyqa.a │ │ └── libbobyqa.la │ ├── COPYRIGHT │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── README.orig │ ├── bobyqa.c │ └── bobyqa.h ├── cdirect │ ├── .deps │ │ ├── cdirect.Plo │ │ └── hybrid.Plo │ ├── .libs │ │ ├── cdirect.o │ │ ├── hybrid.o │ │ ├── libcdirect.a │ │ └── libcdirect.la │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── cdirect.c │ ├── cdirect.h │ └── hybrid.c ├── cobyla │ ├── .deps │ │ └── cobyla.Plo │ ├── .libs │ │ ├── cobyla.o │ │ ├── libcobyla.a │ │ └── libcobyla.la │ ├── COPYRIGHT │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── README.orig │ ├── cobyla.c │ └── cobyla.h ├── compile ├── config.guess ├── config.h.in ├── config.sub ├── configure ├── configure.ac ├── crs │ ├── .deps │ │ └── crs.Plo │ ├── .libs │ │ ├── crs.o │ │ ├── libcrs.a │ │ └── libcrs.la │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── crs.c │ └── crs.h ├── depcomp ├── direct │ ├── .deps │ │ ├── DIRect.Plo │ │ ├── DIRserial.Plo │ │ ├── DIRsubrout.Plo │ │ └── direct_wrap.Plo │ ├── .libs │ │ ├── DIRect.o │ │ ├── DIRserial.o │ │ ├── DIRsubrout.o │ │ ├── direct_wrap.o │ │ ├── libdirect.a │ │ └── libdirect.la │ ├── AUTHORS │ ├── COPYING │ ├── DIRect.c │ ├── DIRparallel.c │ ├── DIRserial.c │ ├── DIRsubrout.c │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── direct-internal.h │ ├── direct.h │ ├── direct_wrap.c │ ├── tstc.c │ └── userguide.pdf ├── esch │ ├── .deps │ │ └── esch.Plo │ ├── .libs │ │ ├── esch.o │ │ ├── libesch.a │ │ └── libesch.la │ ├── COPYRIGHT │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── esch.c │ └── esch.h ├── install-sh ├── isres │ ├── .deps │ │ └── isres.Plo │ ├── .libs │ │ ├── isres.o │ │ ├── libisres.a │ │ └── libisres.la │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── isres.c │ └── isres.h ├── ltmain.sh ├── luksan │ ├── .deps │ │ ├── mssubs.Plo │ │ ├── plip.Plo │ │ ├── plis.Plo │ │ ├── pnet.Plo │ │ └── pssubs.Plo │ ├── .libs │ │ ├── libluksan.a │ │ ├── libluksan.la │ │ ├── mssubs.o │ │ ├── plip.o │ │ ├── plis.o │ │ ├── pnet.o │ │ └── pssubs.o │ ├── COPYRIGHT │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── luksan.h │ ├── mssubs.c │ ├── plip.c │ ├── plis.c │ ├── plis.txt │ ├── pnet.c │ ├── pssubs.c │ └── v999-07.pdf ├── m4 │ ├── ax_c_threadlocal.m4 │ ├── libtool.m4 │ ├── ltoptions.m4 │ ├── ltsugar.m4 │ ├── ltversion.m4 │ └── lt~obsolete.m4 ├── missing ├── mlsl │ ├── .deps │ │ └── mlsl.Plo │ ├── .libs │ │ ├── libmlsl.a │ │ ├── libmlsl.la │ │ └── mlsl.o │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── mlsl.c │ └── mlsl.h ├── mma │ ├── .deps │ │ ├── ccsa_quadratic.Plo │ │ └── mma.Plo │ ├── .libs │ │ ├── ccsa_quadratic.o │ │ ├── libmma.a │ │ ├── libmma.la │ │ └── mma.o │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── ccsa_quadratic.c │ ├── mma.c │ └── mma.h ├── neldermead │ ├── .deps │ │ ├── nldrmd.Plo │ │ └── sbplx.Plo │ ├── .libs │ │ ├── libneldermead.a │ │ ├── libneldermead.la │ │ ├── nldrmd.o │ │ └── sbplx.o │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── neldermead.h │ ├── nldrmd.c │ └── sbplx.c ├── newuoa │ ├── .deps │ │ └── newuoa.Plo │ ├── .libs │ │ ├── libnewuoa.a │ │ ├── libnewuoa.la │ │ └── newuoa.o │ ├── COPYRIGHT │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── README.orig │ ├── newuoa.c │ └── newuoa.h ├── nlopt.pc.in ├── octave │ ├── .deps │ │ └── dummy.Po │ ├── Makefile.am │ ├── Makefile.in │ ├── NLOPT_AUGLAG.m │ ├── NLOPT_AUGLAG_EQ.m │ ├── NLOPT_GD_MLSL.m │ ├── NLOPT_GD_MLSL_LDS.m │ ├── NLOPT_GD_STOGO.m │ ├── NLOPT_GD_STOGO_RAND.m │ ├── NLOPT_GN_CRS2_LM.m │ ├── NLOPT_GN_DIRECT.m │ ├── NLOPT_GN_DIRECT_L.m │ ├── NLOPT_GN_DIRECT_L_NOSCAL.m │ ├── NLOPT_GN_DIRECT_L_RAND.m │ ├── NLOPT_GN_DIRECT_L_RAND_NOSCAL.m │ ├── NLOPT_GN_DIRECT_NOSCAL.m │ ├── NLOPT_GN_ESCH.m │ ├── NLOPT_GN_ISRES.m │ ├── NLOPT_GN_MLSL.m │ ├── NLOPT_GN_MLSL_LDS.m │ ├── NLOPT_GN_ORIG_DIRECT.m │ ├── NLOPT_GN_ORIG_DIRECT_L.m │ ├── NLOPT_G_MLSL.m │ ├── NLOPT_G_MLSL_LDS.m │ ├── NLOPT_LD_AUGLAG.m │ ├── NLOPT_LD_AUGLAG_EQ.m │ ├── NLOPT_LD_CCSAQ.m │ ├── NLOPT_LD_LBFGS.m │ ├── NLOPT_LD_LBFGS_NOCEDAL.m │ ├── NLOPT_LD_MMA.m │ ├── NLOPT_LD_SLSQP.m │ ├── NLOPT_LD_TNEWTON.m │ ├── NLOPT_LD_TNEWTON_PRECOND.m │ ├── NLOPT_LD_TNEWTON_PRECOND_RESTART.m │ ├── NLOPT_LD_TNEWTON_RESTART.m │ ├── NLOPT_LD_VAR1.m │ ├── NLOPT_LD_VAR2.m │ ├── NLOPT_LN_AUGLAG.m │ ├── NLOPT_LN_AUGLAG_EQ.m │ ├── NLOPT_LN_BOBYQA.m │ ├── NLOPT_LN_COBYLA.m │ ├── NLOPT_LN_NELDERMEAD.m │ ├── NLOPT_LN_NEWUOA.m │ ├── NLOPT_LN_NEWUOA_BOUND.m │ ├── NLOPT_LN_PRAXIS.m │ ├── NLOPT_LN_SBPLX.m │ ├── dummy.c │ ├── nlopt_minimize.m │ ├── nlopt_minimize_constrained.m │ ├── nlopt_optimize-mex.c │ ├── nlopt_optimize-oct.cc │ ├── nlopt_optimize.m │ └── nlopt_optimize_usage.h ├── praxis │ ├── .deps │ │ └── praxis.Plo │ ├── .libs │ │ ├── libpraxis.a │ │ ├── libpraxis.la │ │ └── praxis.o │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── praxis.c │ └── praxis.h ├── py-compile ├── slsqp │ ├── .deps │ │ └── slsqp.Plo │ ├── .libs │ │ ├── libslsqp.a │ │ ├── libslsqp.la │ │ └── slsqp.o │ ├── COPYRIGHT │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── slsqp.c │ └── slsqp.h ├── stogo │ ├── .deps │ │ ├── global.Plo │ │ ├── linalg.Plo │ │ ├── local.Plo │ │ ├── stogo.Plo │ │ └── tools.Plo │ ├── COPYRIGHT │ ├── Makefile.am │ ├── Makefile.in │ ├── README │ ├── global.cc │ ├── global.h │ ├── linalg.cc │ ├── linalg.h │ ├── local.cc │ ├── local.h │ ├── paper.pdf │ ├── prog.cc │ ├── rosen.h │ ├── stogo.cc │ ├── stogo.h │ ├── stogo_config.h │ ├── techreport.pdf │ ├── testfun.h │ ├── testros.cc │ ├── tools.cc │ ├── tools.h │ ├── tst.cc │ └── tstc.c ├── swig │ ├── .deps │ │ ├── _nlopt_la-nlopt-python.Plo │ │ └── libnlopt_guile_la-nlopt-guile.Plo │ ├── .libs │ │ ├── _nlopt.0.so │ │ ├── _nlopt.a │ │ ├── _nlopt.la │ │ ├── _nlopt.lai │ │ ├── _nlopt.so │ │ └── _nlopt_la-nlopt-python.o │ ├── Makefile.am │ ├── Makefile.in │ ├── nlopt-enum-renames.i │ ├── nlopt-exceptions.i │ ├── nlopt-guile.cpp │ ├── nlopt-guile.i │ ├── nlopt-python.cpp │ ├── nlopt-python.i │ ├── nlopt.i │ ├── nlopt.py │ ├── nlopt.pyc │ ├── nlopt.scm.in │ └── numpy.i ├── test │ ├── .deps │ │ ├── testfuncs.Po │ │ └── testopt.Po │ ├── .libs │ │ └── testopt │ ├── Makefile.am │ ├── Makefile.in │ ├── test_std.py │ ├── testfuncs.c │ ├── testfuncs.h │ └── testopt.cpp └── util │ ├── .deps │ ├── mt19937ar.Plo │ ├── qsort_r.Plo │ ├── redblack.Plo │ ├── redblack_test.Po │ ├── rescale.Plo │ ├── sobolseq.Plo │ ├── stop.Plo │ └── timer.Plo │ ├── .libs │ ├── libutil.a │ ├── libutil.la │ ├── mt19937ar.o │ ├── qsort_r.o │ ├── redblack.o │ ├── rescale.o │ ├── sobolseq.o │ ├── stop.o │ └── timer.o │ ├── Makefile.am │ ├── Makefile.in │ ├── mt19937ar.c │ ├── nlopt-util.h │ ├── qsort_r.c │ ├── redblack.c │ ├── redblack.h │ ├── redblack_test.c │ ├── rescale.c │ ├── soboldata.h │ ├── sobolseq.c │ ├── stop.c │ └── timer.c ├── qTORCH_Software_Guide.pdf └── src ├── ContractionTools.h ├── Exceptions.h ├── LineGraph.h ├── Network.h ├── Node.h ├── Timer.h ├── Wire.h ├── leviParser.hpp ├── main.cpp ├── maxcut.cpp ├── maxcut.h ├── preprocess.h ├── qtorch.hpp ├── tests.cpp └── zconf.h /Examples/fourier_transform8qubit_example.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ./bin/qtorch Samples/qft8qubitScript.inp -------------------------------------------------------------------------------- /Examples/howToWriteQASMfiles.txt: -------------------------------------------------------------------------------- 1 | How to write qasm and measurement files (examples are provided as well): 2 | 3 | 1. Each qasm file's first line must be the number of qubits in the circuit 4 | 5 | 2. Each successive line can be chosen from the following 6 | - Act on a qubit with an operator 7 | -The following operators are already supported by the library: 8 | CNOT, SWAP, Hadamard, Rx(theta), Ry(theta), Rz(theta), X, Y, Z, Depolarizing Noise Channel, CRk 9 | -A two qubit operation looks like the following line: "CNOT 0 1" where 0 is the index of the control qubit 10 | -A one qubit operation looks like: "H 0" or "Rz 3.14159 0" 11 | - Define a new 1 or 2 qubit operator 12 | -The following line defines a one qubit operator: "def1 Q q.gate" 13 | -The numbers (imaginary are not supported) in the matrix "Q" must be found in the file: "q.gate" 14 | -After this definition, Q can be called just like any other one qubit gate: "Q 0" 15 | -The following line defines a two qubit operator: "def2 Cz cz.gate" 16 | -The numbers (imaginary are not supported) in the matrix "Cz" must be found in the file: "cz.gate" 17 | -After this definition, Q can be called just like any other two qubit gate: "Cz 0 1" 18 | -Note that definition of an arbitrary operator does not support extra arguments as in Rz, Ry, and Rx 19 | 20 | 3. Measurement files must also be provided 21 | -A measurement file consists of X,Y,Z,0,1, or T measurements separated by spaces 22 | -If 5 measurements are included and an 8 qubit circuit is simulated, the rest of the qubits will be automatically traced out 23 | 24 | 4. Things to Note: 25 | -The qubits will always start in the all-zero pure state 26 | -If your qasm files are incorrect, the tensor library will not simulate them and may crash 27 | -------------------------------------------------------------------------------- /Examples/linegraph_example.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ./bin/qtorch Samples/contract_using_linegraph_example.inp -------------------------------------------------------------------------------- /Examples/maxcut_example.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ./bin/maxcutQAOA Samples/3regRand30Node50.dgf 1 2 outputAnswer.txt 5 -------------------------------------------------------------------------------- /Examples/quickbb_treewidth_example.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ./bin/qtorch Samples/treewidth_example.inp -------------------------------------------------------------------------------- /Examples/stochastic_example.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ./bin/qtorch Samples/contract_using_stochastic_example.inp -------------------------------------------------------------------------------- /Samples/3regRand30Node50.dgf: -------------------------------------------------------------------------------- 1 | c Randomly generated 30 vertex 3regular graph 2 | e 11 25 3 | e 20 4 4 | e 28 23 5 | e 15 23 6 | e 27 8 7 | e 16 14 8 | e 14 8 9 | e 22 21 10 | e 15 1 11 | e 1 21 12 | e 26 8 13 | e 18 20 14 | e 28 12 15 | e 17 18 16 | e 3 13 17 | e 19 27 18 | e 9 27 19 | e 15 6 20 | e 24 29 21 | e 14 13 22 | e 16 5 23 | e 0 1 24 | e 21 24 25 | e 20 17 26 | e 29 25 27 | e 10 3 28 | e 12 23 29 | e 22 13 30 | e 3 9 31 | e 11 0 32 | e 24 7 33 | e 19 4 34 | e 10 9 35 | e 26 28 36 | e 26 19 37 | e 4 29 38 | e 11 12 39 | e 25 22 40 | e 0 16 41 | e 2 5 42 | e 6 7 43 | e 6 10 44 | e 5 17 45 | e 2 18 46 | e 7 2 47 | -------------------------------------------------------------------------------- /Samples/4regRand20Node1-p1.qasm: -------------------------------------------------------------------------------- 1 | 20 2 | H 0 3 | H 1 4 | H 2 5 | H 3 6 | H 4 7 | H 5 8 | H 6 9 | H 7 10 | H 8 11 | H 9 12 | H 10 13 | H 11 14 | H 12 15 | H 13 16 | H 14 17 | H 15 18 | H 16 19 | H 17 20 | H 18 21 | H 19 22 | CNOT 9 14 23 | Rz -0.743043 14 24 | CNOT 9 14 25 | CNOT 12 16 26 | Rz -0.743043 16 27 | CNOT 12 16 28 | CNOT 16 2 29 | Rz -0.743043 2 30 | CNOT 16 2 31 | CNOT 10 2 32 | Rz -0.743043 2 33 | CNOT 10 2 34 | CNOT 4 15 35 | Rz -0.743043 15 36 | CNOT 4 15 37 | CNOT 0 1 38 | Rz -0.743043 1 39 | CNOT 0 1 40 | CNOT 0 15 41 | Rz -0.743043 15 42 | CNOT 0 15 43 | CNOT 3 6 44 | Rz -0.743043 6 45 | CNOT 3 6 46 | CNOT 13 17 47 | Rz -0.743043 17 48 | CNOT 13 17 49 | CNOT 19 5 50 | Rz -0.743043 5 51 | CNOT 19 5 52 | CNOT 13 11 53 | Rz -0.743043 11 54 | CNOT 13 11 55 | CNOT 5 10 56 | Rz -0.743043 10 57 | CNOT 5 10 58 | CNOT 4 17 59 | Rz -0.743043 17 60 | CNOT 4 17 61 | CNOT 14 7 62 | Rz -0.743043 7 63 | CNOT 14 7 64 | CNOT 0 8 65 | Rz -0.743043 8 66 | CNOT 0 8 67 | CNOT 9 13 68 | Rz -0.743043 13 69 | CNOT 9 13 70 | CNOT 12 2 71 | Rz -0.743043 2 72 | CNOT 12 2 73 | CNOT 14 16 74 | Rz -0.743043 16 75 | CNOT 14 16 76 | CNOT 15 11 77 | Rz -0.743043 11 78 | CNOT 15 11 79 | CNOT 10 16 80 | Rz -0.743043 16 81 | CNOT 10 16 82 | CNOT 13 8 83 | Rz -0.743043 8 84 | CNOT 13 8 85 | CNOT 6 17 86 | Rz -0.743043 17 87 | CNOT 6 17 88 | CNOT 15 5 89 | Rz -0.743043 5 90 | CNOT 15 5 91 | CNOT 8 12 92 | Rz -0.743043 12 93 | CNOT 8 12 94 | CNOT 1 18 95 | Rz -0.743043 18 96 | CNOT 1 18 97 | CNOT 2 6 98 | Rz -0.743043 6 99 | CNOT 2 6 100 | CNOT 4 8 101 | Rz -0.743043 8 102 | CNOT 4 8 103 | CNOT 10 18 104 | Rz -0.743043 18 105 | CNOT 10 18 106 | CNOT 4 7 107 | Rz -0.743043 7 108 | CNOT 4 7 109 | CNOT 9 12 110 | Rz -0.743043 12 111 | CNOT 9 12 112 | CNOT 11 6 113 | Rz -0.743043 6 114 | CNOT 11 6 115 | CNOT 11 19 116 | Rz -0.743043 19 117 | CNOT 11 19 118 | CNOT 18 14 119 | Rz -0.743043 14 120 | CNOT 18 14 121 | CNOT 9 18 122 | Rz -0.743043 18 123 | CNOT 9 18 124 | CNOT 3 1 125 | Rz -0.743043 1 126 | CNOT 3 1 127 | CNOT 19 17 128 | Rz -0.743043 17 129 | CNOT 19 17 130 | CNOT 19 1 131 | Rz -0.743043 1 132 | CNOT 19 1 133 | CNOT 7 3 134 | Rz -0.743043 3 135 | CNOT 7 3 136 | CNOT 5 7 137 | Rz -0.743043 7 138 | CNOT 5 7 139 | CNOT 0 3 140 | Rz -0.743043 3 141 | CNOT 0 3 142 | Rx 0.754082 0 143 | Rx 0.754082 1 144 | Rx 0.754082 2 145 | Rx 0.754082 3 146 | Rx 0.754082 4 147 | Rx 0.754082 5 148 | Rx 0.754082 6 149 | Rx 0.754082 7 150 | Rx 0.754082 8 151 | Rx 0.754082 9 152 | Rx 0.754082 10 153 | Rx 0.754082 11 154 | Rx 0.754082 12 155 | Rx 0.754082 13 156 | Rx 0.754082 14 157 | Rx 0.754082 15 158 | Rx 0.754082 16 159 | Rx 0.754082 17 160 | Rx 0.754082 18 161 | Rx 0.754082 19 162 | -------------------------------------------------------------------------------- /Samples/4regRand20Node5-p1.qasm: -------------------------------------------------------------------------------- 1 | 20 2 | H 0 3 | H 1 4 | H 2 5 | H 3 6 | H 4 7 | H 5 8 | H 6 9 | H 7 10 | H 8 11 | H 9 12 | H 10 13 | H 11 14 | H 12 15 | H 13 16 | H 14 17 | H 15 18 | H 16 19 | H 17 20 | H 18 21 | H 19 22 | CNOT 7 10 23 | Rz -0.743043 10 24 | CNOT 7 10 25 | CNOT 1 6 26 | Rz -0.743043 6 27 | CNOT 1 6 28 | CNOT 13 3 29 | Rz -0.743043 3 30 | CNOT 13 3 31 | CNOT 17 9 32 | Rz -0.743043 9 33 | CNOT 17 9 34 | CNOT 5 13 35 | Rz -0.743043 13 36 | CNOT 5 13 37 | CNOT 5 14 38 | Rz -0.743043 14 39 | CNOT 5 14 40 | CNOT 11 15 41 | Rz -0.743043 15 42 | CNOT 11 15 43 | CNOT 18 14 44 | Rz -0.743043 14 45 | CNOT 18 14 46 | CNOT 11 9 47 | Rz -0.743043 9 48 | CNOT 11 9 49 | CNOT 5 0 50 | Rz -0.743043 0 51 | CNOT 5 0 52 | CNOT 5 18 53 | Rz -0.743043 18 54 | CNOT 5 18 55 | CNOT 14 17 56 | Rz -0.743043 17 57 | CNOT 14 17 58 | CNOT 9 8 59 | Rz -0.743043 8 60 | CNOT 9 8 61 | CNOT 17 10 62 | Rz -0.743043 10 63 | CNOT 17 10 64 | CNOT 0 8 65 | Rz -0.743043 8 66 | CNOT 0 8 67 | CNOT 3 18 68 | Rz -0.743043 18 69 | CNOT 3 18 70 | CNOT 15 2 71 | Rz -0.743043 2 72 | CNOT 15 2 73 | CNOT 0 15 74 | Rz -0.743043 15 75 | CNOT 0 15 76 | CNOT 16 15 77 | Rz -0.743043 15 78 | CNOT 16 15 79 | CNOT 19 6 80 | Rz -0.743043 6 81 | CNOT 19 6 82 | CNOT 18 19 83 | Rz -0.743043 19 84 | CNOT 18 19 85 | CNOT 0 14 86 | Rz -0.743043 14 87 | CNOT 0 14 88 | CNOT 3 10 89 | Rz -0.743043 10 90 | CNOT 3 10 91 | CNOT 12 4 92 | Rz -0.743043 4 93 | CNOT 12 4 94 | CNOT 1 7 95 | Rz -0.743043 7 96 | CNOT 1 7 97 | CNOT 2 7 98 | Rz -0.743043 7 99 | CNOT 2 7 100 | CNOT 10 9 101 | Rz -0.743043 9 102 | CNOT 10 9 103 | CNOT 8 16 104 | Rz -0.743043 16 105 | CNOT 8 16 106 | CNOT 17 12 107 | Rz -0.743043 12 108 | CNOT 17 12 109 | CNOT 8 4 110 | Rz -0.743043 4 111 | CNOT 8 4 112 | CNOT 3 4 113 | Rz -0.743043 4 114 | CNOT 3 4 115 | CNOT 13 16 116 | Rz -0.743043 16 117 | CNOT 13 16 118 | CNOT 7 19 119 | Rz -0.743043 19 120 | CNOT 7 19 121 | CNOT 4 13 122 | Rz -0.743043 13 123 | CNOT 4 13 124 | CNOT 11 6 125 | Rz -0.743043 6 126 | CNOT 11 6 127 | CNOT 1 12 128 | Rz -0.743043 12 129 | CNOT 1 12 130 | CNOT 12 16 131 | Rz -0.743043 16 132 | CNOT 12 16 133 | CNOT 2 6 134 | Rz -0.743043 6 135 | CNOT 2 6 136 | CNOT 11 1 137 | Rz -0.743043 1 138 | CNOT 11 1 139 | CNOT 19 2 140 | Rz -0.743043 2 141 | CNOT 19 2 142 | Rx 0.754082 0 143 | Rx 0.754082 1 144 | Rx 0.754082 2 145 | Rx 0.754082 3 146 | Rx 0.754082 4 147 | Rx 0.754082 5 148 | Rx 0.754082 6 149 | Rx 0.754082 7 150 | Rx 0.754082 8 151 | Rx 0.754082 9 152 | Rx 0.754082 10 153 | Rx 0.754082 11 154 | Rx 0.754082 12 155 | Rx 0.754082 13 156 | Rx 0.754082 14 157 | Rx 0.754082 15 158 | Rx 0.754082 16 159 | Rx 0.754082 17 160 | Rx 0.754082 18 161 | Rx 0.754082 19 162 | -------------------------------------------------------------------------------- /Samples/4regRand30Node26.dgf: -------------------------------------------------------------------------------- 1 | c Randomly generated 30 vertex 4regular graph 2 | e 4 27 3 | e 14 24 4 | e 1 4 5 | e 16 14 6 | e 17 3 7 | e 16 5 8 | e 1 29 9 | e 25 21 10 | e 14 19 11 | e 27 0 12 | e 24 4 13 | e 20 13 14 | e 28 11 15 | e 8 20 16 | e 17 5 17 | e 25 0 18 | e 9 27 19 | e 10 6 20 | e 27 24 21 | e 8 6 22 | e 29 23 23 | e 22 8 24 | e 18 5 25 | e 14 25 26 | e 1 24 27 | e 16 13 28 | e 16 25 29 | e 3 4 30 | e 28 26 31 | e 21 17 32 | e 7 22 33 | e 29 18 34 | e 20 7 35 | e 12 8 36 | e 15 13 37 | e 28 2 38 | e 17 13 39 | e 11 18 40 | e 22 26 41 | e 22 10 42 | e 26 10 43 | e 7 5 44 | e 26 18 45 | e 3 10 46 | e 21 28 47 | e 7 2 48 | e 1 0 49 | e 9 11 50 | e 29 12 51 | e 3 2 52 | e 9 15 53 | e 19 6 54 | e 0 2 55 | e 15 20 56 | e 19 23 57 | e 21 11 58 | e 23 15 59 | e 6 9 60 | e 23 12 61 | e 19 12 62 | -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix0.gate: -------------------------------------------------------------------------------- 1 | (0.388351,0.662992) (-0.0937406,0.0303562) (0.525709,-0.278903) (0.50272,-0.684674) (0.268911,-0.359843) (1.26607,-0.327316) (-0.0331769,-0.783398) (-0.246051,-0.0626414) (-0.175483,0.393442) (-0.184125,0.982266) (1.28076,0.72042) (0.259925,-0.107103) (0.277226,-0.742505) (-0.144817,-0.859462) (-0.663631,0.200591) (0.590068,0.329525) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix1.gate: -------------------------------------------------------------------------------- 1 | (1.1725,1.09526) (-0.167659,0.23106) (-0.181402,-0.970913) (1.08724,-0.68144) (0.385435,0.253663) (0.871168,-0.140376) (-0.39042,-0.755461) (0.502135,-0.524699) (-0.46005,0.899527) (-0.212391,-0.358538) (1.50585,-0.507066) (0.149706,1.11717) (-0.207174,0.811792) (-0.230882,0.0199722) (0.425985,-1.03148) (1.37978,1.04385) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix10.gate: -------------------------------------------------------------------------------- 1 | (0.564534,0.653356) (0.754281,-0.585631) (0.000272078,0.132493) (0.0342622,-0.499063) (0.165103,-0.0821797) (0.892205,0.493437) (-0.271131,0.242916) (0.091725,-0.267034) (0.447567,-0.427924) (-0.10504,0.0273937) (0.501519,0.773223) (0.0542625,-0.54759) (0.0682285,-0.272519) (-0.228893,0.847493) (-0.0439063,-0.318538) (0.936779,-0.243645) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix11.gate: -------------------------------------------------------------------------------- 1 | (1.06473,0.397268) (0.150349,0.173081) (0.234111,-0.724328) (-0.327046,-0.892077) (-0.0588683,0.0362183) (1.02589,0.0230904) (0.066771,-0.622507) (-0.25074,-0.320783) (0.379295,-0.669386) (0.231207,-0.332668) (0.661045,-0.0467748) (-0.540521,-0.329496) (0.180397,0.900745) (0.207553,0.688605) (0.514567,-0.129856) (1.03038,-1.14417) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix12.gate: -------------------------------------------------------------------------------- 1 | (1.83065,-0.304989) (0.565068,-0.184075) (-0.588142,1.08934) (-0.45286,-1.00423) (-0.228675,-0.697365) (0.772757,0.259774) (0.620268,-0.68839) (-0.403608,-0.0372162) (0.198683,-0.997443) (0.21437,-0.450246) (1.006,0.668202) (-0.486762,-0.21414) (0.517313,1.00153) (0.193165,0.772131) (-0.339162,-0.639183) (0.913616,-1.10004) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix13.gate: -------------------------------------------------------------------------------- 1 | (1.12134,0.179025) (0.310929,0.575567) (0.153567,0.0855417) (0.110186,0.766038) (0.141968,0.249696) (1.17131,-0.0968605) (0.225266,0.517835) (-0.0481977,0.225782) (0.0305766,-0.457413) (-0.0588956,-0.746798) (1.07343,-0.619591) (0.264685,0.0474174) (-0.179869,-0.552269) (-0.413149,-0.837678) (-0.234297,-0.837598) (1.10167,-0.707216) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix14.gate: -------------------------------------------------------------------------------- 1 | (0.505689,0.178822) (0.21053,-0.260779) (-0.578711,0.462379) (0.312986,0.602084) (0.165955,-0.616291) (0.362048,-0.600137) (0.350087,-0.567036) (-0.419425,-0.398577) (-0.227776,0.250123) (0.0596199,-0.612853) (0.50827,0.463685) (-0.328072,-0.711524) (0.018344,0.437543) (0.181497,-0.0522977) (-0.207524,0.22104) (0.712124,-0.606772) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix15.gate: -------------------------------------------------------------------------------- 1 | (0.637846,-0.603923) (0.199392,0.308185) (0.25602,0.387649) (-0.678542,-0.293735) (0.17871,0.577091) (0.737363,0.413404) (-0.0473953,0.470249) (0.202321,0.518874) (-0.0736091,-0.207687) (-0.0775498,-0.176808) (0.760851,-0.794373) (0.404321,0.371811) (-0.16086,-0.0175317) (0.0734087,0.263118) (-0.0665802,-0.0112417) (0.570723,-0.663097) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix16.gate: -------------------------------------------------------------------------------- 1 | (0.776359,0.188706) (0.44022,-0.418408) (0.300969,0.558377) (0.26408,0.638228) (0.510343,-0.68432) (0.619012,0.643572) (0.32456,0.449303) (0.170268,0.579191) (-0.0119948,0.305972) (-0.413674,0.268567) (0.508235,-0.0228364) (-0.148743,-0.781357) (-0.16043,-0.429631) (0.4356,-0.636966) (0.321083,-0.813061) (1.0079,0.0890213) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix17.gate: -------------------------------------------------------------------------------- 1 | (0.9667,0.432951) (-0.51229,0.5188) (0.267326,0.28178) (-0.199898,0.319122) (-0.0288363,-0.403372) (1.10371,0.537873) (0.407812,-0.800172) (-0.387637,0.142145) (0.340164,-0.337454) (0.168841,0.768947) (1.13467,0.233381) (0.251126,-0.753662) (-0.0281314,0.222711) (-0.341509,0.711044) (0.396672,-0.144673) (0.666617,0.191898) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix18.gate: -------------------------------------------------------------------------------- 1 | (1.11506,0.742838) (0.104262,-0.828542) (0.219762,0.42395) (-0.5202,0.940169) (-0.505143,0.576057) (0.824344,0.839832) (-0.295911,0.830392) (-0.284521,-1.02232) (-0.244433,-0.337579) (-0.452073,0.85518) (0.530474,-0.461824) (0.697986,0.286326) (-0.237127,-0.203944) (-0.259941,0.755901) (-0.250198,0.114821) (1.2453,-0.598488) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix19.gate: -------------------------------------------------------------------------------- 1 | (0.451785,-0.206655) (0.0369581,0.624329) (0.393141,0.655755) (0.322323,-0.689578) (0.718928,0.55737) (0.729891,-0.864076) (-0.60323,-0.742319) (-0.0646819,0.579983) (-0.436408,0.417255) (-0.0547864,0.709634) (1.26075,0.41663) (0.468731,-0.713965) (0.127716,-0.341394) (-0.0385357,-0.280504) (-0.256772,0.351591) (0.715355,0.862124) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix2.gate: -------------------------------------------------------------------------------- 1 | (1.1319,-0.267918) (-0.133719,-0.176971) (-0.507143,-0.406358) (-0.0372789,-0.831623) (0.201853,0.0510574) (0.36663,0.673897) (-0.111318,-0.744757) (0.521766,-0.704811) (0.248022,0.702398) (0.206231,-0.586323) (0.790328,-0.478989) (0.0264535,-0.232406) (0.266785,-0.125304) (-0.151202,-0.159836) (-0.0859836,-0.627017) (0.780392,0.345714) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix20.gate: -------------------------------------------------------------------------------- 1 | (0.334575,0.504539) (-0.0977799,0.484454) (-0.0562712,-0.00783708) (0.630724,-0.634965) (-0.752619,0.0221684) (0.850373,0.742486) (-0.278534,0.497995) (0.822908,-0.545077) (-0.771934,0.351536) (-0.00655453,0.204664) (0.853989,0.583334) (0.722997,-0.642128) (0.133558,-0.668146) (-0.157798,0.610269) (-0.220118,0.0854374) (1.04678,0.268844) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix21.gate: -------------------------------------------------------------------------------- 1 | (1.75002,0.855884) (0.128508,-0.939077) (0.319163,-0.918018) (0.997231,-0.959196) (-0.607738,0.704464) (1.22214,0.0887837) (0.376232,0.738684) (-0.0439803,0.824781) (-0.581237,0.627963) (0.532128,0.677473) (0.982565,-0.126902) (0.0210432,0.916538) (-0.266243,1.07169) (0.443292,-0.537118) (0.516001,0.075231) (1.43972,0.776773) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix22.gate: -------------------------------------------------------------------------------- 1 | (0.621906,-0.711368) (-0.16857,-0.710369) (-0.104889,-0.0515556) (-0.179758,-0.544183) (-0.0436505,0.203969) (0.712827,0.705365) (-0.0476124,0.0669608) (0.204525,-0.0915492) (-0.179287,0.117843) (-0.310772,0.32417) (0.849435,-0.138108) (0.211818,-0.649501) (0.017166,-0.431987) (0.259441,-0.462133) (0.0727927,-0.299822) (0.548909,0.401474) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix23.gate: -------------------------------------------------------------------------------- 1 | (0.980422,0.265156) (0.231848,0.727916) (-0.242092,0.17475) (-0.0562512,-0.473734) (0.344425,-0.0135253) (1.13954,-0.420376) (0.449318,0.714088) (-0.330669,0.385463) (-0.231287,-0.883613) (-0.542388,-0.811816) (0.983556,-0.971427) (0.243431,0.915197) (-0.000237857,0.00662336) (0.0564905,0.770023) (-0.279624,0.086152) (0.829119,0.163628) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix24.gate: -------------------------------------------------------------------------------- 1 | (0.519962,-0.683033) (-0.24875,-0.161122) (0.268673,0.1981) (-0.148334,0.190885) (0.109504,-0.789683) (0.717081,-0.0603223) (-0.112898,0.860411) (0.179681,-0.845981) (0.162648,-0.0332961) (-0.0573773,0.793338) (0.719985,-0.0719818) (0.287218,0.394608) (0.24495,0.850466) (0.213865,0.408214) (-0.166333,-0.511808) (1.03574,0.598237) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix25.gate: -------------------------------------------------------------------------------- 1 | (0.7537,0.425133) (-0.250207,0.0591075) (0.399551,-0.491262) (-0.452964,0.560131) (0.118671,0.124128) (1.01276,0.638066) (-0.530863,0.48485) (0.629149,-0.633933) (0.0745327,0.0164742) (0.265304,-0.840067) (1.14065,0.268639) (-0.200537,-0.444407) (-0.214321,0.276342) (-0.173838,-0.38973) (0.544761,-0.590566) (0.356995,0.574272) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix26.gate: -------------------------------------------------------------------------------- 1 | (0.576114,-0.165125) (0.080214,0.879455) (0.31258,0.364484) (0.03726,-0.676769) (-0.297353,0.216674) (0.685639,-0.413096) (0.369828,-0.069264) (-0.474424,-0.608868) (0.195757,0.551123) (-0.128961,0.622118) (0.69301,0.146008) (0.674993,0.131089) (-0.542314,-0.343197) (-0.166601,-0.335528) (0.377742,0.550498) (0.3394,-0.24956) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix27.gate: -------------------------------------------------------------------------------- 1 | (0.573819,0.502832) (0.130106,0.531991) (0.29141,-0.865823) (-0.439225,0.167088) (0.427886,-0.547957) (1.08222,0.434859) (-0.32846,-0.0595036) (0.211162,-0.00997894) (0.636929,-0.460859) (0.00875403,1.00294) (0.711161,-0.139233) (0.358139,-0.305679) (-0.0479686,0.28746) (-0.28581,0.155489) (0.0454288,0.207675) (0.764761,0.674653) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix28.gate: -------------------------------------------------------------------------------- 1 | (1.16577,-0.0140435) (0.0161853,-0.38257) (0.450546,-0.0525322) (-0.234166,-1.04095) (-0.0894937,-0.471593) (0.19797,0.624961) (-0.261787,0.69315) (0.0761221,0.33889) (0.661071,0.460076) (-0.220822,0.643073) (0.787204,-0.530553) (-0.399949,-0.974313) (-0.016013,0.783521) (0.00382511,-0.332212) (0.443754,0.514133) (1.39549,-0.809427) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix29.gate: -------------------------------------------------------------------------------- 1 | (1.15207,-0.74441) (0.134593,0.88318) (-0.581996,-0.372276) (0.221788,-0.506283) (-0.224949,-0.848268) (1.19659,0.464667) (-0.396776,1.00549) (-0.46916,-0.284245) (0.295924,0.431518) (-0.343204,0.0724491) (1.2177,-0.138296) (-0.185807,0.841669) (0.261229,-0.341671) (-0.0984603,0.434511) (-0.104118,-0.472166) (0.914064,0.623653) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix3.gate: -------------------------------------------------------------------------------- 1 | (0.738598,0.928274) (0.423526,0.158446) (-0.376362,0.752516) (0.170986,0.0926401) (0.136576,-0.159624) (0.462788,0.339372) (0.549794,-0.496284) (-0.207209,-0.826542) (0.22913,-0.560429) (0.101811,-0.956406) (1.13665,-0.339581) (-0.633765,-0.377558) (0.184027,0.39648) (0.408782,-0.232513) (0.197654,0.806962) (0.753297,-0.82874) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix30.gate: -------------------------------------------------------------------------------- 1 | (1.05211,-0.106074) (-0.207915,-0.468435) (-0.254189,-0.325929) (0.192167,-0.172972) (-0.0784621,0.801402) (0.957641,-0.346714) (-0.0485968,-0.6286) (0.445141,-0.12886) (0.0706773,-0.360334) (0.125981,-0.198694) (0.315007,-0.551319) (-0.149145,0.627109) (0.636209,-0.110824) (0.245487,-0.727543) (-0.442981,0.498311) (0.284688,0.442644) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix31.gate: -------------------------------------------------------------------------------- 1 | (1.25441,-0.19676) (0.134506,0.0682912) (-0.187277,-0.953344) (-0.180776,-0.422594) (0.0998099,-0.120335) (0.570418,0.723754) (-0.0538911,-0.603072) (0.495819,-0.698455) (0.000293232,0.716702) (-0.332475,0.36861) (1.27147,-0.0657858) (0.52765,-0.485121) (0.257587,-0.26602) (0.42441,-0.199794) (-0.0606106,-0.615768) (0.403769,0.392937) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix32.gate: -------------------------------------------------------------------------------- 1 | (1.34163,-0.623774) (-0.888856,-0.255762) (-0.0982083,-0.901357) (-0.054605,0.764262) (0.631246,0.550137) (0.639162,-1.04324) (0.398366,0.374035) (-0.022235,0.687465) (0.146251,0.0335147) (-0.169042,-0.772731) (1.2846,0.0536583) (0.3449,-0.406812) (-0.217896,-0.594832) (0.0941431,0.819504) (-0.471719,0.219866) (0.909594,0.553355) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix33.gate: -------------------------------------------------------------------------------- 1 | (0.763724,0.591549) (-0.06184,0.2995) (-0.117837,-0.829257) (-0.0386,-0.239607) (0.0252617,0.515621) (0.663961,-0.486719) (0.701332,0.257101) (-0.197004,-0.375025) (0.0210348,0.0292093) (-0.0255198,0.0359628) (0.669617,-0.821686) (-0.124074,-0.105204) (0.142438,0.224836) (-0.344326,-0.29388) (0.595578,0.135988) (0.5742,-0.799888) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix34.gate: -------------------------------------------------------------------------------- 1 | (0.797887,0.960584) (0.0839658,-0.121631) (-0.314231,0.629276) (-0.042145,-0.188406) (-0.402081,-0.0128259) (0.735364,0.839025) (0.213614,-0.771389) (0.0851364,0.00309524) (0.293362,-0.755237) (-0.190512,0.220287) (1.33668,-0.0860818) (0.0130564,0.193173) (-0.0593618,-0.20057) (-0.0435595,0.584773) (0.237577,-0.0992326) (0.74774,-0.646962) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix35.gate: -------------------------------------------------------------------------------- 1 | (0.749619,0.262127) (-0.13266,0.333867) (-0.592674,-0.343805) (-0.0341755,0.610011) (0.448939,-1.15009) (1.37957,-0.216933) (0.440018,0.905459) (0.282391,-0.423063) (-0.615962,-0.546828) (-0.199922,-0.540986) (0.631541,-0.67761) (0.152591,0.151827) (0.164151,0.435136) (0.175191,-0.0510253) (0.367928,0.728473) (0.621112,0.341451) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix36.gate: -------------------------------------------------------------------------------- 1 | (0.799464,0.520791) (-0.114077,0.848823) (0.412946,-0.708951) (0.147186,0.306029) (-0.0768484,0.823376) (0.995664,0.444642) (0.225143,-0.120433) (0.204192,-0.618565) (-0.652831,0.612669) (-0.636158,0.78041) (1.28628,0.51792) (0.128215,0.189506) (-0.523348,0.532413) (-0.503656,0.899926) (0.445894,-0.204634) (1.07223,0.636822) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix37.gate: -------------------------------------------------------------------------------- 1 | (1.25379,-0.0657248) (0.074469,0.458724) (-0.0636577,0.207278) (-0.0749722,0.0279938) (-0.256919,-0.911632) (1.04595,-0.333376) (0.400999,0.355168) (0.289387,0.441551) (0.117727,-0.711741) (0.247518,0.0728112) (0.811202,-0.295636) (-0.20227,-0.384163) (0.121985,0.899765) (-0.0610307,0.28243) (-0.382302,-0.539173) (0.705547,-0.307663) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix38.gate: -------------------------------------------------------------------------------- 1 | (0.564012,0.646646) (0.239369,0.0208016) (-0.0550366,0.503081) (-0.229589,0.268305) (0.0208802,-0.517413) (1.13179,-0.286181) (0.387228,0.225713) (0.174791,-0.290443) (-0.219375,0.671926) (-0.51571,-0.804531) (0.533208,-0.909354) (-0.281179,-0.084776) (0.0388749,-0.267148) (0.215882,0.0466036) (0.141307,0.475606) (0.898927,0.57305) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix39.gate: -------------------------------------------------------------------------------- 1 | (0.786735,-0.668685) (0.191646,0.744676) (0.0223381,0.71999) (0.246349,0.218308) (-0.0394196,-0.623117) (1.26924,0.266728) (0.323627,0.25657) (0.43295,0.608496) (-0.156342,0.75117) (-0.351496,-0.0984102) (0.364559,0.394129) (-0.262448,-0.713086) (-0.22066,-0.355) (0.106371,-0.193259) (0.089328,-0.472402) (0.464949,-0.820857) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix4.gate: -------------------------------------------------------------------------------- 1 | (0.684926,0.566975) (0.0579113,0.830823) (-0.461984,0.224929) (-0.151091,-0.697033) (-0.24502,0.514332) (0.471813,-0.538772) (0.0708654,0.0645411) (0.653316,0.604281) (-0.116774,0.319412) (-0.107506,0.0585976) (0.644903,0.511578) (0.179983,-0.486127) (-0.0556763,0.484795) (-0.105388,0.242729) (-0.0651252,-0.436415) (0.935415,-0.419819) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix40.gate: -------------------------------------------------------------------------------- 1 | (0.990129,0.585704) (-0.498524,-0.166868) (0.28038,-0.673821) (-0.779545,0.799837) (0.312851,-0.381795) (0.549991,0.910561) (-0.167474,-0.0221911) (0.188787,0.216782) (0.0274897,0.502296) (0.366391,-0.00269582) (0.972597,-0.23768) (-0.2028,-0.967519) (0.195448,0.315016) (-0.563622,0.59206) (0.085416,-0.420598) (0.590751,0.373971) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix41.gate: -------------------------------------------------------------------------------- 1 | (0.916978,-0.715236) (0.218213,0.870606) (0.407639,0.449563) (-0.10166,-0.527636) (0.166358,0.0156364) (0.922436,0.031015) (0.166898,-0.0622166) (-0.0659048,-0.37803) (0.04943,0.010216) (-0.0337698,0.109427) (1.04209,0.185054) (0.00862757,-0.126091) (0.441797,0.72428) (-0.454092,-0.213616) (-0.086522,1.04483) (1.12433,-0.429843) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix42.gate: -------------------------------------------------------------------------------- 1 | (0.694179,-0.809019) (0.0410482,-0.422875) (-0.148753,-0.0890661) (-0.13588,-0.251681) (0.251785,0.702057) (1.29423,0.579867) (0.554768,-0.806018) (0.279852,-0.304718) (-0.00501677,0.398278) (-0.153484,0.246658) (0.856433,0.710244) (0.00800628,0.187457) (-0.539666,-0.443211) (-0.503165,0.984406) (0.266318,0.419457) (1.01863,0.370853) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix43.gate: -------------------------------------------------------------------------------- 1 | (0.450737,-0.814771) (0.106401,0.714656) (0.339355,0.56588) (0.214593,-0.511763) (-0.00203533,0.222313) (0.803937,0.613856) (-0.0456317,0.192855) (0.2844,-0.407691) (-0.216337,-0.063701) (0.14272,0.47962) (1.15579,-0.062616) (0.0835331,-0.872008) (-0.15086,-0.22698) (-0.185256,0.527588) (0.0239707,0.365015) (1.22103,0.096758) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix44.gate: -------------------------------------------------------------------------------- 1 | (0.157414,0.501207) (-0.0984337,-0.954716) (-0.495103,0.0403548) (-0.714832,0.657379) (0.000961856,-0.427569) (0.586145,0.0735116) (0.0913387,0.826074) (0.464536,-0.458537) (-0.309981,0.443674) (0.0632723,0.793766) (0.306887,0.645051) (0.150565,-0.355092) (-0.223955,-0.0236785) (-0.431872,0.475315) (-0.793481,0.629879) (1.17497,0.486441) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix45.gate: -------------------------------------------------------------------------------- 1 | (0.568407,0.0934129) (0.0902428,0.204093) (-0.243721,-0.71013) (0.61591,-0.792986) (-0.293928,-0.515491) (1.31257,-0.102601) (-0.404268,-0.216425) (0.0226888,-1.10931) (-0.202319,-0.448349) (-0.625915,-0.656085) (0.457915,-0.400342) (-0.542908,0.916466) (0.280517,-0.327183) (-0.123166,0.895936) (-0.0135427,-0.152804) (1.2463,0.379292) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix46.gate: -------------------------------------------------------------------------------- 1 | (1.08537,-0.867083) (0.428691,-0.756743) (-0.526406,0.283196) (-0.106687,-0.660267) (-0.115081,0.386554) (0.418949,0.644058) (0.531064,-0.60069) (-0.107784,0.280169) (0.265337,0.0922361) (0.526572,-0.434741) (0.573511,0.169183) (0.176965,-0.2595) (0.179681,0.689554) (-0.230903,0.663351) (0.285417,-0.634758) (1.01735,-0.116155) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix47.gate: -------------------------------------------------------------------------------- 1 | (0.64369,-0.836747) (0.324258,0.570757) (0.128883,-0.0490102) (-0.396409,-0.344706) (-0.0826278,-0.271336) (1.16684,-0.162262) (-0.0657913,-0.244193) (-0.074694,0.543448) (0.20367,0.361747) (-0.152579,0.866624) (1.21061,0.226743) (-0.125594,-1.03722) (-0.103973,-0.050598) (-0.0953935,-0.0215746) (0.00147548,0.312123) (1.1011,-0.23967) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix48.gate: -------------------------------------------------------------------------------- 1 | (0.697869,-0.0112601) (0.37193,0.688934) (-0.377897,0.138385) (0.231878,0.162357) (0.793405,0.515235) (0.723912,-0.314076) (0.226599,0.887808) (0.0630627,-0.439807) (0.170443,-1.13978) (-0.0118922,-0.675796) (1.3443,-0.0416891) (-0.109611,-0.580021) (0.351486,0.0211512) (-0.367804,-0.802898) (0.435378,-0.109744) (0.74863,-0.0935957) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix49.gate: -------------------------------------------------------------------------------- 1 | (1.18761,-0.0128217) (0.180352,0.159764) (-0.0337866,0.78588) (0.464018,0.109153) (0.0390553,-0.166965) (0.541693,0.493016) (0.501417,-0.70265) (-0.336227,-0.810248) (0.394176,-0.806364) (0.252061,-0.505398) (1.16124,0.25216) (-0.304452,-0.922937) (0.369728,0.774193) (0.0413529,-0.019172) (-0.271169,0.356585) (0.8765,-0.469681) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix5.gate: -------------------------------------------------------------------------------- 1 | (0.425945,0.754924) (-0.47184,0.268078) (0.133254,0.688177) (0.111272,0.225957) (0.77113,0.0198132) (0.790626,0.649415) (0.277781,-0.394372) (0.483653,-0.696706) (0.19317,0.853645) (-0.105569,0.54726) (0.504688,-0.674937) (0.208659,-0.00113973) (-0.848468,0.39127) (0.0582236,-0.758852) (-0.372854,0.439121) (0.538841,0.486923) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix50.gate: -------------------------------------------------------------------------------- 1 | (1.44937,0.0354216) (-0.188006,-0.282639) (-0.0461841,0.768824) (0.129494,-0.143623) (-0.169871,0.683404) (1.06927,0.719981) (0.000195739,-0.123142) (0.332325,-0.481842) (-0.0828002,-1.13964) (-0.402726,1.03539) (1.50763,0.269966) (0.315139,-0.385227) (-0.00542604,0.470939) (-0.540478,0.401169) (-0.336004,0.623027) (1.15907,0.66612) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix51.gate: -------------------------------------------------------------------------------- 1 | (0.653382,-0.506128) (0.271277,0.389942) (-0.0375832,-0.699987) (-0.258818,-0.082391) (0.35802,0.0886944) (0.506738,-0.255208) (0.170147,-0.640322) (0.28644,0.373584) (0.0475534,0.00506482) (-0.0405633,-0.256894) (0.893163,0.219608) (0.0816395,-0.0244461) (-0.576412,-0.502055) (0.579827,0.596115) (-0.103231,-0.417242) (0.539091,-0.358153) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix52.gate: -------------------------------------------------------------------------------- 1 | (0.514904,0.302544) (0.0853588,-0.63819) (0.30115,-0.521768) (-0.407484,-0.210937) (-0.14788,-0.276573) (1.05081,0.460653) (-0.333805,0.103009) (0.0424277,-0.59889) (-0.052865,-0.572431) (0.206956,-0.441608) (0.475015,0.530629) (-0.148231,-0.527439) (-0.0621486,-0.812458) (-0.448557,0.578868) (-0.29012,-0.533911) (0.909402,-0.131853) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix53.gate: -------------------------------------------------------------------------------- 1 | (1.31853,0.796062) (0.355969,-0.560982) (-0.138409,0.0198066) (0.611806,-0.971759) (-0.21384,0.428882) (1.03583,-0.0505817) (-0.0535651,-0.201143) (0.1991,0.189966) (0.0328173,-0.852603) (-0.437841,-0.530022) (0.887803,-0.406139) (-0.369012,0.253988) (-0.590384,0.69245) (0.060461,0.521706) (0.0405948,-0.18425) (1.16672,0.789618) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix54.gate: -------------------------------------------------------------------------------- 1 | (0.879013,-0.76431) (-0.209125,-0.733254) (-0.211645,0.0111583) (-0.136457,0.526213) (-0.00779192,0.133051) (0.936268,-0.212008) (0.150052,0.0869185) (0.0854937,-0.35426) (-0.10542,-0.313408) (-0.167961,-0.521154) (1.06198,0.61423) (0.269816,-0.361627) (0.189647,-0.482388) (0.237835,-0.633866) (-0.593983,0.810575) (0.854741,0.870426) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix55.gate: -------------------------------------------------------------------------------- 1 | (1.58521,-0.257036) (0.349436,0.754845) (0.0793054,-0.493254) (0.0372112,-0.377535) (-0.175076,-0.856151) (1.0984,-0.617311) (-0.12894,-0.092632) (-0.220888,-0.168324) (0.124899,0.969244) (-0.0742888,0.595285) (1.08036,0.0212044) (0.323945,0.377133) (-0.0294194,1.06548) (-0.655806,-0.122285) (0.369945,0.599961) (0.818071,-0.471763) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix56.gate: -------------------------------------------------------------------------------- 1 | (1.00735,-0.273405) (0.0299052,0.116799) (0.199536,-0.900448) (0.0274901,0.707796) (-0.0925028,-0.497362) (0.987541,-0.199163) (-0.169612,-0.214428) (0.142626,-0.0489643) (-0.0712218,0.216523) (0.00726839,-0.194693) (0.781499,0.784338) (0.0118291,-0.308865) (-0.025372,0.256047) (-0.0491038,-0.254131) (0.0370496,0.186817) (0.912752,-0.195385) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix57.gate: -------------------------------------------------------------------------------- 1 | (0.658122,0.47787) (0.522463,-0.496518) (0.220455,-0.281619) (0.0534207,0.416083) (0.224313,-0.30057) (0.416139,0.708282) (-0.0116766,-0.10897) (-0.11,0.350486) (-0.128615,0.121796) (-0.110911,0.134816) (0.566516,0.858523) (-0.158488,0.137203) (-0.0892153,0.335273) (0.0243221,0.213425) (0.0068152,0.139411) (0.878476,0.0580467) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix58.gate: -------------------------------------------------------------------------------- 1 | (0.75245,-1.05653) (-0.0266187,0.017682) (-0.425793,-0.435897) (0.717223,0.558288) (0.806404,0.496487) (0.699144,-0.703737) (-0.00166593,-0.385505) (0.0795316,0.585805) (0.53948,0.308704) (0.0942372,-0.687937) (0.561161,0.335636) (-0.0810524,0.872509) (-0.213704,-0.272646) (0.0550683,-0.411036) (-0.231336,0.748324) (0.846222,-0.392597) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix59.gate: -------------------------------------------------------------------------------- 1 | (1.80824,0.394167) (-0.548149,1.10945) (-0.455911,-1.45761) (0.085712,-1.2808) (-0.17717,-0.332535) (0.768421,0.846847) (-0.581727,0.899754) (-0.305044,0.244973) (-0.293522,0.478368) (-0.0289595,-0.48659) (1.45246,0.321815) (0.247801,0.333449) (0.12491,1.24964) (-0.879179,0.477483) (0.322254,-0.925582) (1.53169,-0.295593) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix6.gate: -------------------------------------------------------------------------------- 1 | (0.733255,0.768648) (0.27996,-0.424041) (-0.156797,-0.472619) (-0.212255,0.366738) (0.193757,-0.0247838) (1.00991,-0.987859) (-0.434222,-0.737143) (0.261093,0.274357) (-0.204393,0.474184) (0.625516,0.796908) (1.1556,-0.230147) (-0.504788,0.594674) (-0.194138,-0.115569) (-0.290571,-0.457912) (-0.495195,0.694094) (0.447235,0.583033) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix60.gate: -------------------------------------------------------------------------------- 1 | (1.16591,0.000164616) (-0.147388,0.04299) (-0.180446,-0.236293) (0.0601622,0.271339) (-0.438647,-0.134809) (1.39086,-0.000731789) (0.447707,0.638659) (-0.109489,-0.758807) (0.214497,0.760545) (-0.261719,-0.932966) (1.03715,-0.652915) (-0.275257,0.460102) (-0.323602,-0.664528) (0.425662,0.307997) (0.128317,1.01018) (1.00469,-0.203063) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix61.gate: -------------------------------------------------------------------------------- 1 | (1.19954,0.596569) (0.467345,-0.470021) (0.278417,-0.612343) (-0.326421,-0.414535) (-0.0412985,0.919626) (1.34927,-0.216477) (-0.0329055,0.15401) (-0.0280785,-1.02362) (-0.504282,0.219928) (0.0169485,1.04724) (0.750805,0.473715) (0.577104,-0.411923) (-0.162504,0.2924) (0.452226,0.550876) (0.141275,-0.594046) (1.11084,-0.290783) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix62.gate: -------------------------------------------------------------------------------- 1 | (0.911692,-0.929399) (-0.243902,0.141473) (-0.0588721,-0.646737) (0.161032,0.0783009) (-0.932458,-0.527689) (1.78142,0.650142) (-0.678915,1.14325) (-0.103936,-1.13966) (-0.150566,1.11106) (0.425351,-0.911506) (1.18001,1.09427) (-0.461704,0.196019) (-0.45438,-0.828488) (0.223989,1.22386) (-0.803543,0.406632) (1.30795,-0.628218) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix63.gate: -------------------------------------------------------------------------------- 1 | (1.25661,0.432191) (-0.30168,-0.293888) (-0.287893,-0.808722) (-0.0661415,-0.543106) (-0.0590662,0.420381) (1.0401,-0.225843) (0.193043,-0.196597) (0.328181,0.364868) (0.25754,0.619899) (-0.276057,-0.740651) (0.845766,-0.885574) (0.258395,-0.185399) (0.226208,0.128349) (-0.243126,-0.108596) (-0.348844,-0.397686) (0.636012,-0.903316) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix64.gate: -------------------------------------------------------------------------------- 1 | (1.06753,0.129341) (0.0788721,-0.291595) (-0.138941,0.496071) (-0.0505039,0.0100253) (-0.210176,0.217603) (0.858214,-0.816524) (0.0898987,0.334295) (-0.0476203,0.729593) (-0.102039,-0.237769) (-0.0601483,-0.724308) (1.0612,0.657198) (-0.126882,0.585657) (-0.373378,0.856856) (0.0055352,-0.103361) (0.0100163,-0.350829) (0.904231,0.66131) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix65.gate: -------------------------------------------------------------------------------- 1 | (0.563483,0.681906) (0.158564,0.0298311) (-0.0155294,0.00483259) (0.0388382,0.528967) (-0.139515,0.677899) (0.757729,-0.0331626) (0.00611938,0.177355) (-0.499551,-0.316248) (-0.465345,-0.0503492) (0.0738063,0.863992) (0.887352,0.165009) (0.328137,0.161626) (0.244969,0.383566) (-0.28201,-0.417656) (0.066368,0.0181469) (0.396705,-0.576667) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix66.gate: -------------------------------------------------------------------------------- 1 | (1.30401,-0.311058) (-0.0690115,0.581694) (0.101854,0.184289) (0.426704,0.797355) (-0.0985725,-0.0297736) (0.935061,-0.736382) (-0.0866583,-0.424089) (-0.161592,-0.376859) (0.170927,0.474907) (-0.205538,0.238729) (0.966589,0.322367) (-0.0594534,0.472873) (-0.390831,-0.909051) (0.684966,0.562451) (0.205041,-0.100501) (1.22308,-0.882068) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix67.gate: -------------------------------------------------------------------------------- 1 | (1.18946,0.95478) (0.240003,-0.756738) (0.0492986,-0.143766) (0.0425607,-0.637905) (-0.0903307,0.871947) (1.0639,0.269274) (0.212544,-0.26117) (0.402747,-0.678119) (-0.443494,0.313642) (0.0873486,0.755863) (1.09829,-0.0644386) (0.337326,0.171714) (-0.204725,0.89237) (0.378313,-0.74264) (-0.0786255,0.360686) (0.93255,0.13014) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix68.gate: -------------------------------------------------------------------------------- 1 | (0.577435,0.877466) (0.245011,0.176136) (-0.0812555,-0.204471) (-0.254012,0.298615) (-0.392462,0.445078) (-0.0365909,-0.349473) (0.564943,0.613735) (-0.000531363,-0.793362) (-0.699954,0.491371) (-0.113559,0.774105) (0.916068,0.275057) (0.448079,-0.703381) (0.0599796,-0.0896905) (-0.414903,-0.608967) (0.145843,0.494086) (0.816638,0.417074) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix69.gate: -------------------------------------------------------------------------------- 1 | (0.690384,-0.786384) (-0.153476,-0.0338623) (0.0315808,0.147582) (0.0803772,0.0229) (0.616805,0.791357) (0.653461,-0.981016) (-0.548478,-0.442357) (0.711974,0.615663) (-0.46273,0.122178) (0.48213,0.735936) (1.174,-0.416302) (-0.215585,0.414649) (0.171653,0.402479) (0.196398,0.295963) (0.18992,0.183092) (0.615708,-0.490787) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix7.gate: -------------------------------------------------------------------------------- 1 | (0.842404,-0.304672) (0.33618,0.929751) (0.249816,-0.454118) (-0.308379,0.518938) (-0.184756,-0.344074) (1.15742,0.158237) (-0.00204383,0.105567) (-0.0639821,0.365332) (0.174068,-0.0426324) (-0.313205,0.809457) (0.771148,0.538025) (-0.106488,-0.092671) (-0.259964,0.841202) (-0.0336198,-0.194026) (0.640896,-0.379518) (0.575248,0.504183) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix70.gate: -------------------------------------------------------------------------------- 1 | (0.500623,-0.336744) (0.0244876,-0.63872) (-0.0461377,0.166398) (0.0223605,0.282679) (0.112621,-0.380393) (0.247081,0.380174) (0.144355,-0.6704) (0.290223,0.222726) (-0.40629,0.52977) (-0.0600238,-0.792708) (0.808271,-0.506414) (0.0956509,0.662608) (0.450685,0.966758) (-0.305379,0.514344) (0.0497323,-0.821269) (1.06292,0.316747) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix71.gate: -------------------------------------------------------------------------------- 1 | (0.617185,0.960781) (0.0608587,0.961639) (0.149112,-0.256811) (-0.384706,0.18206) (0.135613,0.194876) (0.783463,-0.664949) (0.0721151,0.147691) (0.148888,0.399717) (-0.509263,0.233382) (-0.301396,0.419526) (0.898826,0.466397) (-0.0264167,-0.502647) (0.556999,-0.821256) (0.185882,-0.79938) (-0.0494164,-0.137127) (1.25141,0.139239) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix72.gate: -------------------------------------------------------------------------------- 1 | (0.522355,-0.398627) (-0.0107237,-0.709253) (0.00154302,0.118205) (0.352447,0.660352) (0.0434662,-0.515324) (0.493453,0.608983) (0.0156457,0.0553604) (0.218926,0.0554359) (0.109168,0.507155) (0.209151,-0.0818842) (0.929081,-0.126035) (-0.117282,0.457948) (0.118576,0.153409) (0.0404075,0.235032) (0.0186194,0.140301) (0.813661,-0.333043) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix73.gate: -------------------------------------------------------------------------------- 1 | (0.600999,0.265409) (-0.0571425,0.478118) (-0.157555,0.250593) (0.204089,0.0660367) (-0.835465,0.747205) (1.51859,0.352128) (-0.438721,1.00031) (-0.0601768,-1.13519) (0.420917,0.986112) (-0.339725,-0.92203) (1.15763,-0.465582) (-0.40575,0.251426) (0.0603367,-0.450407) (-0.29103,0.950806) (-0.596934,-0.821721) (1.40999,-0.235745) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix74.gate: -------------------------------------------------------------------------------- 1 | (0.90914,-0.60579) (-0.439543,-0.838866) (-0.127249,-0.575179) (-0.134108,0.234069) (0.136798,0.326443) (1.04733,-0.172457) (0.135414,-0.113455) (-0.150782,0.136105) (-0.170545,-0.320688) (0.127921,0.0912064) (0.791862,0.18585) (0.3593,-0.443593) (-0.155591,-0.369839) (-0.548774,0.864069) (0.0967249,-0.204089) (0.481844,0.712666) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix75.gate: -------------------------------------------------------------------------------- 1 | (0.871479,0.144902) (0.743947,-0.582137) (0.476356,-0.200905) (-0.0631704,0.798594) (-0.0376942,-0.0419842) (0.371226,0.481128) (-0.446548,0.615286) (-0.247934,-0.195106) (-0.188224,0.0663702) (-0.321303,0.884501) (0.525507,0.349502) (-0.303663,0.557441) (-0.105991,0.399991) (0.415441,-0.254288) (0.268687,0.176843) (0.745474,0.393118) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix76.gate: -------------------------------------------------------------------------------- 1 | (0.758213,-0.335341) (-0.653314,-0.84704) (-0.417351,0.685316) (0.212831,-0.404997) (-0.430439,-0.419861) (1.12521,-0.381784) (0.0510199,-1.02519) (0.115213,0.759629) (0.0404892,-0.0807012) (0.00672434,0.417677) (0.861359,0.665113) (-0.256149,0.201421) (-0.0929836,0.573333) (0.0313151,-0.822071) (-0.826436,0.516594) (1.22998,0.21036) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix77.gate: -------------------------------------------------------------------------------- 1 | (1.54739,-0.644203) (0.159711,-0.156472) (0.234556,0.825496) (-0.612774,-0.986915) (-0.123581,-1.37918) (1.01402,-0.818517) (0.659185,0.872612) (-0.977223,0.0594817) (-0.8762,-1.06337) (-0.212077,-0.790776) (1.57447,-0.0449364) (-0.477665,1.28581) (0.247394,0.78076) (0.0596906,-0.102485) (-0.203809,0.260405) (1.2156,-0.276931) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix78.gate: -------------------------------------------------------------------------------- 1 | (0.692998,1.17471) (0.23966,0.167507) (-0.865881,0.728854) (-0.704919,0.699945) (0.0148317,0.649168) (0.585342,-0.693963) (-0.23448,0.0709041) (-0.417468,-0.0412155) (0.398535,-0.724528) (0.25437,-0.206174) (1.06165,0.298427) (0.546714,0.963378) (0.418479,0.279556) (-0.298043,-0.323549) (0.03753,0.73776) (0.425086,-0.222717) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix79.gate: -------------------------------------------------------------------------------- 1 | (1.10627,0.221747) (0.0916256,-0.557276) (0.235689,-0.632778) (0.234812,0.182884) (0.272513,0.75331) (1.12224,-0.873567) (0.464152,-0.711453) (0.213512,0.515235) (0.148072,-0.350767) (-0.230498,0.943057) (0.899978,1.17487) (-0.616503,0.425582) (0.12088,-0.893504) (0.190649,0.212556) (0.519226,-0.820324) (1.06718,0.717731) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix8.gate: -------------------------------------------------------------------------------- 1 | (0.856977,0.100346) (0.083394,0.751514) (0.0789667,0.321815) (0.0705391,-0.601845) (-0.0585119,0.139233) (1.11747,-0.617722) (-0.162731,-0.463132) (-0.279037,-0.706635) (-0.014915,0.0311448) (0.109498,1.00779) (1.21895,0.135539) (0.431375,0.308588) (-0.0747783,-0.252882) (0.32543,0.218934) (0.0726244,-0.193835) (0.878296,-0.596386) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix80.gate: -------------------------------------------------------------------------------- 1 | (0.454518,0.443616) (0.324166,-0.58817) (-0.354291,0.524163) (-0.190849,-0.393646) (0.159616,-0.498055) (1.03841,0.1801) (0.0202381,0.102554) (-0.129137,-0.767357) (-0.161106,0.404072) (0.0696328,0.306142) (0.789435,0.279016) (0.189452,0.0289532) (0.276647,-0.0910867) (0.0196879,0.632921) (0.0328924,-0.309874) (1.183,-0.329271) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix81.gate: -------------------------------------------------------------------------------- 1 | (0.919443,-0.855035) (0.138008,-0.126149) (0.285172,0.238741) (-0.423205,-0.533467) (-0.140274,0.516672) (0.741079,0.692182) (0.0265825,-0.417099) (0.188008,0.503284) (-0.317117,0.0432775) (-0.604559,0.398839) (0.626237,0.67602) (-0.211339,0.417897) (0.212891,0.603089) (-0.359219,0.608375) (-0.10582,0.935607) (0.741219,-0.458714) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix82.gate: -------------------------------------------------------------------------------- 1 | (1.07206,-0.592227) (-0.0636606,0.481002) (0.0632854,0.162759) (-0.371588,-0.392551) (0.131915,0.054032) (1.03461,0.211444) (-0.136281,0.322775) (-0.159254,-0.136573) (-0.184614,-0.326446) (0.688834,-0.528192) (0.579877,0.74103) (-0.118848,0.689106) (0.653151,0.53525) (-0.217315,-0.710463) (0.0907938,0.659675) (0.513355,-0.783485) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix83.gate: -------------------------------------------------------------------------------- 1 | (0.942524,0.263979) (0.0580221,0.179143) (-0.0243642,0.00277708) (-0.0778203,0.227529) (0.0120493,-0.642451) (0.608439,-0.712098) (-0.00512855,-0.679614) (0.19937,-0.288464) (-0.332664,0.123996) (-0.0773565,-0.319649) (0.628943,0.348987) (-0.270577,0.274227) (-0.362467,0.526075) (0.0585523,-0.0270448) (-0.369749,0.570728) (0.632964,0.418834) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix84.gate: -------------------------------------------------------------------------------- 1 | (0.886813,0.0536784) (-0.025586,-0.478134) (0.0523674,-0.108618) (0.182125,0.0557428) (0.122651,-0.189813) (0.676779,-0.161334) (-0.101563,0.319601) (-0.134132,0.457856) (-0.14321,-0.576921) (-0.43795,0.138707) (0.555876,-0.479385) (0.0909489,0.494647) (0.368127,0.0153056) (-0.074587,0.719679) (-0.0426097,0.649135) (0.501148,0.155629) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix85.gate: -------------------------------------------------------------------------------- 1 | (0.738651,-0.099197) (0.14267,0.599605) (0.356533,-0.0227445) (-0.0911712,0.492834) (0.39904,0.646267) (0.310212,-0.32836) (0.0829965,-0.614995) (0.50289,0.589047) (-0.0137009,-0.187782) (-0.0518468,0.204729) (1.20934,0.0917572) (0.114722,0.49846) (-0.420761,-0.0763508) (0.533625,0.362226) (0.00739205,-0.684014) (0.746316,-0.548327) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix86.gate: -------------------------------------------------------------------------------- 1 | (0.963535,0.0630202) (0.243005,-0.606333) (-0.501483,0.507066) (-0.0873189,-0.00201544) (0.222527,0.60947) (1.04719,0.462333) (0.2411,-0.88886) (0.0942071,-0.207555) (-0.16979,0.556822) (0.255631,-0.066973) (0.629764,0.356437) (-0.0364392,0.0131977) (-0.20234,1.02475) (0.0770262,0.594116) (0.140963,-0.543132) (1.01795,0.276632) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix87.gate: -------------------------------------------------------------------------------- 1 | (0.909606,-0.500343) (-0.594989,-0.531451) (0.000219151,-0.660208) (0.458817,-0.989268) (-0.252457,-0.648538) (0.975988,-0.04144) (-0.415556,0.0359798) (-0.512136,0.62153) (0.120816,0.679426) (0.218401,-0.585154) (1.10479,-0.137074) (0.36643,0.647754) (-0.323742,-0.0247371) (0.250652,-0.336211) (-0.156294,0.583955) (0.713145,0.79488) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix88.gate: -------------------------------------------------------------------------------- 1 | (1.30143,-0.631443) (0.0796094,-0.880674) (-0.354876,-0.311864) (-0.339571,0.523874) (-0.0445318,0.717819) (1.05437,0.2984) (0.55571,-0.689729) (-0.189841,-0.809297) (-0.484792,0.148549) (-0.457757,0.281111) (0.796461,1.0365) (0.608551,-0.611707) (0.257479,-0.944912) (-0.0348392,-1.08319) (-0.614201,0.0202023) (0.776364,0.694695) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix89.gate: -------------------------------------------------------------------------------- 1 | (0.711813,0.484564) (0.0459297,-0.732648) (0.377715,-0.688691) (-0.0558473,0.285075) (-0.0269977,-0.124924) (1.02562,-0.0273782) (-0.0549034,0.059242) (0.028786,-0.172199) (0.375291,-0.400278) (-0.321842,-0.181444) (0.740765,0.227621) (-0.0415969,0.346675) (0.441084,-0.787699) (-0.449668,0.795053) (-0.379084,-0.117269) (1.14811,0.325229) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix9.gate: -------------------------------------------------------------------------------- 1 | (1.09357,0.815335) (0.133522,-0.491517) (-0.336215,0.764146) (0.234433,-0.346072) (-0.350366,0.329406) (0.855,0.0661974) (-0.328288,-0.127319) (0.128657,0.607369) (0.159624,-0.430918) (-0.21369,0.441019) (1.05562,0.473555) (-0.216307,-0.0604524) (-0.152353,0.67417) (0.0843459,0.738316) (-0.308874,0.602895) (0.851175,-0.234271) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix90.gate: -------------------------------------------------------------------------------- 1 | (0.402486,0.480692) (0.609343,-0.356731) (-0.039552,0.828688) (-0.305467,0.146642) (0.0906181,-0.566582) (0.894171,0.322291) (0.262342,0.630787) (0.0849297,-0.0696965) (-0.240103,0.557415) (0.265428,-0.443173) (0.813994,-0.286197) (-0.163192,0.129373) (0.150396,-0.517398) (0.177189,-0.489522) (0.341071,0.383857) (0.780249,0.685462) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix91.gate: -------------------------------------------------------------------------------- 1 | (0.620952,0.265919) (0.316193,-0.949487) (-0.108113,0.209104) (0.380772,0.450492) (0.0859383,-0.826586) (0.744034,-0.307823) (-0.259351,0.377264) (0.552906,0.428005) (-0.609084,0.836539) (-0.0877769,0.793562) (0.640767,0.728495) (-0.364831,-0.655087) (-0.742074,-0.502813) (-0.878762,-0.693032) (0.168979,0.675575) (1.24682,-1.1141) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix92.gate: -------------------------------------------------------------------------------- 1 | (0.538316,-0.63564) (-0.178064,-0.251718) (0.0173289,0.159316) (0.188201,-0.0975882) (-0.47186,-0.90581) (1.0566,0.423173) (0.0807316,0.214554) (-0.443159,0.64599) (0.571287,0.537545) (-0.641789,0.438743) (0.512541,0.602239) (0.531523,-0.799886) (-0.339499,0.384245) (0.606733,-0.589722) (0.215716,-0.152636) (0.721817,0.996723) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix93.gate: -------------------------------------------------------------------------------- 1 | (1.13041,0.379778) (0.0256409,0.627541) (-0.109854,0.687093) (0.0419134,-0.609467) (-0.142435,-0.498831) (0.944912,-0.668858) (0.21052,-0.00901709) (-0.0322505,0.141678) (0.282532,0.530789) (-0.14796,0.181169) (0.642744,-0.253618) (-0.222143,-0.60513) (0.237854,0.736702) (-0.281114,0.00123945) (-0.432526,-0.207547) (0.809016,-0.744044) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix94.gate: -------------------------------------------------------------------------------- 1 | (0.111225,0.364199) (-0.489434,0.580201) (-0.0268062,0.340977) (0.275132,-0.388542) (-0.335816,0.667926) (0.761921,0.156183) (-0.31974,-0.431267) (-0.0181711,-0.469107) (-0.468131,0.627169) (-0.336758,0.362562) (0.804266,-0.327549) (0.183816,-0.25328) (0.0746806,-0.144517) (0.283692,0.219496) (-0.178144,-0.398378) (0.495018,-0.847482) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix95.gate: -------------------------------------------------------------------------------- 1 | (0.935626,-0.706557) (0.0270434,0.510361) (-0.0219216,0.380022) (0.358515,0.454993) (-0.25208,-0.077065) (0.798709,0.54765) (0.455972,-0.238724) (0.308948,-0.87667) (0.176431,-0.257568) (0.0798719,0.0550167) (0.581428,0.709713) (-0.118175,0.691295) (-0.153875,-0.37705) (0.114019,-0.0567842) (-0.0326318,0.336841) (0.885856,-0.346785) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix96.gate: -------------------------------------------------------------------------------- 1 | (0.656204,0.331846) (-0.17213,-0.570484) (0.406045,-0.03863) (-0.0974406,0.487553) (-0.380339,-0.819968) (0.358468,-0.575682) (-0.21331,0.593695) (-0.474621,-0.487414) (-0.385715,0.618105) (0.259144,0.0386434) (1.20351,0.719608) (-0.167537,0.891377) (0.274055,0.273255) (0.0506631,-0.129715) (0.073282,-0.831485) (1.1673,-0.49514) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix97.gate: -------------------------------------------------------------------------------- 1 | (1.10082,-0.478015) (-0.195133,0.212935) (0.0718107,-0.824739) (0.520074,0.455841) (-0.0116936,-0.280673) (0.407878,-0.585208) (-0.157785,-0.807828) (0.966096,0.48544) (-0.0207787,0.591837) (-0.305257,-0.614937) (1.10664,0.144756) (0.312531,0.505997) (0.194863,0.0119311) (-0.0828117,0.172473) (-0.0882188,-0.540243) (0.845537,-0.689562) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix98.gate: -------------------------------------------------------------------------------- 1 | (0.52401,0.383259) (0.165393,-0.149315) (0.612874,-0.359569) (0.11835,0.648743) (0.470964,-0.484726) (0.637176,0.584144) (-0.259624,-0.162596) (0.230411,-0.0678664) (0.479774,-0.156701) (-0.677001,0.239765) (0.587504,0.667) (0.0506285,0.614689) (0.120584,0.0980324) (0.0542654,0.689183) (0.117991,-0.460706) (1.01724,-0.445925) -------------------------------------------------------------------------------- /Samples/arbitrary2qubitmatrixset/matrix99.gate: -------------------------------------------------------------------------------- 1 | (0.751871,-0.467418) (-0.405286,-0.751239) (0.0742792,-0.865366) (0.487068,0.0354701) (-0.401054,-0.603198) (0.707633,-0.450367) (-0.324664,0.685717) (-0.133616,0.32721) (0.215603,0.222119) (0.380067,-0.0577983) (0.904494,0.14402) (-0.145467,0.69566) (-0.434239,-0.331897) (-0.317557,-0.607152) (-0.0906964,0.700318) (0.921029,0.175615) -------------------------------------------------------------------------------- /Samples/arbitraryGateExample.qasm: -------------------------------------------------------------------------------- 1 | 4 2 | def1 Zee zee.gate 3 | Zee 0 4 | X 0 5 | Y 0 6 | Z 0 7 | SWAP 0 1 8 | CRk 1 2 9 | def2 Cz cz.gate 10 | Cz 0 3 -------------------------------------------------------------------------------- /Samples/bell_pair.qasm: -------------------------------------------------------------------------------- 1 | 2 2 | H 0 3 | CNOT 0 1 -------------------------------------------------------------------------------- /Samples/catState100Qubits.qasm: -------------------------------------------------------------------------------- 1 | 100 2 | H 0 3 | CNOT 0 1 4 | CNOT 1 2 5 | CNOT 2 3 6 | CNOT 3 4 7 | CNOT 4 5 8 | CNOT 5 6 9 | CNOT 6 7 10 | CNOT 7 8 11 | CNOT 8 9 12 | CNOT 9 10 13 | CNOT 10 11 14 | CNOT 11 12 15 | CNOT 12 13 16 | CNOT 13 14 17 | CNOT 14 15 18 | CNOT 15 16 19 | CNOT 16 17 20 | CNOT 17 18 21 | CNOT 18 19 22 | CNOT 19 20 23 | CNOT 20 21 24 | CNOT 21 22 25 | CNOT 22 23 26 | CNOT 23 24 27 | CNOT 24 25 28 | CNOT 25 26 29 | CNOT 26 27 30 | CNOT 27 28 31 | CNOT 28 29 32 | CNOT 29 30 33 | CNOT 30 31 34 | CNOT 31 32 35 | CNOT 32 33 36 | CNOT 33 34 37 | CNOT 34 35 38 | CNOT 35 36 39 | CNOT 36 37 40 | CNOT 37 38 41 | CNOT 38 39 42 | CNOT 39 40 43 | CNOT 40 41 44 | CNOT 41 42 45 | CNOT 42 43 46 | CNOT 43 44 47 | CNOT 44 45 48 | CNOT 45 46 49 | CNOT 46 47 50 | CNOT 47 48 51 | CNOT 48 49 52 | CNOT 49 50 53 | CNOT 50 51 54 | CNOT 51 52 55 | CNOT 52 53 56 | CNOT 53 54 57 | CNOT 54 55 58 | CNOT 55 56 59 | CNOT 56 57 60 | CNOT 57 58 61 | CNOT 58 59 62 | CNOT 59 60 63 | CNOT 60 61 64 | CNOT 61 62 65 | CNOT 62 63 66 | CNOT 63 64 67 | CNOT 64 65 68 | CNOT 65 66 69 | CNOT 66 67 70 | CNOT 67 68 71 | CNOT 68 69 72 | CNOT 69 70 73 | CNOT 70 71 74 | CNOT 71 72 75 | CNOT 72 73 76 | CNOT 73 74 77 | CNOT 74 75 78 | CNOT 75 76 79 | CNOT 76 77 80 | CNOT 77 78 81 | CNOT 78 79 82 | CNOT 79 80 83 | CNOT 80 81 84 | CNOT 81 82 85 | CNOT 82 83 86 | CNOT 83 84 87 | CNOT 84 85 88 | CNOT 85 86 89 | CNOT 86 87 90 | CNOT 87 88 91 | CNOT 88 89 92 | CNOT 89 90 93 | CNOT 90 91 94 | CNOT 91 92 95 | CNOT 92 93 96 | CNOT 93 94 97 | CNOT 94 95 98 | CNOT 95 96 99 | CNOT 96 97 100 | CNOT 97 98 101 | CNOT 98 99 102 | -------------------------------------------------------------------------------- /Samples/catStateEightQubits.qasm: -------------------------------------------------------------------------------- 1 | 8 2 | H 0 3 | CNOT 0 1 4 | CNOT 1 2 5 | CNOT 2 3 6 | CNOT 3 4 7 | CNOT 4 5 8 | CNOT 5 6 9 | CNOT 6 7 -------------------------------------------------------------------------------- /Samples/contract_using_linegraph_example.inp: -------------------------------------------------------------------------------- 1 | # Line graph decomposition method for contraction 2 | >int threads 8 3 | >string qasm Samples/test_JW.qasm 4 | >string measurement Samples/measureSampleOne.txt 5 | >string contractmethod linegraph-qbb 6 | >int quickbbseconds 20 7 | >string outputpath lg-example.out -------------------------------------------------------------------------------- /Samples/contract_using_stochastic_example.inp: -------------------------------------------------------------------------------- 1 | >string qasm Samples/test_JW.qasm 2 | >string measurement Samples/measureSampleOne.txt 3 | >string contractmethod simple-stoch 4 | >string outputpath outputTestStochastic.out -------------------------------------------------------------------------------- /Samples/control_phase.qasm: -------------------------------------------------------------------------------- 1 | 2 2 | CNOT 0 1 3 | Rz 1.72 1 4 | CNOT 0 1 -------------------------------------------------------------------------------- /Samples/cz.gate: -------------------------------------------------------------------------------- 1 | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 -1 -------------------------------------------------------------------------------- /Samples/hadamard.qasm: -------------------------------------------------------------------------------- 1 | 1 2 | H 0 -------------------------------------------------------------------------------- /Samples/measure125.txt: -------------------------------------------------------------------------------- 1 | X T X T X T X T X T X T X T X T X T X T X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X T T T T X T T X T T T T T T T T T T T T T T T T T T T T X X T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T 2 | -------------------------------------------------------------------------------- /Samples/measureSampleOne.txt: -------------------------------------------------------------------------------- 1 | X X X X X X X X -------------------------------------------------------------------------------- /Samples/measureSampleThree.txt: -------------------------------------------------------------------------------- 1 | 0 T T T -------------------------------------------------------------------------------- /Samples/measureSampleTwo.txt: -------------------------------------------------------------------------------- 1 | X Y Z 1 0 T T T -------------------------------------------------------------------------------- /Samples/qft4.qasm: -------------------------------------------------------------------------------- 1 | 4 2 | #This is a quantum fourier transform circuit for 4 qubits 3 | #Assumes that all states are initialized randomly, are not normalized, and are in the computational basis 4 | 5 | H 0 6 | CRk 1 0 7 | CRk 2 0 8 | CRk 3 0 9 | H 1 10 | CRk 2 1 11 | CRk 3 1 12 | H 2 13 | CRk 3 2 14 | H 3 15 | CNOT 0 3 16 | CNOT 3 0 17 | CNOT 0 3 18 | CNOT 1 2 19 | CNOT 2 1 20 | CNOT 1 2 -------------------------------------------------------------------------------- /Samples/qft8.qasm: -------------------------------------------------------------------------------- 1 | 8 2 | #This is a quantum fourier transform circuit for 8 qubits 3 | #Assumes that all states are initialized randomly, are not normalized, and are in the computational basis 4 | 5 | Rx 1.6 0 6 | Rx 1.7 1 7 | Rx 1.8 2 8 | Rx 1.9 3 9 | Rx 2.0 4 10 | Rx 2.1 5 11 | Rx 2.2 6 12 | Rx 2.3 7 13 | H 0 14 | CRk 1 0 15 | CRk 2 0 16 | CRk 3 0 17 | CRk 4 0 18 | CRk 5 0 19 | CRk 6 0 20 | CRk 7 0 21 | H 1 22 | CRk 2 1 23 | CRk 3 1 24 | CRk 4 1 25 | CRk 5 1 26 | CRk 6 1 27 | CRk 7 1 28 | H 2 29 | CRk 3 2 30 | CRk 4 2 31 | CRk 5 2 32 | CRk 6 2 33 | CRk 7 2 34 | H 3 35 | CRk 4 3 36 | CRk 5 3 37 | CRk 6 3 38 | CRk 7 3 39 | H 4 40 | CRk 5 4 41 | CRk 6 4 42 | CRk 7 4 43 | H 5 44 | CRk 6 5 45 | CRk 7 5 46 | H 6 47 | CRk 7 6 48 | H 7 49 | CNOT 0 7 50 | CNOT 7 0 51 | CNOT 0 7 52 | CNOT 1 6 53 | CNOT 6 1 54 | CNOT 1 6 55 | CNOT 2 5 56 | CNOT 5 2 57 | CNOT 2 5 58 | CNOT 3 4 59 | CNOT 4 3 60 | CNOT 3 4 -------------------------------------------------------------------------------- /Samples/qft8qubitScript.inp: -------------------------------------------------------------------------------- 1 | # Line graph decomposition method for contraction 2 | >int threads 8 3 | >string qasm Samples/qft8.qasm 4 | >string measurement Samples/measureSampleOne.txt 5 | >string contractmethod linegraph-qbb 6 | >int quickbbseconds 20 7 | >string outputpath qft-example.out -------------------------------------------------------------------------------- /Samples/rand-nq6-cn2-d10_rx.qasm: -------------------------------------------------------------------------------- 1 | 6 2 | # Rand circ: nq=6 cnPerCyc=2 totCyc=10 Rx-only 3 | CNOT 4 5 4 | CNOT 2 0 5 | Rx 0.0077 1 6 | Rx 0.0527 3 7 | CNOT 4 1 8 | CNOT 5 3 9 | Rx 0.0992 0 10 | Rx 0.0035 2 11 | CNOT 3 2 12 | CNOT 0 4 13 | Rx 0.059 1 14 | Rx 0.0285 5 15 | CNOT 1 5 16 | CNOT 0 4 17 | Rx 0.0748 2 18 | Rx 0.0416 3 19 | CNOT 1 2 20 | CNOT 0 4 21 | Rx 0.0065 3 22 | Rx 0.0194 5 23 | CNOT 5 0 24 | CNOT 1 2 25 | Rx 0.0263 3 26 | Rx 0.0679 4 27 | CNOT 3 5 28 | CNOT 1 2 29 | Rx 0.0277 0 30 | Rx 0.016 4 31 | CNOT 4 0 32 | CNOT 2 3 33 | Rx 0.0858 1 34 | Rx 0.0873 5 35 | CNOT 1 4 36 | CNOT 2 3 37 | Rx 0.0821 0 38 | Rx 0.0727 5 39 | CNOT 1 3 40 | CNOT 0 2 41 | Rx 0.0859 4 42 | Rx 0.0766 5 43 | -------------------------------------------------------------------------------- /Samples/rand-nq6-cn2-d10_rxyz.qasm: -------------------------------------------------------------------------------- 1 | 6 2 | # Rand circ: nq=6 cnPerCyc=2 totCyc=10 RxRzRz 3 | CNOT 0 2 4 | CNOT 1 5 5 | Rx 0.0676 3 6 | Ry 0.084 4 7 | CNOT 0 3 8 | CNOT 2 1 9 | Rz 0.065 4 10 | Rx 0.0702 5 11 | CNOT 0 4 12 | CNOT 1 2 13 | Ry 0.0999 3 14 | Rx 0.0308 5 15 | CNOT 4 5 16 | CNOT 2 0 17 | Rx 0.0731 1 18 | Rz 0.0475 3 19 | CNOT 3 4 20 | CNOT 5 1 21 | Ry 0.0292 0 22 | Rx 0.0877 2 23 | CNOT 4 3 24 | CNOT 0 5 25 | Rx 0.0366 1 26 | Rz 0.0854 2 27 | CNOT 2 1 28 | CNOT 4 0 29 | Rx 0.0823 3 30 | Ry 0.0862 5 31 | CNOT 4 1 32 | CNOT 3 5 33 | Rx 0.0165 0 34 | Ry 0.0208 2 35 | CNOT 0 1 36 | CNOT 3 2 37 | Rz 0.0613 4 38 | Ry 0.0778 5 39 | CNOT 2 5 40 | CNOT 1 3 41 | Rz 0.0097 0 42 | Rz 0.0415 4 43 | -------------------------------------------------------------------------------- /Samples/rand-nq6-cn2-d10_rxz.qasm: -------------------------------------------------------------------------------- 1 | 6 2 | # Rand circ: nq=6 cnPerCyc=2 totCyc=10 RxRz-only 3 | CNOT 5 2 4 | CNOT 0 1 5 | Rx 0.0065 3 6 | Rx 0.0662 4 7 | CNOT 5 4 8 | CNOT 3 0 9 | Rx 0.0656 1 10 | Rx 0.0499 2 11 | CNOT 0 2 12 | CNOT 1 3 13 | Rz 0.0657 4 14 | Rx 0.0637 5 15 | CNOT 4 5 16 | CNOT 0 1 17 | Rx 0.0358 2 18 | Rx 0.0587 3 19 | CNOT 2 5 20 | CNOT 1 0 21 | Rx 0.0061 3 22 | Rx 0.0039 4 23 | CNOT 2 3 24 | CNOT 4 1 25 | Rz 0.0049 0 26 | Rz 0.0529 5 27 | CNOT 1 0 28 | CNOT 2 3 29 | Rz 0.0845 4 30 | Rz 0.0406 5 31 | CNOT 2 4 32 | CNOT 1 0 33 | Rz 0.0273 3 34 | Rz 0.0247 5 35 | CNOT 2 1 36 | CNOT 5 3 37 | Rx 0.0489 0 38 | Rx 0.065 4 39 | CNOT 2 3 40 | CNOT 1 4 41 | Rz 0.0138 0 42 | Rz 0.0563 5 43 | -------------------------------------------------------------------------------- /Samples/rotationRz.qasm: -------------------------------------------------------------------------------- 1 | 4 2 | CNOT 0 1 3 | CNOT 1 2 4 | CNOT 2 3 5 | Rz 0.1113 3 6 | CNOT 2 3 7 | CNOT 1 2 8 | CNOT 0 1 -------------------------------------------------------------------------------- /Samples/s.gate: -------------------------------------------------------------------------------- 1 | 1 0 0 (0,1) -------------------------------------------------------------------------------- /Samples/swap.qasm: -------------------------------------------------------------------------------- 1 | 2 2 | X 0 3 | SWAP 0 1 -------------------------------------------------------------------------------- /Samples/t.gate: -------------------------------------------------------------------------------- 1 | 1 0 0 (0.707106,0.707106) -------------------------------------------------------------------------------- /Samples/tdagger.gate: -------------------------------------------------------------------------------- 1 | 1 0 0 (0.707106,-0.707106) -------------------------------------------------------------------------------- /Samples/teleportation.qasm: -------------------------------------------------------------------------------- 1 | 3 2 | H 1 3 | CNOT 1 2 4 | CNOT 0 1 5 | H 0 -------------------------------------------------------------------------------- /Samples/tofolli.qasm: -------------------------------------------------------------------------------- 1 | 3 2 | def1 S Samples/s.gate 3 | def1 T Samples/t.gate 4 | def1 Tdag Samples/tdagger.gate 5 | H 2 6 | CNOT 1 2 7 | Tdag 2 8 | CNOT 0 2 9 | T 2 10 | CNOT 1 2 11 | Tdag 2 12 | CNOT 0 2 13 | Tdag 1 14 | T 2 15 | CNOT 0 1 16 | H 2 17 | Tdag 1 18 | CNOT 0 1 19 | T 0 20 | S 1 -------------------------------------------------------------------------------- /Samples/treewidth_example.inp: -------------------------------------------------------------------------------- 1 | # quickbb/treewidth example - check output/qbb-stats.out for results 2 | >int threads 8 3 | >string qasm Samples/test_JW.qasm 4 | >string measurement Samples/measureSampleOne.txt 5 | >string contractmethod linegraph-qbb 6 | >int quickbbseconds 20 7 | >bool qbbonly true -------------------------------------------------------------------------------- /Samples/zee.gate: -------------------------------------------------------------------------------- 1 | 1 0 0 -1 -------------------------------------------------------------------------------- /XregGraphGen/GraphNode.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Eric Schuyler Fried, Nicolas Per Dane Sawaya, Alán Aspuru-Guzik 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions 14 | and limitations under the License. 15 | */ 16 | 17 | 18 | 19 | 20 | 21 | #pragma once 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | 28 | //this struct is a vertex in the graph that counts the number of edges coming out from it 29 | //it also contains a vector of all the connected nodes, and a boolean that is set to true if the node is connected to a graph of more than 0 nodes 30 | struct GraphNode 31 | { 32 | int mEdgeCount{0}; 33 | bool mConnected{false}; 34 | std::vector> mConnections; 35 | }; 36 | -------------------------------------------------------------------------------- /XregGraphGen/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017 Eric Schuyler Fried, Nicolas Per Dane Sawaya 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | 17 | 18 | 19 | all: 20 | g++ -g -std=c++11 main.cpp -o main 21 | -------------------------------------------------------------------------------- /bin/quickbb_32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/bin/quickbb_32 -------------------------------------------------------------------------------- /bin/quickbb_64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/bin/quickbb_64 -------------------------------------------------------------------------------- /nlopt-2.4.2/.libs/libnlopt.0.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/.libs/libnlopt.0.dylib -------------------------------------------------------------------------------- /nlopt-2.4.2/.libs/libnlopt.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/.libs/libnlopt.a -------------------------------------------------------------------------------- /nlopt-2.4.2/.libs/libnlopt.dylib: -------------------------------------------------------------------------------- 1 | libnlopt.0.dylib -------------------------------------------------------------------------------- /nlopt-2.4.2/.libs/libnlopt.la: -------------------------------------------------------------------------------- 1 | ../libnlopt.la -------------------------------------------------------------------------------- /nlopt-2.4.2/.libs/libnlopt.lai: -------------------------------------------------------------------------------- 1 | # libnlopt.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libnlopt.0.dylib' 9 | 10 | # Names of this library. 11 | library_names='libnlopt.0.dylib libnlopt.dylib' 12 | 13 | # The name of the static archive. 14 | old_library='libnlopt.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags=' ' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lm' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libnlopt. 26 | current=8 27 | age=8 28 | revision=2 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/local/lib' 42 | -------------------------------------------------------------------------------- /nlopt-2.4.2/AUTHORS: -------------------------------------------------------------------------------- 1 | NLopt was written/packaged by: 2 | 3 | Steven G. Johnson 4 | 5 | See the subdirectories for the authors of the original nonlinear optimization 6 | libraries utilized by NLopt. 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/COPYING: -------------------------------------------------------------------------------- 1 | NLopt combines several free/open-source nonlinear optimization 2 | libraries by various authors. See the COPYING, COPYRIGHT, and README 3 | files in the subdirectories for the original copyright and licensing 4 | information of these packages. 5 | 6 | The compiled NLopt library, i.e. the combined work of all of the 7 | included optimization routines, is licensed under the conjunction of 8 | all of these licensing terms. Currently, the most restrictive terms 9 | are for the code in the "luksan" directory, which is licensed under 10 | the GNU Lesser General Public License (GNU LGPL), version 2.1 or 11 | later (see luksan/COPYRIGHT). 12 | 13 | That means that the compiled NLopt library is governed by the terms of 14 | the LGPL. 15 | 16 | --------------------------------------------------------------------------- 17 | 18 | Other portions of NLopt, including any modifications to the abovementioned 19 | packages, are licensed under the standard "MIT License:" 20 | 21 | Copyright (c) 2007-2011 Massachusetts Institute of Technology 22 | 23 | Permission is hereby granted, free of charge, to any person obtaining 24 | a copy of this software and associated documentation files (the 25 | "Software"), to deal in the Software without restriction, including 26 | without limitation the rights to use, copy, modify, merge, publish, 27 | distribute, sublicense, and/or sell copies of the Software, and to 28 | permit persons to whom the Software is furnished to do so, subject to 29 | the following conditions: 30 | 31 | The above copyright notice and this permission notice shall be 32 | included in all copies or substantial portions of the Software. 33 | 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 36 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 38 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 39 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 40 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 41 | -------------------------------------------------------------------------------- /nlopt-2.4.2/ChangeLog: -------------------------------------------------------------------------------- 1 | See https://github.com/stevengj/nlopt for a detailed version history. 2 | -------------------------------------------------------------------------------- /nlopt-2.4.2/Makefile.am: -------------------------------------------------------------------------------- 1 | OPTIONS_AUTOMAKE=gnu 2 | lib_LTLIBRARIES = libnlopt@NLOPT_SUFFIX@.la 3 | 4 | ACLOCAL_AMFLAGS=-I m4 5 | 6 | if WITH_CXX 7 | CXX_DIRS = stogo 8 | CXX_LIBS = stogo/libstogo.la 9 | endif 10 | 11 | SUBDIRS = util direct cdirect $(CXX_DIRS) praxis luksan crs mlsl mma cobyla newuoa neldermead auglag bobyqa isres slsqp esch api . octave test swig 12 | EXTRA_DIST = autogen.sh nlopt.pc.in m4 13 | 14 | libnlopt@NLOPT_SUFFIX@_la_SOURCES = 15 | libnlopt@NLOPT_SUFFIX@_la_LIBADD = direct/libdirect.la \ 16 | cdirect/libcdirect.la $(CXX_LIBS) praxis/libpraxis.la \ 17 | luksan/libluksan.la crs/libcrs.la mlsl/libmlsl.la mma/libmma.la \ 18 | cobyla/libcobyla.la newuoa/libnewuoa.la neldermead/libneldermead.la \ 19 | auglag/libauglag.la bobyqa/libbobyqa.la isres/libisres.la \ 20 | slsqp/libslsqp.la esch/libesch.la api/libapi.la util/libutil.la 21 | 22 | if WITH_CXX 23 | libnlopt@NLOPT_SUFFIX@_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ 24 | else 25 | libnlopt@NLOPT_SUFFIX@_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@ 26 | endif 27 | 28 | pkgconfigdir = $(libdir)/pkgconfig 29 | pkgconfig_DATA = nlopt.pc 30 | 31 | if MAINTAINER_MODE 32 | 33 | README: README.md 34 | cp -f $(srcdir)/README.md $@ 35 | 36 | endif 37 | -------------------------------------------------------------------------------- /nlopt-2.4.2/README: -------------------------------------------------------------------------------- 1 | NLopt is a library for nonlinear local and global optimization, for 2 | functions with and without gradient information. It is designed as 3 | as simple, unified interface and packaging of several free/open-source 4 | nonlinear optimization libraries. 5 | 6 | The latest release and a complete manual may be found at the NLopt 7 | home page: http://ab-initio.mit.edu/nlopt 8 | 9 | It is compiled and installed with the standard GNU autoconf/automake 10 | commands: 11 | 12 | ./configure 13 | make 14 | make install 15 | 16 | See `./configure --help` or the `INSTALL` file for other options. To 17 | build the latest development sources: 18 | 19 | git clone git://github.com/stevengj/nlopt 20 | cd nlopt 21 | sh autogen.sh 22 | make 23 | 24 | (To build from git, you will need GNU autoconf, automake, and libtool 25 | installed, along with SWIG and Unix tools such as m4, perl, and sed.) 26 | 27 | Once it is installed, `#include ` in your C/C++ programs and 28 | link it with `-lnlopt -lm`. You may need to use the C++ compiler to link 29 | in order to include the C++ libraries (which are used internally by NLopt, 30 | even though it has a C API). 31 | 32 | The minimization function, `nlopt_minimize`, is described in the [man 33 | page](http://en.wikipedia.org/wiki/Man_page) (`api/nlopt_minimize.3`, 34 | which is installed by `make install`. See also the manual on our 35 | web page. 36 | 37 | There are also interfaces for Fortran, Python, Matlab, Octave, OCaml, 38 | GNU Guile, GNU R, Lua, and Julia. Interfaces for other languages may 39 | be added in the future. 40 | -------------------------------------------------------------------------------- /nlopt-2.4.2/TODO: -------------------------------------------------------------------------------- 1 | Add nonlinearly constrained multistart algorithm. 2 | 3 | Add option to control subspace size (mf) in LBFGS etcetera. 4 | 5 | STOGO has bitrotted - doesn't return proper NLopt codes, doesn't 6 | support forced stop, etcetera. Needs to be fixed. 7 | 8 | If local_optimizer is set, STOGO should use it instead of its 9 | own BFGS. 10 | 11 | Wrappers for GNU R, Java, Perl, Ocaml, C#, ... 12 | -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.deps/deprecated.Plo: -------------------------------------------------------------------------------- 1 | deprecated.lo: deprecated.c nlopt.h \ 2 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stddef.h \ 3 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/__stddef_max_align_t.h 4 | 5 | nlopt.h: 6 | 7 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stddef.h: 8 | 9 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/__stddef_max_align_t.h: 10 | -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.libs/deprecated.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/api/.libs/deprecated.o -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.libs/f77api.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/api/.libs/f77api.o -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.libs/general.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/api/.libs/general.o -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.libs/libapi.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/api/.libs/libapi.a -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.libs/libapi.la: -------------------------------------------------------------------------------- 1 | ../libapi.la -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.libs/optimize.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/api/.libs/optimize.o -------------------------------------------------------------------------------- /nlopt-2.4.2/api/.libs/options.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/api/.libs/options.o -------------------------------------------------------------------------------- /nlopt-2.4.2/api/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/cdirect -I$(top_srcdir)/direct -I$(top_srcdir)/stogo -I$(top_srcdir)/praxis -I$(top_srcdir)/lbfgs -I$(top_srcdir)/luksan -I$(top_srcdir)/crs -I$(top_srcdir)/mlsl -I$(top_srcdir)/mma -I$(top_srcdir)/cobyla -I$(top_srcdir)/newuoa -I$(top_srcdir)/neldermead -I$(top_srcdir)/auglag -I$(top_srcdir)/bobyqa -I$(top_srcdir)/isres -I$(top_srcdir)/slsqp -I$(top_srcdir)/esch -I$(top_srcdir)/util 2 | 3 | include_HEADERS = nlopt.h nlopt.f nlopt.hpp 4 | noinst_LTLIBRARIES = libapi.la 5 | dist_man_MANS = nlopt.3 6 | 7 | libapi_la_SOURCES = general.c options.c optimize.c deprecated.c \ 8 | nlopt-internal.h nlopt.h f77api.c f77funcs.h f77funcs_.h 9 | 10 | BUILT_SOURCES = nlopt.f nlopt.hpp 11 | EXTRA_DIST = nlopt-in.hpp 12 | 13 | if MAINTAINER_MODE 14 | # convert constants to F77 parameter statements & C++ 15 | 16 | nlopt.f: nlopt.h 17 | rm -f $@ 18 | (i=0; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL' $(srcdir)/nlopt.h | tr -d ' =0,' | while read n; do echo " integer $$n"; echo " parameter ($$n=$$i)"; i=`expr $$i + 1`; done; tail -n +`grep -n enum $(srcdir)/nlopt.h |cut -d: -f1 |tail -n 1` $(srcdir)/nlopt.h | grep NLOPT | egrep -v 'EXTERN|DEPRECATED|MINF_MAX' | cut -d, -f1 | tr -d ' ' | perl -pe 's/([A-Za-z0-9_]+)=([-+0-9]+)/ integer \1\n parameter (\1=\2)/') > $(srcdir)/$@ 19 | 20 | nlopt.hpp: nlopt.h nlopt-in.hpp 21 | rm -f $@ 22 | (n=`grep -n GEN_ENUMS_HERE $(srcdir)/nlopt-in.hpp | cut -d: -f1`; head -n $$n $(srcdir)/nlopt-in.hpp; echo " enum algorithm {"; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL|NLOPT_NUM_ALGORITHMS' $(srcdir)/nlopt.h | sed 's/NLOPT_//g'; echo " };"; echo " enum result {"; egrep 'NLOPT_[A-Z_]* =' $(srcdir)/nlopt.h | egrep -v 'NLOPT_[LG][DN]' | sed 's/NLOPT_//g'; echo " };"; tail -n +$$n $(srcdir)/nlopt-in.hpp) > $(srcdir)/$@ 23 | 24 | endif 25 | -------------------------------------------------------------------------------- /nlopt-2.4.2/auglag/.libs/auglag.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/auglag/.libs/auglag.o -------------------------------------------------------------------------------- /nlopt-2.4.2/auglag/.libs/libauglag.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/auglag/.libs/libauglag.a -------------------------------------------------------------------------------- /nlopt-2.4.2/auglag/.libs/libauglag.la: -------------------------------------------------------------------------------- 1 | ../libauglag.la -------------------------------------------------------------------------------- /nlopt-2.4.2/auglag/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libauglag.la 4 | libauglag_la_SOURCES = auglag.c auglag.h 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/auglag/README: -------------------------------------------------------------------------------- 1 | This directory contains my implementation of the "augmented Lagrangian" 2 | method to express constrained optimization problems (including equality 3 | constraints) in terms of unconstrained optimization problems (or just 4 | inequality constraints, or just box constraints). 5 | 6 | I used the algorithm description (but no source code) from the outline 7 | in the paper: 8 | 9 | E. G. Birgin and J. M. Martinez, "Improving ultimate convergence 10 | of an augmented Lagrangian method," Optimization Methods and 11 | Software vol. 23, no. 2, p. 177-195 (2008). 12 | 13 | http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.72.6121 14 | 15 | (The authors of this paper have their own free-software implementation 16 | of this idea and its variations, in the TANGO project: 17 | http://www.ime.usp.br/~egbirgin/tango/ ....I did *not* use any code 18 | from TANGO here, or even look at the TANGO code. TANGO is GPLed, and 19 | I'm trying to keep NLopt at most LGPLed.) 20 | 21 | The code in this directory is under the same MIT license as the rest 22 | of my code in NLopt (see ../COPYRIGHT). 23 | 24 | Steven G. Johnson 25 | November 2008 26 | -------------------------------------------------------------------------------- /nlopt-2.4.2/auglag/auglag.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2014 Massachusetts Institute of Technology 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef AUGLAG_H 24 | #define AUGLAG_H 25 | 26 | #include "nlopt.h" 27 | #include "nlopt-util.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif /* __cplusplus */ 33 | 34 | extern int auglag_verbose; 35 | 36 | nlopt_result auglag_minimize(int n, nlopt_func f, void *f_data, 37 | int m, nlopt_constraint *fc, 38 | int p, nlopt_constraint *h, 39 | const double *lb, const double *ub, /* bounds */ 40 | double *x, /* in: initial guess, out: minimizer */ 41 | double *minf, 42 | nlopt_stopping *stop, 43 | nlopt_opt sub_opt, int sub_has_fc); 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif /* __cplusplus */ 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /nlopt-2.4.2/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | configure_args="" 4 | configure="yes" 5 | 6 | while test $# -ge 1; do 7 | case $1 in 8 | --verbose) verbose=yes ;; 9 | --enable-*) configure_args="$configure_args $1" ;; 10 | --disable-*) configure_args="$configure_args $1" ;; 11 | --with-*) configure_args="$configure_args $1" ;; 12 | --without-*) configure_args="$configure_args $1" ;; 13 | --no-configure) configure="no" ;; 14 | *) echo "unknown argument $1"; exit 1 ;; 15 | esac 16 | shift 17 | done 18 | 19 | touch swig/nlopt.scm.in 20 | 21 | cp README.md README 22 | 23 | # paranoia: sometimes autoconf doesn't get things right the first time 24 | autoreconf --verbose --install --symlink --force 25 | autoreconf --verbose --install --symlink --force 26 | autoreconf --verbose --install --symlink --force 27 | 28 | if test "$configure" = "yes" 29 | then 30 | config=good # hackery so darcs_test still outputs config.log w/failed configure 31 | 32 | ./configure --enable-maintainer-mode $configure_args || config=bad 33 | 34 | if test x$verbose = xyes; then 35 | cat config.log 36 | fi 37 | 38 | test $config = bad && exit 1 39 | fi -------------------------------------------------------------------------------- /nlopt-2.4.2/bobyqa/.libs/bobyqa.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/bobyqa/.libs/bobyqa.o -------------------------------------------------------------------------------- /nlopt-2.4.2/bobyqa/.libs/libbobyqa.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/bobyqa/.libs/libbobyqa.a -------------------------------------------------------------------------------- /nlopt-2.4.2/bobyqa/.libs/libbobyqa.la: -------------------------------------------------------------------------------- 1 | ../libbobyqa.la -------------------------------------------------------------------------------- /nlopt-2.4.2/bobyqa/COPYRIGHT: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 M. J. D. Powell (mjdp@cam.ac.uk) 2 | * Modifications Copyright (c) 2010 Massachusetts Institute of Technology 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining 5 | * a copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sublicense, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be 13 | * included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | 24 | -------------------------------------------------------------------------------- /nlopt-2.4.2/bobyqa/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libbobyqa.la 4 | libbobyqa_la_SOURCES = bobyqa.c bobyqa.h 5 | 6 | EXTRA_DIST = README README.orig COPYRIGHT 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/bobyqa/README: -------------------------------------------------------------------------------- 1 | This is the BOBYQA software by M. J. D. Powell, which performs 2 | derivative-free unconstrained optimization using an iteratively 3 | constructred quadratic approximation for the objective function. See: 4 | 5 | M. J. D. Powell, "The BOBYQA algorithm for bound constrained 6 | optimization without derivatives," Department of Applied 7 | Mathematics and Theoretical Physics, Cambridge England, 8 | technical report NA2009/06 (2009). 9 | 10 | http://www.damtp.cam.ac.uk/user/na/NA_papers/NA2009_06.pdf 11 | http://plato.asu.edu/ftp/other_software/bobyqa.zip 12 | 13 | The C translation by S. G. Johnson (2009) includes a few minor 14 | modifications, mainly to use the NLopt stopping criteria (and to 15 | take the objective function as an argument rather than a global). 16 | 17 | The original Fortran code was released by Powell with "no restrictions 18 | or charges", and the C translation by S. G. Johnson is released in a 19 | similar spirit under the MIT License (see the COPYRIGHT file in this 20 | directory). 21 | -------------------------------------------------------------------------------- /nlopt-2.4.2/bobyqa/bobyqa.h: -------------------------------------------------------------------------------- 1 | #ifndef BOBYQA_H 2 | #define BOBYQA_H 1 3 | 4 | #include "nlopt-util.h" 5 | #include "nlopt.h" 6 | 7 | extern nlopt_result bobyqa(int n, int npt, double *x, 8 | const double *lb, const double *ub, 9 | const double *dx, 10 | nlopt_stopping *stop, double *minf, 11 | nlopt_func f, void *f_data); 12 | 13 | #endif /* BOBYQA_H */ 14 | -------------------------------------------------------------------------------- /nlopt-2.4.2/cdirect/.libs/cdirect.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/cdirect/.libs/cdirect.o -------------------------------------------------------------------------------- /nlopt-2.4.2/cdirect/.libs/hybrid.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/cdirect/.libs/hybrid.o -------------------------------------------------------------------------------- /nlopt-2.4.2/cdirect/.libs/libcdirect.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/cdirect/.libs/libcdirect.a -------------------------------------------------------------------------------- /nlopt-2.4.2/cdirect/.libs/libcdirect.la: -------------------------------------------------------------------------------- 1 | ../libcdirect.la -------------------------------------------------------------------------------- /nlopt-2.4.2/cdirect/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libcdirect.la 4 | libcdirect_la_SOURCES = cdirect.c hybrid.c cdirect.h 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/cdirect/README: -------------------------------------------------------------------------------- 1 | From-scratch re-implementation of the DIRECT and DIRECT-L algorithms 2 | described in: 3 | 4 | D. R. Jones, C. D. Perttunen, and B. E. Stuckmann, 5 | "Lipschitzian optimization without the lipschitz constant," 6 | J. Optimization Theory and Applications, vol. 79, p. 157 (1993). 7 | 8 | J. M. Gablonsky and C. T. Kelley, "A locally-biased form 9 | of the DIRECT algorithm," J. Global Optimization 21 (1), 10 | p. 27-37 (2001). 11 | 12 | I re-implemented the algorithms for a couple of reasons. First, 13 | because I was interested in the algorithms and wanted to play with 14 | them by trying some variations (originally, because I wanted to 15 | experiment with a hybrid approach combining DIRECT with local search 16 | algorithms, see hybrid.c). Second, I wanted to remove some arbitrary 17 | restrictions in the original Fortran code, e.g. a fixed upper bound on 18 | the number of function evaluations. Third, because it was fun to 19 | code. As far as I can tell, my version converges in about the same 20 | number of iterations as Gablonsky's code (with occasional slight 21 | differences due to minor differences in how I break ties, etc.). 22 | 23 | The code in this directory is under the same MIT license as the rest 24 | of my code in NLopt (see ../COPYRIGHT). 25 | 26 | Steven G. Johnson 27 | -------------------------------------------------------------------------------- /nlopt-2.4.2/cobyla/.libs/cobyla.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/cobyla/.libs/cobyla.o -------------------------------------------------------------------------------- /nlopt-2.4.2/cobyla/.libs/libcobyla.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/cobyla/.libs/libcobyla.a -------------------------------------------------------------------------------- /nlopt-2.4.2/cobyla/.libs/libcobyla.la: -------------------------------------------------------------------------------- 1 | ../libcobyla.la -------------------------------------------------------------------------------- /nlopt-2.4.2/cobyla/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright (c) 1992, Michael J. D. Powell (M.J.D.Powell@damtp.cam.ac.uk) 2 | Copyright (c) 2004, Jean-Sebastien Roy (js@jeannot.org) 3 | Copyright (c) 2008, Steven G. Johnson (stevenj@alum.mit.edu) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a 6 | copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included 14 | in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /nlopt-2.4.2/cobyla/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libcobyla.la 4 | libcobyla_la_SOURCES = cobyla.c cobyla.h 5 | 6 | EXTRA_DIST = README COPYRIGHT README.orig 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/cobyla/README: -------------------------------------------------------------------------------- 1 | This code implements COBYLA (Constrained Optimization BY Linear 2 | Approximations) algorithm derivative free optimization with nonlinear 3 | inequality constraints by M. J. D. Powell, described by: 4 | 5 | M. J. D. Powell, "A direct search optimization method that 6 | models the objective and constraint functions by linear 7 | interpolation," in Advances in Optimization and Numerical 8 | Analysis, eds. S. Gomez and J.-P. Hennart (Kluwer Academic: 9 | Dordrecht, 1994), p. 51-67. 10 | 11 | and reviewed in: 12 | 13 | M. J. D. Powell, "Direct search algorithms for optimization 14 | calculations," Acta Numerica 7, 287-336 (1998). 15 | 16 | It constructs successive linear approximations of the objective 17 | function and constraints via a simplex of n+1 points (in n 18 | dimensions), and optimizes these approximations in a trust region at 19 | each step. 20 | 21 | The original code itself was written in Fortran by Powell, and 22 | apparently released without restrictions (like several of his other 23 | programs), and was converted to C in 2004 by Jean-Sebastien Roy 24 | (js@jeannot.org) for the SciPy project. The C version was released 25 | under the attached license (basically the MIT license) at: 26 | http://www.jeannot.org/~js/code/index.en.html#COBYLA 27 | 28 | It was incorporated into NLopt in 2008 by S. G. Johnson, and kept under 29 | the same MIT license. In incorporating it into NLopt, SGJ adapted it 30 | to include the NLopt stopping conditions (the original code provided 31 | an x tolerance and a maximum number of function evaluations only). 32 | 33 | The original COBYLA did not have explicit support for bound 34 | constraints; these are included as linear constraints along with any 35 | other nonlinear constraints. This is mostly fine---linear constraints 36 | are handled exactly by COBYLA's linear approximations. However, 37 | occasionally COBYLA takes a "simplex" step, either to create the 38 | initial simplex or to fix a degenerate simplex, and these steps could 39 | violate the bound constraints. SGJ modified COBYLA to explicitly 40 | honor the bound constraints in these cases, so that the 41 | objective/constraints are never evaluated outside of the bound 42 | constraints, without slowing convergence. 43 | -------------------------------------------------------------------------------- /nlopt-2.4.2/cobyla/cobyla.h: -------------------------------------------------------------------------------- 1 | /* cobyla : contrained optimization by linear approximation */ 2 | 3 | /* 4 | * Copyright (c) 1992, Michael J. D. Powell (M.J.D.Powell@damtp.cam.ac.uk) 5 | * Copyright (c) 2004, Jean-Sebastien Roy (js@jeannot.org) 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a 8 | * copy of this software and associated documentation files (the 9 | * "Software"), to deal in the Software without restriction, including 10 | * without limitation the rights to use, copy, modify, merge, publish, 11 | * distribute, sublicense, and/or sell copies of the Software, and to 12 | * permit persons to whom the Software is furnished to do so, subject to 13 | * the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included 16 | * in all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | */ 26 | 27 | /* 28 | * This software is a C version of COBYLA2, a contrained optimization by linear 29 | * approximation package developed by Michael J. D. Powell in Fortran. 30 | * 31 | * The original source code can be found at : 32 | * http://plato.la.asu.edu/topics/problems/nlores.html 33 | */ 34 | 35 | /* $Jeannot: cobyla.h,v 1.10 2004/04/18 09:51:37 js Exp $ */ 36 | 37 | #ifndef _COBYLA_ 38 | #define _COBYLA_ 39 | 40 | #include "nlopt.h" 41 | #include "nlopt-util.h" 42 | 43 | #ifdef __cplusplus 44 | extern "C" 45 | { 46 | #endif /* __cplusplus */ 47 | 48 | /* NLopt-style interface function */ 49 | nlopt_result cobyla_minimize(unsigned n, nlopt_func f, void *f_data, 50 | unsigned m, nlopt_constraint *fc, 51 | unsigned p, nlopt_constraint *h, 52 | const double *lb, const double *ub, /* bounds */ 53 | double *x, /* in: initial guess, out: minimizer */ 54 | double *minf, 55 | nlopt_stopping *stop, 56 | const double *dx); 57 | 58 | #ifdef __cplusplus 59 | } 60 | #endif 61 | 62 | #endif /* _COBYLA_ */ 63 | -------------------------------------------------------------------------------- /nlopt-2.4.2/crs/.libs/crs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/crs/.libs/crs.o -------------------------------------------------------------------------------- /nlopt-2.4.2/crs/.libs/libcrs.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/crs/.libs/libcrs.a -------------------------------------------------------------------------------- /nlopt-2.4.2/crs/.libs/libcrs.la: -------------------------------------------------------------------------------- 1 | ../libcrs.la -------------------------------------------------------------------------------- /nlopt-2.4.2/crs/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libcrs.la 4 | libcrs_la_SOURCES = crs.c crs.h 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/crs/README: -------------------------------------------------------------------------------- 1 | This is my implementation of the "controlled random search" (CRS2) algorithm 2 | with the "local mutation" modification, as defined by: 3 | 4 | P. Kaelo and M. M. Ali, "Some variants of the controlled random 5 | search algorithm for global optimization," J. Optim. Theory Appl. 6 | 130 (2), 253-264 (2006). 7 | 8 | The original CRS2 algorithm was described by: 9 | 10 | W. L. Price, "A controlled random search procedure for global 11 | optimization," in Towards Global Optimization 2, p. 71-84 12 | edited by L. C. W. Dixon and G. P. Szego (North-Holland Press, 13 | Amsterdam, 1978). 14 | 15 | It is under the same MIT license as the rest of my code in NLopt (see 16 | ../COPYRIGHT). 17 | 18 | Steven G. Johnson 19 | September 2007 20 | -------------------------------------------------------------------------------- /nlopt-2.4.2/crs/crs.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2014 Massachusetts Institute of Technology 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef CRS_H 24 | #define CRS_H 25 | 26 | #include "nlopt.h" 27 | #include "nlopt-util.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif /* __cplusplus */ 33 | 34 | nlopt_result crs_minimize(int n, nlopt_func f, void *f_data, 35 | const double *lb, const double *ub, /* bounds */ 36 | double *x, /* in: initial guess, out: minimizer */ 37 | double *minf, 38 | nlopt_stopping *stop, 39 | int population, /* initial population (0=default) */ 40 | int random); /* random or low-discrepancy seq. */ 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif /* __cplusplus */ 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/.libs/DIRect.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/direct/.libs/DIRect.o -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/.libs/DIRserial.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/direct/.libs/DIRserial.o -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/.libs/DIRsubrout.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/direct/.libs/DIRsubrout.o -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/.libs/direct_wrap.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/direct/.libs/direct_wrap.o -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/.libs/libdirect.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/direct/.libs/libdirect.a -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/.libs/libdirect.la: -------------------------------------------------------------------------------- 1 | ../libdirect.la -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/AUTHORS: -------------------------------------------------------------------------------- 1 | C conversion: Steven G. Johnson (stevenj@alum.mit.edu) 2 | Original Fortran code: Joerg.M.Gablonsky (jmgablon@mailandnews.com) 3 | -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/COPYING: -------------------------------------------------------------------------------- 1 | This code is based on the DIRECT 2.0.4 Fortran code by Gablonsky et al. at 2 | http://www4.ncsu.edu/~ctk/SOFTWARE/DIRECTv204.tar.gz 3 | The C version was initially converted via f2c and then cleaned up and 4 | reorganized by Steven G. Johnson (stevenj@alum.mit.edu), August 2007. 5 | 6 | ******** Copyright and license for the original Fortran DIRECT code ******** 7 | Copyright (c) 1999, 2000, 2001 North Carolina State University 8 | 9 | This program is distributed under the MIT License (see 10 | http://www.opensource.org/licenses/mit-license.php): 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining a copy of 13 | this software and associated documentation files (the "Software"), to deal in 14 | the Software without restriction, including without limitation the rights to 15 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 16 | of the Software, and to permit persons to whom the Software is furnished to do 17 | so, subject to the following conditions: 18 | 19 | The above copyright notice and this permission notice shall be included in all 20 | copies or substantial portions of the Software. 21 | 22 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 28 | SOFTWARE. 29 | -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libdirect.la 4 | libdirect_la_SOURCES = DIRect.c direct_wrap.c DIRserial.c DIRsubrout.c \ 5 | direct-internal.h direct.h 6 | 7 | EXTRA_DIST = README AUTHORS COPYING DIRparallel.c tstc.c userguide.pdf 8 | -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/README: -------------------------------------------------------------------------------- 1 | The DIRECT algorithm (DIviding RECTangles) is a derivative-free global 2 | optimization algorithm invented by Jones et al.: 3 | 4 | D. R. Jones, C. D. Perttunen, and B. E. Stuckmann, 5 | "Lipschitzian optimization without the lipschitz constant," 6 | J. Optimization Theory and Applications, vol. 79, p. 157 (1993). 7 | 8 | This is a deterministic-search algorithm based on systematic division 9 | of the search domain into smaller and smaller hyperrectangles. 10 | 11 | The implementation is based on the 1998-2001 Fortran version by 12 | J. M. Gablonsky at North Carolina State University, converted to C by 13 | Steven G. Johnson. The Fortran source was downloaded from: 14 | 15 | http://www4.ncsu.edu/~ctk/SOFTWARE/DIRECTv204.tar.gz 16 | 17 | Gablonsky et al implemented a modified version of the original DIRECT 18 | algorithm, as described in: 19 | 20 | J. M. Gablonsky and C. T. Kelley, "A locally-biased form 21 | of the DIRECT algorithm," J. Global Optimization 21 (1), 22 | p. 27-37 (2001). 23 | 24 | Both the original Jones algorithm (NLOPT_GLOBAL_DIRECT) and the 25 | Gablonsky modified version (NLOPT_GLOBAL_DIRECT_L) are implemented 26 | and available from the NLopt interface. The Gablonsky version 27 | makes the algorithm "more biased towards local search" so that it 28 | is more efficient for functions without too many local minima. 29 | 30 | Also, Gablonsky et al. extended the algorithm to handle "hidden 31 | constraints", i.e. arbitrary nonlinear constraints. In NLopt, a 32 | hidden constraint is represented by returning NaN (or Inf, or 33 | HUGE_VAL) from the objective function at any points violating the 34 | constraint. 35 | 36 | Further information on the DIRECT algorithm and Gablonsky's 37 | implementation can be found in the included userguide.pdf file. 38 | -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/direct.h: -------------------------------------------------------------------------------- 1 | #ifndef DIRECT_H 2 | #define DIRECT_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" 9 | { 10 | #endif /* __cplusplus */ 11 | 12 | typedef double (*direct_objective_func)(int n, const double *x, 13 | int *undefined_flag, 14 | void *data); 15 | 16 | typedef enum { 17 | DIRECT_ORIGINAL, DIRECT_GABLONSKY 18 | } direct_algorithm; 19 | 20 | typedef enum { 21 | DIRECT_INVALID_BOUNDS = -1, 22 | DIRECT_MAXFEVAL_TOOBIG = -2, 23 | DIRECT_INIT_FAILED = -3, 24 | DIRECT_SAMPLEPOINTS_FAILED = -4, 25 | DIRECT_SAMPLE_FAILED = -5, 26 | DIRECT_MAXFEVAL_EXCEEDED = 1, 27 | DIRECT_MAXITER_EXCEEDED = 2, 28 | DIRECT_GLOBAL_FOUND = 3, 29 | DIRECT_VOLTOL = 4, 30 | DIRECT_SIGMATOL = 5, 31 | DIRECT_MAXTIME_EXCEEDED = 6, 32 | 33 | DIRECT_OUT_OF_MEMORY = -100, 34 | DIRECT_INVALID_ARGS = -101, 35 | DIRECT_FORCED_STOP = -102 36 | } direct_return_code; 37 | 38 | #define DIRECT_UNKNOWN_FGLOBAL (-HUGE_VAL) 39 | #define DIRECT_UNKNOWN_FGLOBAL_RELTOL (0.0) 40 | 41 | extern direct_return_code direct_optimize( 42 | direct_objective_func f, void *f_data, 43 | int dimension, 44 | const double *lower_bounds, const double *upper_bounds, 45 | 46 | double *x, double *minf, 47 | 48 | int max_feval, int max_iter, 49 | double start, double maxtime, 50 | double magic_eps, double magic_eps_abs, 51 | double volume_reltol, double sigma_reltol, 52 | int *force_stop, 53 | 54 | double fglobal, 55 | double fglobal_reltol, 56 | 57 | FILE *logfile, 58 | direct_algorithm algorithm); 59 | 60 | #ifdef __cplusplus 61 | } /* extern "C" */ 62 | #endif /* __cplusplus */ 63 | 64 | #endif /* DIRECT_H */ 65 | -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/tstc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "direct.h" 5 | 6 | /* has two global minima at (0.09,-0.71) and (-0.09,0.71), plus 7 | 4 additional local minima */ 8 | static int cnt=0; 9 | double tst_obj(int n, const double *xy, int *undefined_flag, void *unused) 10 | { 11 | double x, y, f; 12 | x = xy[0]; 13 | y = xy[1]; 14 | f = ((x*x)*(4-2.1*(x*x)+((x*x)*(x*x))/3) + x*y + (y*y)*(-4+4*(y*y))); 15 | printf("feval:, %d, %g, %g, %g\n", ++cnt, x,y, f); 16 | return f; 17 | } 18 | 19 | int main(int argc, char **argv) 20 | { 21 | int n = 2; 22 | double x[2], l[2], u[2]; 23 | long int maxits = 0; 24 | int info; 25 | double minf; 26 | int force_stop = 0; 27 | 28 | maxits = argc < 2 ? 100 : atoi(argv[1]); 29 | 30 | l[0] = -3; l[1] = -3; 31 | u[0] = 3; u[1] = 3; 32 | 33 | info = direct_optimize(tst_obj, NULL, n, l, u, x, &minf, 34 | maxits, 500, 35 | 0, 0, 0, 0, 36 | 0.0, -1.0, 37 | &force_stop, 38 | DIRECT_UNKNOWN_FGLOBAL, 0, 39 | stdout, DIRECT_GABLONSKY); 40 | 41 | printf("min f = %g at (%g,%g) after %d evals, return value %d\n", 42 | minf, x[0], x[1], cnt, info); 43 | 44 | return EXIT_SUCCESS; 45 | } 46 | -------------------------------------------------------------------------------- /nlopt-2.4.2/direct/userguide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/direct/userguide.pdf -------------------------------------------------------------------------------- /nlopt-2.4.2/esch/.libs/esch.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/esch/.libs/esch.o -------------------------------------------------------------------------------- /nlopt-2.4.2/esch/.libs/libesch.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/esch/.libs/libesch.a -------------------------------------------------------------------------------- /nlopt-2.4.2/esch/.libs/libesch.la: -------------------------------------------------------------------------------- 1 | ../libesch.la -------------------------------------------------------------------------------- /nlopt-2.4.2/esch/COPYRIGHT: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008-2013 Carlos Henrique da Silva Santos 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | -------------------------------------------------------------------------------- /nlopt-2.4.2/esch/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libesch.la 4 | libesch_la_SOURCES = esch.c esch.h 5 | 6 | EXTRA_DIST = README COPYRIGHT 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/esch/README: -------------------------------------------------------------------------------- 1 | This is Carlos Henrique da Silva Santos's implementation of 2 | a modified version of the Evolutionary Algorithm described in 3 | the following paper and Ph.D. thesis: 4 | 5 | C. H. da Silva Santos, M. S. Gonçalves, and H. E. Hernandez-Figueroa, 6 | "Designing Novel Photonic Devices by Bio-Inspired Computing," 7 | IEEE Photonics Technology Letters 22(15), pp. 1177-1179 (2010). 8 | 9 | C. H. da Silva Santos, "Parallel and Bio-Inspired Computing 10 | Applied to Analyze Microwave and Photonic Metamaterial Strucutures," 11 | University of Campinas, (2010) 12 | http://www.bibliotecadigital.unicamp.br/document/?code=000767537&opt=4&lg=en_US 13 | 14 | The algorithms are adapted from ideas described in: 15 | 16 | H.-G. Beyer and H.-P. Schwefel. Evolution Strategies: A Comprehensive Introduction. Journal Natural Computing, 1(1):3–52, 2002. 17 | 18 | Ingo Rechenberg (1971): Evolutionsstrategie – Optimierung technischer Systeme nach Prinzipien der biologischen Evolution (PhD thesis). Reprinted by Fromman-Holzboog (1973). 19 | 20 | It is distributed under the "MIT license" given in the attached 21 | COPYRIGHT file (similar to the rest of NLopt), and was 22 | supportedfinancially by the São Paulo Science Foundation (FAPESP - 23 | Fundação de Amparo à Pesquisa do Estado de São Paulo) under the grant 24 | 2012/14553-9. 25 | 26 | Carlos Henrique da Silva Santos 27 | January 2013 28 | -------------------------------------------------------------------------------- /nlopt-2.4.2/esch/esch.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008-2013 Carlos Henrique da Silva Santos 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef ES_POP_H 24 | #define ES_POP_H 1 25 | 26 | #include "nlopt-util.h" 27 | 28 | #ifdef __cplusplus 29 | extern "C" 30 | { 31 | #endif /* __cplusplus */ 32 | 33 | nlopt_result chevolutionarystrategy( 34 | unsigned, /* Number of input parameters */ 35 | nlopt_func, /* Recursive Objective Funtion Call */ 36 | void *, /* Data to Objective Function */ 37 | const double*, /* Lower bound values */ 38 | const double*, /* Upper bound values */ 39 | double*, /* in: initial guess, out: minimizer */ 40 | double*, 41 | nlopt_stopping*, /* nlopt stop condition */ 42 | unsigned, /* Number of Parents */ 43 | unsigned); /* Number of Offsprings */ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif /* __cplusplus */ 48 | 49 | #endif /* ES_POP_H */ 50 | -------------------------------------------------------------------------------- /nlopt-2.4.2/isres/.libs/isres.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/isres/.libs/isres.o -------------------------------------------------------------------------------- /nlopt-2.4.2/isres/.libs/libisres.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/isres/.libs/libisres.a -------------------------------------------------------------------------------- /nlopt-2.4.2/isres/.libs/libisres.la: -------------------------------------------------------------------------------- 1 | ../libisres.la -------------------------------------------------------------------------------- /nlopt-2.4.2/isres/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libisres.la 4 | libisres_la_SOURCES = isres.c isres.h 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/isres/README: -------------------------------------------------------------------------------- 1 | This is my implementation of the "Improved Stochastic Ranking 2 | Evolution Strategy" (ISRES) algorithm for nonlinearly-constrained 3 | global optimization, based on the method described in: 4 | 5 | Thomas Philip Runarsson and Xin Yao, "Search biases in constrained 6 | evolutionary optimization," IEEE Trans. on Systems, Man, and Cybernetics 7 | Part C: Applications and Reviews, vol. 35 (no. 2), pp. 233-243 (2005). 8 | 9 | It is a refinement of an earlier method described in: 10 | 11 | Thomas P. Runarsson and Xin Yao, "Stochastic ranking for constrained 12 | evolutionary optimization," IEEE Trans. Evolutionary Computation, 13 | vol. 4 (no. 3), pp. 284-294 (2000). 14 | 15 | This is an independent implementation by S. G. Johnson (2009) based 16 | on the papers above. Runarsson also has his own Matlab implemention 17 | available from his web page: http://www3.hi.is/~tpr 18 | 19 | It is under the same MIT license as the rest of my code in NLopt (see 20 | ../COPYRIGHT). 21 | 22 | Steven G. Johnson 23 | November 2009 24 | -------------------------------------------------------------------------------- /nlopt-2.4.2/isres/isres.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2014 Massachusetts Institute of Technology 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef ISRES_H 24 | #define ISRES_H 25 | 26 | #include "nlopt.h" 27 | #include "nlopt-util.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif /* __cplusplus */ 33 | 34 | nlopt_result isres_minimize(int n, nlopt_func f, void *f_data, 35 | int m, nlopt_constraint *fc, /* fc <= 0 */ 36 | int p, nlopt_constraint *h, /* h == 0 */ 37 | const double *lb, const double *ub, /* bounds */ 38 | double *x, /* in: initial guess, out: minimizer */ 39 | double *minf, 40 | nlopt_stopping *stop, 41 | int population); /* init. population */ 42 | 43 | #ifdef __cplusplus 44 | } /* extern "C" */ 45 | #endif /* __cplusplus */ 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/.libs/libluksan.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/luksan/.libs/libluksan.a -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/.libs/libluksan.la: -------------------------------------------------------------------------------- 1 | ../libluksan.la -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/.libs/mssubs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/luksan/.libs/mssubs.o -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/.libs/plip.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/luksan/.libs/plip.o -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/.libs/plis.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/luksan/.libs/plis.o -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/.libs/pnet.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/luksan/.libs/pnet.o -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/.libs/pssubs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/luksan/.libs/pssubs.o -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/COPYRIGHT: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------- 2 | 3 | Copyright: 4 | 5 | Subroutines PBUN, PNEW, PVAR, PSEN, Copyright ACM, 2001. The original 6 | versions were published in Transactions on Mathematical Software, 7 | Vol.27, 2001, pp.193-213. Here are the author's modifications. They 8 | are posted here by permission of ACM for your personal use. Not for 9 | redistribution. Subroutines PLIP, PSEN, Copyright Jan Vlcek, 2007. 10 | The remaining subroutines, Copyright Ladislav Luksan, 2007. Many of 11 | sparse matrix modules were prepared by Miroslav Tuma. 12 | 13 | License: 14 | 15 | This library (with exception of PBUN, PNEW, PVAR, PSEN) is a free 16 | software; you can redistribute it and/or modify it under the terms 17 | of the GNU Lesser General Public License as published by the Free 18 | Software Foundation; either version 2.1 of the License, or (at your 19 | option) any later version (see http://www.gnu.org/copyleft/gpl.html). 20 | 21 | This library is distributed in the hope that it will be useful, 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | Lesser General Public License for more details. 25 | 26 | Permission is hereby granted to use or copy this program under the 27 | terms of the GNU LGPL, provided that the Copyright, this License, 28 | and the Availability of the original version is retained on all copies. 29 | User documentation of any code that uses this code or any modified 30 | version of this code must cite the Copyright, this License, the 31 | Availability note, and "Used by permission." Permission to modify 32 | the code and to distribute modified code is granted, provided the 33 | Copyright, this License, and the Availability note are retained, 34 | and a notice that the code was modified is included. 35 | 36 | Availability: 37 | 38 | http://www.cs.cas.cz/~luksan/subroutines.html 39 | 40 | Acknowledgements: 41 | 42 | This work was supported by the Grant Agency of the Czech Academy of 43 | Sciences, under grant IAA1030405. 44 | 45 | 46 | -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libluksan.la 4 | libluksan_la_SOURCES = plis.c plip.c pnet.c mssubs.c pssubs.c luksan.h 5 | 6 | EXTRA_DIST = README COPYRIGHT plis.txt v999-07.pdf 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/README: -------------------------------------------------------------------------------- 1 | These routines for nonlinear optimization are based on the Fortran 77 2 | code placed online by Professor Ladislav Luksan at his web site: 3 | 4 | http://www.uivt.cas.cz/~luksan/subroutines.html 5 | 6 | and graciously licensed under the GNU Lesser General Public License 7 | (LGPL). See also the COPYRIGHT file for details. 8 | 9 | The C conversions were done via f2c by S. G. Johnson, with the f2c 10 | output manually cleaned up somewhat, and then converted to use the 11 | NLopt termination conditions, C dynamic allocation, etc. 12 | 13 | In particular, we converted the subroutines PLIS, PLIP, and PNET (as 14 | well as various auxiliary routines required by this code), all of 15 | which solve general nonlinear unconstrained or box-constrained 16 | optimization problems. Prof. Luksan also provides a large number of 17 | more specialized routines for cases where one has additional knowledge 18 | of the objective function, but these cases seem outside the scope of 19 | NLopt. 20 | 21 | [We also did not convert the PMIN, PBUN, PNEW, or PVAR subroutines 22 | since these were published in ACM Trans. on Math. Software (TOMS) and 23 | are subject to the non-free ACM licensing conditions.] 24 | -------------------------------------------------------------------------------- /nlopt-2.4.2/luksan/v999-07.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/luksan/v999-07.pdf -------------------------------------------------------------------------------- /nlopt-2.4.2/m4/ax_c_threadlocal.m4: -------------------------------------------------------------------------------- 1 | dnl @synopsis AX_C_THREADLOCAL([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) 2 | dnl @summary determine C keyword for threadlocal storage 3 | dnl 4 | dnl This macro tries to discover a C keyword to declare variables 5 | dnl as having thread-local storage. Most commonly, this is either 6 | dnl __thread [gcc] or __declspec(thread) [Windows]. 7 | dnl 8 | dnl On success, it #defines the THREADLOCAL preprocessor symbol to 9 | dnl the appropriate keyword. You would then use it in C code as, e.g.: 10 | dnl THREADLOCAL int myvariable; 11 | dnl 12 | dnl ACTION-IF-FOUND is a list of shell commands to run if an thread-local 13 | dnl keyword is found, and ACTION-IF-NOT-FOUND is a list of commands 14 | dnl to run it if one is not found. If ACTION-IF-FOUND is not specified, 15 | dnl the default action does nothing. 16 | dnl 17 | dnl @version 2010-05-28 18 | dnl @license GPLWithACException 19 | dnl @author Steven G. Johnson 20 | AC_DEFUN([AX_C_THREADLOCAL], 21 | [AC_ARG_WITH(threadlocal, 22 | [AC_HELP_STRING([--without-threadlocal], [no thread-local storage keyword])], 23 | with_ax_c_threadlocal=$withval, with_ax_c_threadlocal=yes) 24 | AC_CACHE_CHECK([for C thread-local keyword], ax_cv_c_threadlocal, 25 | [if test "x$with_ax_c_threadlocal" = xno; then 26 | ax_cv_c_threadlocal=disabled 27 | else 28 | ax_cv_c_threadlocal=unsupported 29 | AC_LANG_SAVE 30 | AC_LANG_C 31 | for ax_kw in __thread "__declspec(thread)"; do 32 | AC_TRY_COMPILE([], [static $ax_kw int x = 0;], 33 | [ax_cv_c_threadlocal=$ax_kw; break]) 34 | done 35 | AC_LANG_RESTORE 36 | fi 37 | ]) 38 | ax_kw="$ax_cv_c_threadlocal" 39 | if test "x$ax_kw" = xunsupported; then ax_kw=""; fi 40 | if test "x$ax_kw" = xdisabled; then ax_kw=""; fi 41 | AC_DEFINE_UNQUOTED(THREADLOCAL, $ax_kw, [Define to C thread-local keyword, or to nothing if this is not supported in your compiler.]) 42 | if test "$ax_cv_c_threadlocal" = unsupported; then 43 | m4_default([$2],:) 44 | else 45 | m4_default([$1],:) 46 | fi 47 | ]) 48 | -------------------------------------------------------------------------------- /nlopt-2.4.2/m4/ltversion.m4: -------------------------------------------------------------------------------- 1 | # ltversion.m4 -- version numbers -*- Autoconf -*- 2 | # 3 | # Copyright (C) 2004 Free Software Foundation, Inc. 4 | # Written by Scott James Remnant, 2004 5 | # 6 | # This file is free software; the Free Software Foundation gives 7 | # unlimited permission to copy and/or distribute it, with or without 8 | # modifications, as long as this notice is preserved. 9 | 10 | # @configure_input@ 11 | 12 | # serial 3337 ltversion.m4 13 | # This file is part of GNU Libtool 14 | 15 | m4_define([LT_PACKAGE_VERSION], [2.4.2]) 16 | m4_define([LT_PACKAGE_REVISION], [1.3337]) 17 | 18 | AC_DEFUN([LTVERSION_VERSION], 19 | [macro_version='2.4.2' 20 | macro_revision='1.3337' 21 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 22 | _LT_DECL(, macro_revision, 0) 23 | ]) 24 | -------------------------------------------------------------------------------- /nlopt-2.4.2/mlsl/.libs/libmlsl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/mlsl/.libs/libmlsl.a -------------------------------------------------------------------------------- /nlopt-2.4.2/mlsl/.libs/libmlsl.la: -------------------------------------------------------------------------------- 1 | ../libmlsl.la -------------------------------------------------------------------------------- /nlopt-2.4.2/mlsl/.libs/mlsl.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/mlsl/.libs/mlsl.o -------------------------------------------------------------------------------- /nlopt-2.4.2/mlsl/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libmlsl.la 4 | libmlsl_la_SOURCES = mlsl.c mlsl.h 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/mlsl/README: -------------------------------------------------------------------------------- 1 | This is my implementation of the "Multi-Level Single-Linkage" (MLSL) 2 | algorithm for global optimization by random local optimizations (a 3 | multistart algorithm with "clustering" to avoid repeated detection of 4 | the same local minimum), modified to optionally use a Sobol' 5 | low-discrepancy sequence (LDS) instead of pseudorandom numbers. See: 6 | 7 | A. H. G. Rinnooy Kan and G. T. Timmer, "Stochastic global optimization 8 | methods," Mathematical Programming, vol. 39, p. 27-78 (1987). 9 | [ actually 2 papers -- part I: clustering methods (p. 27), then 10 | part II: multilevel methods (p. 57) ] 11 | 12 | and also: 13 | 14 | Sergei Kucherenko and Yury Sytsko, "Application of deterministic 15 | low-discrepancy sequences in global optimization," Computational 16 | Optimization and Applications, vol. 30, p. 297-318 (2005). 17 | 18 | It is under the same MIT license as the rest of my code in NLopt (see 19 | ../COPYRIGHT). 20 | 21 | Steven G. Johnson 22 | September 2007 23 | -------------------------------------------------------------------------------- /nlopt-2.4.2/mlsl/mlsl.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2014 Massachusetts Institute of Technology 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef MLSL_H 24 | #define MLSL_H 25 | 26 | #include "nlopt.h" 27 | #include "nlopt-util.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif /* __cplusplus */ 33 | 34 | nlopt_result mlsl_minimize(int n, nlopt_func f, void *f_data, 35 | const double *lb, const double *ub, /* bounds */ 36 | double *x, /* in: initial guess, out: minimizer */ 37 | double *minf, 38 | nlopt_stopping *stop, 39 | nlopt_opt local_opt, 40 | int Nsamples, /* #samples/iteration (0=default) */ 41 | int lds); 42 | 43 | #ifdef __cplusplus 44 | } /* extern "C" */ 45 | #endif /* __cplusplus */ 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /nlopt-2.4.2/mma/.libs/ccsa_quadratic.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/mma/.libs/ccsa_quadratic.o -------------------------------------------------------------------------------- /nlopt-2.4.2/mma/.libs/libmma.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/mma/.libs/libmma.a -------------------------------------------------------------------------------- /nlopt-2.4.2/mma/.libs/libmma.la: -------------------------------------------------------------------------------- 1 | ../libmma.la -------------------------------------------------------------------------------- /nlopt-2.4.2/mma/.libs/mma.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/mma/.libs/mma.o -------------------------------------------------------------------------------- /nlopt-2.4.2/mma/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libmma.la 4 | libmma_la_SOURCES = mma.c ccsa_quadratic.c mma.h 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/mma/README: -------------------------------------------------------------------------------- 1 | Implementation of the globally-convergent method-of-moving-asymptotes (MMA) 2 | algorithm for gradient-based local optimization, as described in: 3 | 4 | Krister Svanberg, "A class of globally convergent optimization 5 | methods based on conservative convex separable approximations," 6 | SIAM J. Optim. 12 (2), p. 555-573 (2002). 7 | 8 | In fact, this algorithm is much more general than most of the other 9 | algorithms in NLopt, in that it handles an arbitrary set of nonlinear 10 | (differentiable) constraints as well, in a very efficient manner. 11 | I've implemented the full nonlinear-constrained MMA algorithm, and it 12 | is exported under the nlopt_minimize_constrained API. 13 | 14 | I also implemented another CCSA algorithm from the same paper: instead of 15 | constructing local MMA approximations, it constructs simple quadratic 16 | approximations (or rather, affine approximations plus a quadratic penalty 17 | term to stay conservative). This is the ccsa_quadratic code. It seems 18 | to have similar convergence rates to MMA for most problems, which is not 19 | surprising as they are both essentially similar. However, for the quadratic 20 | variant I implemented the possibility of preconditioning: including a 21 | user-supplied Hessian approximation in the local model. It is easy to 22 | incorporate this into the proof in Svanberg's paper, and to show that 23 | global convergence is still guaranteed as long as the user's "Hessian" 24 | is positive semidefinite, and it practice it can greatly improve convergence 25 | if the preconditioner is a good approximation for (at least for the 26 | largest eigenvectors) the real Hessian. 27 | 28 | It is under the same MIT license as the rest of my code in NLopt (see 29 | ../COPYRIGHT). 30 | 31 | Steven G. Johnson 32 | July 2008 - July 2012 33 | -------------------------------------------------------------------------------- /nlopt-2.4.2/mma/mma.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2014 Massachusetts Institute of Technology 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef MMA_H 24 | #define MMA_H 25 | 26 | #include "nlopt.h" 27 | #include "nlopt-util.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif /* __cplusplus */ 33 | 34 | extern unsigned mma_verbose; 35 | 36 | nlopt_result mma_minimize(unsigned n, nlopt_func f, void *f_data, 37 | unsigned m, nlopt_constraint *fc, 38 | const double *lb, const double *ub, /* bounds */ 39 | double *x, /* in: initial guess, out: minimizer */ 40 | double *minf, 41 | nlopt_stopping *stop, 42 | nlopt_opt dual_opt); 43 | 44 | nlopt_result ccsa_quadratic_minimize( 45 | unsigned n, nlopt_func f, void *f_data, 46 | unsigned m, nlopt_constraint *fc, 47 | 48 | nlopt_precond pre, 49 | 50 | const double *lb, const double *ub, /* bounds */ 51 | double *x, /* in: initial guess, out: minimizer */ 52 | double *minf, 53 | nlopt_stopping *stop, 54 | nlopt_opt dual_opt); 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif /* __cplusplus */ 59 | 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /nlopt-2.4.2/neldermead/.libs/libneldermead.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/neldermead/.libs/libneldermead.a -------------------------------------------------------------------------------- /nlopt-2.4.2/neldermead/.libs/libneldermead.la: -------------------------------------------------------------------------------- 1 | ../libneldermead.la -------------------------------------------------------------------------------- /nlopt-2.4.2/neldermead/.libs/nldrmd.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/neldermead/.libs/nldrmd.o -------------------------------------------------------------------------------- /nlopt-2.4.2/neldermead/.libs/sbplx.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/neldermead/.libs/sbplx.o -------------------------------------------------------------------------------- /nlopt-2.4.2/neldermead/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libneldermead.la 4 | libneldermead_la_SOURCES = nldrmd.c neldermead.h sbplx.c 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/neldermead/neldermead.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2007-2014 Massachusetts Institute of Technology 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining 4 | * a copy of this software and associated documentation files (the 5 | * "Software"), to deal in the Software without restriction, including 6 | * without limitation the rights to use, copy, modify, merge, publish, 7 | * distribute, sublicense, and/or sell copies of the Software, and to 8 | * permit persons to whom the Software is furnished to do so, subject to 9 | * the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be 12 | * included in all copies or substantial portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | */ 22 | 23 | #ifndef NELDERMEAD_H 24 | #define NELDERMEAD_H 25 | 26 | #include "nlopt.h" 27 | #include "nlopt-util.h" 28 | 29 | #ifdef __cplusplus 30 | extern "C" 31 | { 32 | #endif /* __cplusplus */ 33 | 34 | nlopt_result nldrmd_minimize(int n, nlopt_func f, void *f_data, 35 | const double *lb, const double *ub, /* bounds */ 36 | double *x, /* in: initial guess, out: minimizer */ 37 | double *minf, 38 | const double *xstep, /* initial step sizes */ 39 | nlopt_stopping *stop); 40 | 41 | nlopt_result nldrmd_minimize_(int n, nlopt_func f, void *f_data, 42 | const double *lb, const double *ub, /* bounds */ 43 | double *x,/* in: initial guess, out: minimizer */ 44 | double *minf, 45 | const double *xstep, /* initial step sizes */ 46 | nlopt_stopping *stop, 47 | double psi, double *scratch, double *fdiff); 48 | 49 | nlopt_result sbplx_minimize(int n, nlopt_func f, void *f_data, 50 | const double *lb, const double *ub, /* bounds */ 51 | double *x, /* in: initial guess, out: minimizer */ 52 | double *minf, 53 | const double *xstep0, /* initial step sizes */ 54 | nlopt_stopping *stop); 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif /* __cplusplus */ 59 | 60 | #endif 61 | 62 | -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/.libs/libnewuoa.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/newuoa/.libs/libnewuoa.a -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/.libs/libnewuoa.la: -------------------------------------------------------------------------------- 1 | ../libnewuoa.la -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/.libs/newuoa.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/newuoa/.libs/newuoa.o -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/COPYRIGHT: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2004 M. J. D. Powell (mjdp@cam.ac.uk) 2 | * Copyright (c) 2007-2011 Massachusetts Institute of Technology 3 | * 4 | * Permission is hereby granted, free of charge, to any person obtaining 5 | * a copy of this software and associated documentation files (the 6 | * "Software"), to deal in the Software without restriction, including 7 | * without limitation the rights to use, copy, modify, merge, publish, 8 | * distribute, sublicense, and/or sell copies of the Software, and to 9 | * permit persons to whom the Software is furnished to do so, subject to 10 | * the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be 13 | * included in all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | */ 23 | 24 | -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libnewuoa.la 4 | libnewuoa_la_SOURCES = newuoa.c newuoa.h 5 | 6 | EXTRA_DIST = README README.orig COPYRIGHT 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/README: -------------------------------------------------------------------------------- 1 | This is the NEWUOA software by M. J. D. Powell, which performs 2 | derivative-free unconstrained optimization using an iteratively 3 | constructred quadratic approximation for the objective function. See: 4 | 5 | M. J. D. Powell, "The NEWUOA software for unconstrained 6 | optimization without derivatives," Proc. 40th Workshop 7 | on Large Scale Nonlinear Optimization (Erice, Italy, 2004). 8 | 9 | The C translation by S. G. Johnson (2008) includes a few minor 10 | modifications, mainly to use the NLopt stopping criteria (and to 11 | take the objective function as an argument rather than a global). 12 | 13 | The C translation also includes a variant (NEWUOA_BOUND, when the lb 14 | and ub parameters to newuoa are non-NULL) that is substantially 15 | modified in order to support bound constraints on the input variables. 16 | In the original NEWUOA algorithm, Powell solved the quadratic 17 | subproblems (in routines TRSAPP and BIGLAG) in a spherical trust 18 | region via a truncated conjugate-gradient algorithm. In the new 19 | variant, we use the MMA algorithm for these subproblems to solve them 20 | with both bound constraints and a spherical trust region. In principle, 21 | we should also change the BIGDEN subroutine in a similar way (since 22 | BIGDEN also approximately solves a trust-region subproblem), but instead 23 | I just truncated its result to the bounds (which probably gives suboptimal 24 | convergence, but BIGDEN is called only very rarely in practice). 25 | 26 | The original Fortran code was released by Powell with "no restrictions 27 | or charges", and the C translation by S. G. Johnson is released in a 28 | similar spirit under the MIT License (see the COPYRIGHT file in this 29 | directory). 30 | -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/README.orig: -------------------------------------------------------------------------------- 1 | This is the Fortran version of NEWUOA. Its purpose is to seek 2 | the least value of a function F of several variables, when derivatives 3 | are not available, where F is specified by the user through a subroutine 4 | called CALFUN. The algorithm is intended to change the variables to values 5 | that are close to a local minimum of F. The user, however, should assume 6 | responsibility for finding out if the calculations are satisfactory, by 7 | considering carefully the values of F that occur. The method is described 8 | in the report "The NEWUOA software for unconstrained optimization without 9 | derivatives", which is available on the web at www.damtp.cam.ac.uk, where 10 | you have to click on Numerical Analysis and then on Reports, the number 11 | of the report being NA2004/08. Let N be the number of variables. The main 12 | new feature of the method is that quadratic models are updated using only 13 | about NPT=2N+1 interpolation conditions, the remaining freedom being taken 14 | up by minimizing the Frobenius norm of the change to the second derivative 15 | matrix of the model. 16 | 17 | The new software was developed from UOBYQA, which also forms quadratic 18 | models from interpolation conditions. That method requires NPT=(N+1)(N+2)/2 19 | conditions, however, because they have to define all the parameters of the 20 | model. The least Frobenius norm updating procedure with NPT=2N+1 is usually 21 | much more efficient when N is large, because the work of each iteration is 22 | much less than before, and in some experiments the number of calculations 23 | of the objective function seems to be only of magnitude N. 24 | 25 | The attachments in sequence are a suitable Makefile, followed by a main 26 | program and a CALFUN routine for the Chebyquad problems, in order to provide 27 | an example for testing. Then NEWUOA and its five auxiliary routines, namely 28 | NEWUOB, BIGDEN, BIGLAG, TRSAPP and UPDATE, are given. Finally, the computed 29 | output that the author obtained for the Chebyquad problems is listed. 30 | 31 | The way of calling NEWUOA should be clear from the Chebyquad example 32 | and from the comments of that subroutine. It is hoped that the software will 33 | be helpful to much future research and to many applications. There are no 34 | restrictions on or charges for its use. If you wish to refer to it, please 35 | cite the DAMTP report that is mentioned above, which has been submitted for 36 | publication in the proceedings of the 40th Workshop on Large Scale Nonlinear 37 | Optimization (Erice, Italy, 2004). 38 | 39 | December 16th, 2004 M.J.D. Powell (mjdp@cam.ac.uk) 40 | 41 | -------------------------------------------------------------------------------- /nlopt-2.4.2/newuoa/newuoa.h: -------------------------------------------------------------------------------- 1 | #ifndef NEWUOA_H 2 | #define NEWUOA_H 1 3 | 4 | #include "nlopt-util.h" 5 | #include "nlopt.h" 6 | 7 | typedef double (*newuoa_func)(int n, const double *x, void *func_data); 8 | 9 | extern nlopt_result newuoa(int n, int npt, double *x, 10 | const double *lb, const double *ub, 11 | double rhobeg, nlopt_stopping *stop, double *minf, 12 | newuoa_func calfun, void *calfun_data); 13 | 14 | #endif /* NEWUOA_H */ 15 | -------------------------------------------------------------------------------- /nlopt-2.4.2/nlopt.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: NLopt 7 | Description: nonlinear optimization libary 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lnlopt -lm 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/.deps/dummy.Po: -------------------------------------------------------------------------------- 1 | dummy.o: dummy.c /usr/include/stdio.h /usr/include/sys/cdefs.h \ 2 | /usr/include/sys/_symbol_aliasing.h \ 3 | /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ 4 | /usr/include/AvailabilityInternal.h /usr/include/_types.h \ 5 | /usr/include/sys/_types.h /usr/include/machine/_types.h \ 6 | /usr/include/i386/_types.h /usr/include/sys/_pthread/_pthread_types.h \ 7 | /usr/include/sys/_types/_va_list.h /usr/include/sys/_types/_size_t.h \ 8 | /usr/include/sys/_types/_null.h /usr/include/sys/stdio.h \ 9 | /usr/include/sys/_types/_off_t.h /usr/include/sys/_types/_ssize_t.h \ 10 | /usr/include/secure/_stdio.h /usr/include/secure/_common.h 11 | 12 | /usr/include/stdio.h: 13 | 14 | /usr/include/sys/cdefs.h: 15 | 16 | /usr/include/sys/_symbol_aliasing.h: 17 | 18 | /usr/include/sys/_posix_availability.h: 19 | 20 | /usr/include/Availability.h: 21 | 22 | /usr/include/AvailabilityInternal.h: 23 | 24 | /usr/include/_types.h: 25 | 26 | /usr/include/sys/_types.h: 27 | 28 | /usr/include/machine/_types.h: 29 | 30 | /usr/include/i386/_types.h: 31 | 32 | /usr/include/sys/_pthread/_pthread_types.h: 33 | 34 | /usr/include/sys/_types/_va_list.h: 35 | 36 | /usr/include/sys/_types/_size_t.h: 37 | 38 | /usr/include/sys/_types/_null.h: 39 | 40 | /usr/include/sys/stdio.h: 41 | 42 | /usr/include/sys/_types/_off_t.h: 43 | 44 | /usr/include/sys/_types/_ssize_t.h: 45 | 46 | /usr/include/secure/_stdio.h: 47 | 48 | /usr/include/secure/_common.h: 49 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_AUGLAG.m: -------------------------------------------------------------------------------- 1 | % NLOPT_AUGLAG: Augmented Lagrangian method (needs sub-algorithm) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_AUGLAG 5 | val = 36; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_AUGLAG_EQ.m: -------------------------------------------------------------------------------- 1 | % NLOPT_AUGLAG_EQ: Augmented Lagrangian method for equality constraints (needs sub-algorithm) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_AUGLAG_EQ 5 | val = 37; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GD_MLSL.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GD_MLSL: Multi-level single-linkage (MLSL), random (global, derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GD_MLSL 5 | val = 21; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GD_MLSL_LDS.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GD_MLSL_LDS: Multi-level single-linkage (MLSL), quasi-random (global, derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GD_MLSL_LDS 5 | val = 23; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GD_STOGO.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GD_STOGO: StoGO (global, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GD_STOGO 5 | val = 8; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GD_STOGO_RAND.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GD_STOGO_RAND: StoGO with randomized search (global, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GD_STOGO_RAND 5 | val = 9; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_CRS2_LM.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_CRS2_LM: Controlled random search (CRS2) with local mutation (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_CRS2_LM 5 | val = 19; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_DIRECT.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_DIRECT: DIRECT (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_DIRECT 5 | val = 0; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_DIRECT_L: DIRECT-L (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_DIRECT_L 5 | val = 1; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L_NOSCAL.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_DIRECT_L_NOSCAL: Unscaled DIRECT-L (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_DIRECT_L_NOSCAL 5 | val = 4; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L_RAND.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_DIRECT_L_RAND: Randomized DIRECT-L (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_DIRECT_L_RAND 5 | val = 2; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_DIRECT_L_RAND_NOSCAL.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_DIRECT_L_RAND_NOSCAL: Unscaled Randomized DIRECT-L (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_DIRECT_L_RAND_NOSCAL 5 | val = 5; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_DIRECT_NOSCAL.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_DIRECT_NOSCAL: Unscaled DIRECT (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_DIRECT_NOSCAL 5 | val = 3; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_ESCH.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_ESCH: ESCH evolutionary strategy 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_ESCH 5 | val = 42; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_ISRES.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_ISRES: ISRES evolutionary constrained optimization (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_ISRES 5 | val = 35; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_MLSL.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_MLSL: Multi-level single-linkage (MLSL), random (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_MLSL 5 | val = 20; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_MLSL_LDS.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_MLSL_LDS: Multi-level single-linkage (MLSL), quasi-random (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_MLSL_LDS 5 | val = 22; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_ORIG_DIRECT.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_ORIG_DIRECT: Original DIRECT version (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_ORIG_DIRECT 5 | val = 6; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_GN_ORIG_DIRECT_L.m: -------------------------------------------------------------------------------- 1 | % NLOPT_GN_ORIG_DIRECT_L: Original DIRECT-L version (global, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_GN_ORIG_DIRECT_L 5 | val = 7; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_G_MLSL.m: -------------------------------------------------------------------------------- 1 | % NLOPT_G_MLSL: Multi-level single-linkage (MLSL), random (global, needs sub-algorithm) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_G_MLSL 5 | val = 38; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_G_MLSL_LDS.m: -------------------------------------------------------------------------------- 1 | % NLOPT_G_MLSL_LDS: Multi-level single-linkage (MLSL), quasi-random (global, needs sub-algorithm) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_G_MLSL_LDS 5 | val = 39; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_AUGLAG.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_AUGLAG: Augmented Lagrangian method (local, derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_AUGLAG 5 | val = 31; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_AUGLAG_EQ.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_AUGLAG_EQ: Augmented Lagrangian method for equality constraints (local, derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_AUGLAG_EQ 5 | val = 33; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_CCSAQ.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_CCSAQ: CCSA (Conservative Convex Separable Approximations) with simple quadratic approximations (local, derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_CCSAQ 5 | val = 41; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_LBFGS.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_LBFGS: Limited-memory BFGS (L-BFGS) (local, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_LBFGS 5 | val = 11; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_LBFGS_NOCEDAL.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_LBFGS_NOCEDAL: original NON-FREE L-BFGS code by Nocedal et al. (NOT COMPILED) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_LBFGS_NOCEDAL 5 | val = 10; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_MMA.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_MMA: Method of Moving Asymptotes (MMA) (local, derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_MMA 5 | val = 24; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_SLSQP.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_SLSQP: Sequential Quadratic Programming (SQP) (local, derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_SLSQP 5 | val = 40; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_TNEWTON.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_TNEWTON: Truncated Newton (local, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_TNEWTON 5 | val = 15; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_TNEWTON_PRECOND.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_TNEWTON_PRECOND: Preconditioned truncated Newton (local, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_TNEWTON_PRECOND 5 | val = 17; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_TNEWTON_PRECOND_RESTART.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_TNEWTON_PRECOND_RESTART: Preconditioned truncated Newton with restarting (local, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_TNEWTON_PRECOND_RESTART 5 | val = 18; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_TNEWTON_RESTART.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_TNEWTON_RESTART: Truncated Newton with restarting (local, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_TNEWTON_RESTART 5 | val = 16; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_VAR1.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_VAR1: Limited-memory variable-metric, rank 1 (local, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_VAR1 5 | val = 13; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LD_VAR2.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LD_VAR2: Limited-memory variable-metric, rank 2 (local, derivative-based) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LD_VAR2 5 | val = 14; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_AUGLAG.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_AUGLAG: Augmented Lagrangian method (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_AUGLAG 5 | val = 30; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_AUGLAG_EQ.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_AUGLAG_EQ: Augmented Lagrangian method for equality constraints (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_AUGLAG_EQ 5 | val = 32; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_BOBYQA.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_BOBYQA: BOBYQA bound-constrained optimization via quadratic models (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_BOBYQA 5 | val = 34; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_COBYLA.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_COBYLA: COBYLA (Constrained Optimization BY Linear Approximations) (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_COBYLA 5 | val = 25; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_NELDERMEAD.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_NELDERMEAD: Nelder-Mead simplex algorithm (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_NELDERMEAD 5 | val = 28; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_NEWUOA.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_NEWUOA: NEWUOA unconstrained optimization via quadratic models (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_NEWUOA 5 | val = 26; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_NEWUOA_BOUND.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_NEWUOA_BOUND: Bound-constrained optimization via NEWUOA-based quadratic models (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_NEWUOA_BOUND 5 | val = 27; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_PRAXIS.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_PRAXIS: Principal-axis, praxis (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_PRAXIS 5 | val = 12; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/NLOPT_LN_SBPLX.m: -------------------------------------------------------------------------------- 1 | % NLOPT_LN_SBPLX: Sbplx variant of Nelder-Mead (re-implementation of Rowan's Subplex) (local, no-derivative) 2 | % 3 | % See nlopt_minimize for more information. 4 | function val = NLOPT_LN_SBPLX 5 | val = 29; 6 | -------------------------------------------------------------------------------- /nlopt-2.4.2/octave/dummy.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main(void) { printf("Hello world.\n"); return 0; } 3 | -------------------------------------------------------------------------------- /nlopt-2.4.2/praxis/.libs/libpraxis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/praxis/.libs/libpraxis.a -------------------------------------------------------------------------------- /nlopt-2.4.2/praxis/.libs/libpraxis.la: -------------------------------------------------------------------------------- 1 | ../libpraxis.la -------------------------------------------------------------------------------- /nlopt-2.4.2/praxis/.libs/praxis.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/praxis/.libs/praxis.o -------------------------------------------------------------------------------- /nlopt-2.4.2/praxis/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libpraxis.la 4 | libpraxis_la_SOURCES = praxis.c praxis.h 5 | 6 | EXTRA_DIST = README 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/praxis/README: -------------------------------------------------------------------------------- 1 | praxis gradient-free local optimization via the "principal-axis method", 2 | downloaded from Netlib: 3 | 4 | http://netlib.org/opt/praxis 5 | 6 | The original Fortran code was written by Richard Brent and made 7 | available by the Stanford Linear Accelerator Center, dated 3/1/73. 8 | Since this code contains no copyright statements and is dated prior to 9 | 1977, under US copyright law it is in the public domain (not copyrighted). 10 | 11 | Converted to C via f2c and cleaned up by Steven G. Johnson 12 | (stevenj@alum.mit.edu). C version is licensed under the MIT license 13 | (which is in the same spirit as public domain, but disclaims warranty 14 | and is clearer legally). 15 | 16 | -------------------------------------------------------------------------------- /nlopt-2.4.2/praxis/praxis.h: -------------------------------------------------------------------------------- 1 | #ifndef PRAXIS_H 2 | #define PRAXIS_H 3 | 4 | #include "nlopt-util.h" 5 | #include "nlopt.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" 9 | { 10 | #endif /* __cplusplus */ 11 | 12 | typedef double (*praxis_func)(int n, const double *x, void *f_data); 13 | 14 | nlopt_result praxis_(double t0, double machep, double h0, 15 | int n, double *x, praxis_func f, void *f_data, 16 | nlopt_stopping *stop, double *minf); 17 | 18 | #ifdef __cplusplus 19 | } /* extern "C" */ 20 | #endif /* __cplusplus */ 21 | 22 | #endif /* PRAXIS_H */ 23 | -------------------------------------------------------------------------------- /nlopt-2.4.2/slsqp/.libs/libslsqp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/slsqp/.libs/libslsqp.a -------------------------------------------------------------------------------- /nlopt-2.4.2/slsqp/.libs/libslsqp.la: -------------------------------------------------------------------------------- 1 | ../libslsqp.la -------------------------------------------------------------------------------- /nlopt-2.4.2/slsqp/.libs/slsqp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/slsqp/.libs/slsqp.o -------------------------------------------------------------------------------- /nlopt-2.4.2/slsqp/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libslsqp.la 4 | libslsqp_la_SOURCES = slsqp.c slsqp.h 5 | 6 | EXTRA_DIST = README COPYRIGHT 7 | -------------------------------------------------------------------------------- /nlopt-2.4.2/slsqp/slsqp.h: -------------------------------------------------------------------------------- 1 | #ifndef SLSQP_H 2 | #define SLSQP_H 3 | 4 | #include "nlopt.h" 5 | #include "nlopt-util.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" 9 | { 10 | #endif /* __cplusplus */ 11 | 12 | nlopt_result nlopt_slsqp(unsigned n, nlopt_func f, void *f_data, 13 | unsigned m, nlopt_constraint *fc, 14 | unsigned p, nlopt_constraint *h, 15 | const double *lb, const double *ub, 16 | double *x, double *minf, 17 | nlopt_stopping *stop); 18 | #ifdef __cplusplus 19 | } /* extern "C" */ 20 | #endif /* __cplusplus */ 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/.deps/global.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/.deps/linalg.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/.deps/local.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/.deps/stogo.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/.deps/tools.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/util -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libstogo.la 4 | libstogo_la_SOURCES = global.cc linalg.cc local.cc stogo.cc tools.cc \ 5 | global.h linalg.h local.h stogo_config.h stogo.h tools.h 6 | 7 | EXTRA_DIST = testros.cc tst.cc tstc.c prog.cc testfun.h rosen.h README \ 8 | paper.pdf techreport.pdf COPYRIGHT 9 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/README: -------------------------------------------------------------------------------- 1 | This code is modified from the original StoGO Global Optimization library 2 | by Madsen et al., downloaded from: 3 | 4 | http://www2.imm.dtu.dk/~km/GlobOpt/opt.html 5 | 6 | It was modified to allow C-callable wrappers and some other niceties by 7 | Steven G. Johnson (stevenj@alum.mit.edu) in 2007. 8 | 9 | StoGO uses a gradient-based direct-search branch-and-bound algorithm, 10 | described in: 11 | 12 | S. Gudmundsson, "Parallel Global Optimization," M.Sc. Thesis, IMM, 13 | Technical University of Denmark, 1998. 14 | 15 | K. Madsen, S. Zertchaninov, and A. Zilinskas, "Global Optimization 16 | using Branch-and-Bound," Submitted to the Journal of Global 17 | Optimization, 1998. 18 | [ never published, but preprint is included as paper.pdf ] 19 | 20 | S. Zertchaninov and K. Madsen, "A C++ Programme for Global Optimization," 21 | IMM-REP-1998-04, Department of Mathematical Modelling, 22 | Technical University of Denmark, DK-2800 Lyngby, Denmark, 1998. 23 | [ included as techreport.pdf ] 24 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/global.h: -------------------------------------------------------------------------------- 1 | #ifndef GLOBAL_H 2 | #define GLOBAL_H 3 | 4 | #include "nlopt-util.h" 5 | 6 | #include 7 | //#include "function.h" 8 | #include "tools.h" 9 | using namespace std; 10 | 11 | extern "C" int stogo_verbose; 12 | 13 | typedef void dom(RTBox) ; 14 | typedef dom* Pdom ; 15 | 16 | typedef double obj(RCRVector) ; 17 | typedef obj* Pobj ; 18 | 19 | typedef void grad(RCRVector,RVector&) ; 20 | typedef grad* Pgrad ; 21 | 22 | typedef enum { OBJECTIVE_ONLY, GRADIENT_ONLY, OBJECTIVE_AND_GRADIENT } whichO; 23 | 24 | typedef double objgrad(RCRVector,RCRVector,whichO) ; 25 | typedef objgrad* Pobjgrad ; 26 | 27 | class GlobalParams { 28 | public: 29 | #ifdef NLOPT_UTIL_H 30 | nlopt_stopping *stop; 31 | #else 32 | double maxtime; 33 | long int maxeval; 34 | #endif 35 | double eps_cl, mu, rshift; 36 | int det_pnts, rnd_pnts; 37 | }; 38 | 39 | class Global: public GlobalParams { 40 | public: 41 | // Problem specification 42 | int dim ; 43 | Pobj Objective ; 44 | Pgrad Gradient ; 45 | long int numeval; 46 | 47 | virtual double ObjectiveGradient(RCRVector xy, RVector&grad, whichO which){ 48 | ++numeval; 49 | switch (which) { 50 | case OBJECTIVE_AND_GRADIENT: 51 | Gradient(xy, grad); 52 | case OBJECTIVE_ONLY: 53 | return Objective(xy); 54 | case GRADIENT_ONLY: 55 | Gradient(xy, grad); 56 | } 57 | return 0.0; 58 | } 59 | 60 | Global(RTBox, Pobj, Pgrad, GlobalParams); 61 | // Global& operator=(const Global &); 62 | 63 | void Search(int, RCRVector); 64 | void DispMinimizers(); 65 | double OneMinimizer(RCRVector); 66 | bool NoMinimizers(); 67 | void SetDomain(RTBox); 68 | void GetDomain(RTBox); 69 | double GetMinValue(); 70 | void SetMinValue(double); 71 | void ClearSolSet(); 72 | void AddPoint(RCRVector, double); 73 | 74 | double GetTime(); 75 | bool InTime(); 76 | 77 | private: 78 | list SolSet; 79 | list::const_iterator titr; 80 | priority_queue CandSet; 81 | priority_queue Garbage; 82 | 83 | double fbound; 84 | TBox Domain; 85 | 86 | void FillRegular(RTBox, RTBox); 87 | void FillRandom(RTBox, RTBox); 88 | double NewtonTest(RTBox, int, RCRVector, int*); 89 | void ReduceOrSubdivide(RTBox, int, RCRVector); 90 | }; 91 | #endif 92 | 93 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/linalg.h: -------------------------------------------------------------------------------- 1 | /* 2 | Temporary implementation of vector and matrix classes 3 | This is more or less borrowed from Serguei's program 4 | */ 5 | 6 | #ifndef LINALG_H 7 | #define LINALG_H 8 | 9 | #include 10 | using namespace std; 11 | #include // for sqrt() 12 | #include 13 | 14 | typedef const class RVector CRVector; 15 | typedef CRVector& RCRVector; 16 | typedef const class RMatrix CRMatrix ; 17 | typedef CRMatrix& RCRMatrix; 18 | 19 | double eps() ; 20 | 21 | #define max(A,B) ((A) > (B) ? (A):(B)) 22 | #define min(A,B) ((A) < (B) ? (A):(B)) 23 | 24 | /********************* Class RVector *********************/ 25 | 26 | class RVector{ 27 | protected: 28 | 29 | public: 30 | int len; // size of array 31 | double* elements; // array of values 32 | 33 | RVector() ; 34 | RVector(int); // Constructor 35 | RVector(RCRVector); // copy constructor 36 | ~RVector() { delete[] elements; elements=0 ; len=0; } 37 | 38 | RCRVector operator=(double) ; 39 | RCRVector operator=(RCRVector); 40 | 41 | double & operator () (int i) const {return elements[i] ; } 42 | double nrm2() ; // Euclidian norm 43 | 44 | double *raw_data() { return elements; } 45 | const double *raw_data_const() const { return elements; } 46 | 47 | friend ostream & operator << (ostream &, const RVector &); 48 | 49 | friend double norm2(RCRVector) ; 50 | friend double normInf(RCRVector) ; 51 | friend double dot(RCRVector, RCRVector) ; 52 | friend void scal(double, RCRVector) ; 53 | friend void copy(RCRVector, RCRVector) ; 54 | friend void axpy(double, RCRVector, RCRVector) ; 55 | friend void gemv(char,double, RCRMatrix, RCRVector, double, RCRVector); 56 | friend void ger(double alpha, RCRVector, RCRVector, RCRMatrix); 57 | 58 | int GetLength() const { return len; }; // get vector size 59 | }; 60 | 61 | /******************* Class RMatrix *************************/ 62 | 63 | class RMatrix 64 | { 65 | protected: 66 | double* Vals; // array of values 67 | int Dim; // dimension 68 | 69 | public: 70 | RMatrix() ; 71 | RMatrix(int); // dimension 72 | ~RMatrix() { delete[] Vals; Vals=0 ; Dim=0; } 73 | 74 | RMatrix(RCRMatrix); // copy constructor 75 | RCRMatrix operator=(double num) ; 76 | RCRMatrix operator=(RCRMatrix) ; // (needed for template stuff) 77 | 78 | double& operator()(int vidx,int hidx) ; 79 | friend ostream & operator << (ostream &, const RMatrix &); 80 | 81 | friend void gemv(char,double, RCRMatrix, RCRVector, double, RCRVector); 82 | friend void ger(double alpha,RCRVector,RCRVector,RCRMatrix); 83 | 84 | int GetDim() { return Dim; }; // get dimension 85 | }; 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/local.h: -------------------------------------------------------------------------------- 1 | /* 2 | Definitions of various variables used in the local search 3 | */ 4 | 5 | #ifndef LOCAL_H 6 | #define LOCAL_H 7 | 8 | #include "tools.h" 9 | #include "global.h" 10 | 11 | extern int FC, GC ; 12 | 13 | // Results of local search 14 | enum {LS_Unstable, LS_MaxIter, LS_Old, LS_New,LS_Out, LS_MaxEvalTime} ; 15 | 16 | const double delta_coef = 1.0/2.0; // Initialization of trust region 17 | const double epsilon = 1.0E-4 ; // Stopping criterion, var 1e-4 18 | const int max_outside_steps=1 ; // Maximum number of steps outside the box 19 | const int max_iter=50 ; // Max iterations = max_iter*dim. of problem 20 | 21 | extern double MacEpsilon ; // min {x >= 0 : 1 + x > 1} 22 | 23 | int local(Trial &, TBox &, TBox &, double, double*, Global&, int, RCRVector 24 | #ifdef NLOPT_UTIL_H 25 | , nlopt_stopping *stop 26 | #endif 27 | ); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/paper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/stogo/paper.pdf -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/rosen.h: -------------------------------------------------------------------------------- 1 | #include "linalg.h" 2 | #include "tools.h" 3 | #include "stogo_config.h" 4 | 5 | void Domain_Rosenbrock(RTBox box) { 6 | box.lb=-10.0 ; box.ub=10.0; 7 | } 8 | 9 | double Objective_Rosenbrock(RCRVector x) { 10 | double a=x(1)-x(0)*x(0); 11 | double b=1-x(0); 12 | return 100*a*a + b*b; 13 | } 14 | 15 | void Gradient_Rosenbrock(RCRVector x, RCRVector grad) { 16 | grad(0)=200*(x(1)-x(0)*x(0))*(-2*x(0))-2*(1-x(0)); 17 | grad(1)=200*(x(1)-x(0)*x(0)); 18 | } 19 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/stogo.cc: -------------------------------------------------------------------------------- 1 | // A C-callable front-end to the StoGO global-optimization library. 2 | // -- Steven G. Johnson 3 | 4 | #include "stogo.h" 5 | #include "global.h" 6 | 7 | class MyGlobal : public Global { 8 | protected: 9 | objective_func my_func; 10 | void *my_data; 11 | 12 | public: 13 | 14 | MyGlobal(RTBox D, GlobalParams P, objective_func func, void *data) : Global(D, 0, 0, P), my_func(func), my_data(data) {} 15 | 16 | virtual double ObjectiveGradient(RCRVector xy, RVector &grad, whichO which){ 17 | ++numeval; 18 | switch (which) { 19 | case GRADIENT_ONLY: 20 | case OBJECTIVE_AND_GRADIENT: 21 | return my_func((unsigned) xy.GetLength(), xy.raw_data_const(), grad.raw_data(), my_data); 22 | case OBJECTIVE_ONLY: 23 | return my_func((unsigned) xy.GetLength(), xy.raw_data_const(), NULL, my_data); 24 | } 25 | return 0.0; 26 | } 27 | }; 28 | 29 | int stogo_minimize(int n, 30 | objective_func fgrad, void *data, 31 | double *x, double *minf, 32 | const double *l, const double *u, 33 | #ifdef NLOPT_UTIL_H 34 | nlopt_stopping *stop, 35 | #else 36 | long int maxeval, double maxtime, 37 | #endif 38 | int nrandom) 39 | { 40 | GlobalParams params; 41 | 42 | // FIXME: WTF do these parameters mean? 43 | params.rnd_pnts=nrandom; 44 | params.det_pnts=2*n+1 - nrandom; 45 | params.eps_cl=0.1; params.rshift=0.3; 46 | params.mu=1.0E-4; 47 | params.stop = stop; 48 | 49 | TBox D(n); 50 | for (int i = 0; i < n; ++i) { 51 | D.lb(i) = l[i]; 52 | D.ub(i) = u[i]; 53 | } 54 | 55 | MyGlobal Problem(D, params, fgrad, data); 56 | RVector dummyvec(n); 57 | Problem.Search(-1, dummyvec); 58 | 59 | if (Problem.NoMinimizers()) 60 | return 0; 61 | 62 | *minf = Problem.OneMinimizer(dummyvec); 63 | for (int i = 0; i < n; ++i) x[i] = dummyvec(i); 64 | return 1; 65 | } 66 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/stogo.h: -------------------------------------------------------------------------------- 1 | /* A C-callable front-end to the StoGO global-optimization library. 2 | -- Steven G. Johnson */ 3 | 4 | #ifndef STOGO_H 5 | #define STOGO_H 6 | 7 | #include "nlopt-util.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | typedef double (*objective_func)(unsigned n, const double *x, double *grad, 14 | void *data); 15 | 16 | /* search for the global minimum of the function fgrad(n, x, grad, data) 17 | inside a simple n-dimensional hyperrectangle. 18 | 19 | Input: 20 | 21 | n: dimension of search space (number of decision variables) 22 | 23 | fgrad: the objective function of the form fgrad(n, x, grad, data), 24 | returning the objective function at x, where 25 | n: dimension of search space 26 | x: pointer to array of length n, point to evaluate 27 | grad: if non-NULL, an array of length n which 28 | should on return be the gradient d(fgrad)/dx 29 | [ if NULL, grad should be ignored ] 30 | data: arbitrary data pointer, whose value is the 31 | data argument of stogo_minimize 32 | 33 | data: arbitrary pointer to any auxiliary data needed by fgrad 34 | 35 | l, u: arrays of length n giving the lower and upper bounds of the 36 | search space 37 | 38 | maxeval: if nonzero, a maximum number of fgrad evaluations 39 | maxtime: if nonzero, a maximum time (in seconds) 40 | -- REPLACED in NLopt by nlopt_stopping *stop 41 | 42 | nrandom: number of randomized search points to use per box, 43 | in addition to 2*n+1 deterministic search points 44 | (0 for a deterministic algorithm). 45 | 46 | Output: 47 | 48 | minf: the minimum value of the objective function found 49 | 50 | x: pointer to array of length n, giving the location of the minimum 51 | 52 | Return value: 0 if no minimum found, 1 otherwise. 53 | 54 | */ 55 | 56 | int stogo_minimize(int n, 57 | objective_func fgrad, void *data, 58 | double *x, double *minf, 59 | const double *l, const double *u, 60 | #ifdef NLOPT_UTIL_H 61 | nlopt_stopping *stop, 62 | #else 63 | long int maxeval, double maxtime, 64 | #endif 65 | int nrandom); 66 | 67 | extern int stogo_verbose; /* set to nonzero for verbose output */ 68 | 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/stogo_config.h: -------------------------------------------------------------------------------- 1 | #ifndef STOGO_CONFIG_H 2 | #define STOGO_CONFIG_H 3 | 4 | // Compiler flags to enable/disable various options in the code 5 | 6 | // To obtain extra information on the global search process: 7 | //#define GS_DEBUG 8 | 9 | // To obtain info on the local search process: 10 | //#define LS_DEBUG 11 | 12 | // Initialization strategy in the local search (INI1,INI2 or INI3) 13 | #define INI2 14 | 15 | // Use the more pessimistic strategy for lower bound estimation 16 | //#define LB2 17 | 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/techreport.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/stogo/techreport.pdf -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/testros.cc: -------------------------------------------------------------------------------- 1 | #include "global.h" 2 | #include "tools.h" 3 | #include "rosen.h" 4 | 5 | int main() { 6 | int dim=2; 7 | 8 | Pdom Dom=Domain_Rosenbrock; 9 | Pobj Obj=Objective_Rosenbrock; 10 | Pgrad Grad=Gradient_Rosenbrock; 11 | 12 | GlobalParams params; 13 | params.det_pnts=2*dim+1; params.rnd_pnts=0; 14 | params.eps_cl=0.1; params.rshift=0.3; 15 | params.mu=1.0E-4; params.maxtime=5; 16 | 17 | TBox D(dim); 18 | Dom(D); 19 | Global Problem(D,Obj, Grad, params); 20 | RVector dummyvec(dim); 21 | Problem.Search(-1, dummyvec); 22 | 23 | cout << "Minimizers found\n"; 24 | Problem.DispMinimizers(); 25 | } 26 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/tst.cc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "global.h" 4 | #include "tools.h" 5 | 6 | #include "linalg.h" 7 | #include "tools.h" 8 | #include "stogo_config.h" 9 | 10 | void Domain_Mine(RTBox box) { 11 | box.lb=-3.0 ; box.ub=3.0; 12 | } 13 | 14 | static int cnt = 0; 15 | double Objective_Mine(RCRVector xy) { 16 | double x = xy(0); 17 | double y = xy(1); 18 | double f = ((x*x)*(4-2.1*(x*x)+((x*x)*(x*x))/3) + x*y + (y*y)*(-4+4*(y*y))); 19 | printf("feval:, %d, %g, %g, %g\n", ++cnt, x,y, f); 20 | return f; 21 | } 22 | 23 | void Gradient_Mine(RCRVector xy, RVector &grad) { 24 | double x = xy(0); 25 | double y = xy(1); 26 | grad(0) = /* df/dx */ 27 | ((2*x)*(4-2.1*(x*x)+((x*x)*(x*x))/3) 28 | + (x*x)*(-4.2*x+4*(x*(x*x))/3) 29 | + y); 30 | grad(1) = /* df/dy */ 31 | (x + (2*y)*(-4+4*(y*y)) + (y*y)*(8*(y))); 32 | } 33 | 34 | 35 | int main(int argc, char **argv) { 36 | int dim=2; 37 | 38 | Pdom Dom=Domain_Mine; 39 | Pobj Obj=Objective_Mine; 40 | Pgrad Grad=Gradient_Mine; 41 | 42 | GlobalParams params; 43 | params.det_pnts=2*dim+1; params.rnd_pnts=0; 44 | params.eps_cl=0.1; params.rshift=0.3; 45 | params.mu=1.0E-4; params.maxtime=0; 46 | 47 | params.maxeval = argc < 2 ? 100 : atoi(argv[1]); 48 | 49 | TBox D(dim); 50 | Dom(D); 51 | Global Problem(D,Obj, Grad, params); 52 | RVector dummyvec(dim); 53 | Problem.Search(-1, dummyvec); 54 | 55 | cout << "Minimizers found\n"; 56 | Problem.DispMinimizers(); 57 | 58 | cout << "dummyvec: " << dummyvec << "\n"; 59 | 60 | double val = Problem.OneMinimizer(dummyvec); 61 | cout << "one minimizer: " << val << ": " << dummyvec << "\n"; 62 | } 63 | -------------------------------------------------------------------------------- /nlopt-2.4.2/stogo/tstc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "stogo.h" 5 | 6 | /* has two global minima at (0.09,-0.71) and (-0.09,0.71), plus 7 | 4 additional local minima */ 8 | static int cnt=0; 9 | double tst_obj(int n, const double *xy, double *g, void *unused) 10 | { 11 | double x, y, f; 12 | x = xy[0]; 13 | y = xy[1]; 14 | f = ((x*x)*(4-2.1*(x*x)+((x*x)*(x*x))/3) + x*y + (y*y)*(-4+4*(y*y))); 15 | printf("feval:, %d, %g, %g, %g\n", ++cnt, x,y, f); 16 | if (g) { 17 | g[0] = /* df/dx */ 18 | ((2*x)*(4-2.1*(x*x)+((x*x)*(x*x))/3) 19 | + (x*x)*(-4.2*x+4*(x*(x*x))/3) 20 | + y); 21 | g[1] = /* df/dy */ 22 | (x + (2*y)*(-4+4*(y*y)) + (y*y)*(8*(y))); 23 | } 24 | return f; 25 | } 26 | 27 | int main(int argc, char **argv) 28 | { 29 | int n = 2; 30 | double x[2], l[2], u[2]; 31 | long int maxits = 0, maxtim = 0; 32 | int info; 33 | double minf; 34 | 35 | maxits = argc < 2 ? 100 : atoi(argv[1]); 36 | 37 | l[0] = -3; l[1] = -3; 38 | u[0] = 3; u[1] = 3; 39 | 40 | info = stogo_minimize(n, tst_obj, NULL, x, &minf, l, u, maxits, maxtim); 41 | 42 | printf("min f = %g at (%g,%g) after %d evals, return value %d\n", 43 | minf, x[0], x[1], cnt, info); 44 | 45 | return EXIT_SUCCESS; 46 | } 47 | -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/.deps/libnlopt_guile_la-nlopt-guile.Plo: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/.libs/_nlopt.0.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/swig/.libs/_nlopt.0.so -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/.libs/_nlopt.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/swig/.libs/_nlopt.a -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/.libs/_nlopt.la: -------------------------------------------------------------------------------- 1 | ../_nlopt.la -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/.libs/_nlopt.lai: -------------------------------------------------------------------------------- 1 | # _nlopt.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='_nlopt.0.so' 9 | 10 | # Names of this library. 11 | library_names='_nlopt.0.so _nlopt.so' 12 | 13 | # The name of the static archive. 14 | old_library='_nlopt.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags=' ' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' /usr/local/lib/libnlopt.la -lm' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for _nlopt. 26 | current=8 27 | age=8 28 | revision=2 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=yes 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/local/lib/python2.7/site-packages' 42 | -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/.libs/_nlopt.so: -------------------------------------------------------------------------------- 1 | _nlopt.0.so -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/.libs/_nlopt_la-nlopt-python.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/swig/.libs/_nlopt_la-nlopt-python.o -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/Makefile.am: -------------------------------------------------------------------------------- 1 | SWIG_SRC = nlopt.i nlopt-exceptions.i nlopt-enum-renames.i 2 | EXTRA_DIST = $(SWIG_SRC) nlopt-guile.i nlopt-python.i nlopt.scm.in nlopt.py numpy.i 3 | 4 | BUILT_SOURCES = nlopt-guile.cpp nlopt-python.cpp nlopt-enum-renames.i nlopt.scm.in 5 | 6 | HDR = $(top_srcdir)/api/nlopt.hpp 7 | 8 | ############################################################################## 9 | # Guile wrapper 10 | 11 | libnlopt@NLOPT_SUFFIX@_guile_la_SOURCES = nlopt-guile.cpp 12 | libnlopt@NLOPT_SUFFIX@_guile_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la 13 | libnlopt@NLOPT_SUFFIX@_guile_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ 14 | libnlopt@NLOPT_SUFFIX@_guile_la_CPPFLAGS = $(GUILE_CPPFLAGS) -I$(top_srcdir)/api 15 | 16 | guiledir = $(GUILE_INSTALL_DIR) 17 | if WITH_GUILE 18 | guile_DATA = nlopt.scm 19 | guilelib = libnlopt@NLOPT_SUFFIX@_guile.la 20 | endif 21 | 22 | ############################################################################## 23 | # Python wrapper 24 | 25 | _nlopt_la_SOURCES = nlopt-python.cpp 26 | _nlopt_la_LIBADD = ../libnlopt@NLOPT_SUFFIX@.la 27 | _nlopt_la_LDFLAGS = -module -version-info @SHARED_VERSION_INFO@ 28 | _nlopt_la_CPPFLAGS = $(PYTHON_INCLUDES) -I$(top_srcdir)/api 29 | 30 | if WITH_PYTHON 31 | python_PYTHON = nlopt.py 32 | pyexec_LTLIBRARIES = _nlopt.la 33 | endif 34 | 35 | ############################################################################## 36 | 37 | 38 | lib_LTLIBRARIES = $(guilelib) 39 | 40 | ############################################################################## 41 | # Generate wrappers via SWIG: 42 | 43 | if MAINTAINER_MODE 44 | 45 | nlopt-guile.cpp nlopt.scm.in: $(SWIG_SRC) nlopt-guile.i $(HDR) 46 | swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -guile -scmstub -o $@ $(srcdir)/nlopt.i 47 | rm -f nlopt.scm.in 48 | mv nlopt.scm nlopt.scm.in 49 | 50 | nlopt-python.cpp nlopt.py: $(SWIG_SRC) nlopt-python.i numpy.i $(HDR) 51 | swig -I$(top_srcdir)/api -outdir $(builddir) -c++ -python -o $@ $(srcdir)/nlopt.i 52 | 53 | nlopt-enum-renames.i: $(top_srcdir)/api/nlopt.h 54 | (echo "// AUTOMATICALLY GENERATED -- DO NOT EDIT"; egrep 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL|NLOPT_NUM_ALGORITHMS' $(top_srcdir)/api/nlopt.h | sed 's/NLOPT_//g' |tr -d ' ' |tr '/' ',' |tr '=' ',' |cut -d, -f1 |while read name; do echo "%rename(NLOPT_$$name) nlopt::$$name;"; done; egrep 'NLOPT_[A-Z_]* =' $(top_srcdir)/api/nlopt.h | egrep -v 'NLOPT_[LG][DN]|NLOPT_AUGLAG|NLOPT_G_MLSL' | sed 's/NLOPT_//g' |tr -d ' ' |cut -d'=' -f1 | while read name; do echo "%rename(NLOPT_$$name) nlopt::$$name;"; done) > $@ 55 | 56 | endif 57 | -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/nlopt.i: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | 3 | %define DOCSTRING 4 | "NLopt is a multi-language library for nonlinear optimization (local or 5 | global, with or without derivatives, and supporting nonlinear 6 | constraints). Complete documentation, including a Python tutorial, 7 | can be found at the NLopt web page: http://ab-initio.mit.edu/nlopt" 8 | %enddef 9 | 10 | %module(docstring=DOCSTRING) nlopt 11 | %{ 12 | #include "nlopt.hpp" 13 | %} 14 | 15 | %include "std_vector.i" 16 | namespace std { 17 | %template(nlopt_doublevector) vector; 18 | }; 19 | 20 | // prepend "nlopt_" in Guile to substitute for namespace 21 | #if defined(SWIGGUILE) 22 | %rename(nlopt_opt) nlopt::opt; 23 | %rename(nlopt_roundoff_limited) nlopt::roundoff_limited; 24 | %rename(nlopt_forced_stop) nlopt::forced_stop; 25 | %rename(nlopt_srand) nlopt::srand; 26 | %rename(nlopt_srand_time) nlopt::srand_time; 27 | %rename(nlopt_version) nlopt::version; 28 | %rename(nlopt_version_major) nlopt::version_major; 29 | %rename(nlopt_version_minor) nlopt::version_minor; 30 | %rename(nlopt_version_bugfix) nlopt::version_bugfix; 31 | %rename(nlopt_algorithm_name) nlopt::algorithm_name; 32 | %include "nlopt-enum-renames.i" 33 | #endif 34 | 35 | %include "nlopt-exceptions.i" 36 | 37 | #ifdef SWIGGUILE 38 | %include "nlopt-guile.i" 39 | #endif 40 | 41 | #ifdef SWIGPYTHON 42 | %include "nlopt-python.i" 43 | #endif 44 | 45 | %include "nlopt.hpp" 46 | -------------------------------------------------------------------------------- /nlopt-2.4.2/swig/nlopt.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/swig/nlopt.pyc -------------------------------------------------------------------------------- /nlopt-2.4.2/test/.deps/testfuncs.Po: -------------------------------------------------------------------------------- 1 | testfuncs.o: testfuncs.c /usr/include/stdio.h /usr/include/sys/cdefs.h \ 2 | /usr/include/sys/_symbol_aliasing.h \ 3 | /usr/include/sys/_posix_availability.h /usr/include/Availability.h \ 4 | /usr/include/AvailabilityInternal.h /usr/include/_types.h \ 5 | /usr/include/sys/_types.h /usr/include/machine/_types.h \ 6 | /usr/include/i386/_types.h /usr/include/sys/_pthread/_pthread_types.h \ 7 | /usr/include/sys/_types/_va_list.h /usr/include/sys/_types/_size_t.h \ 8 | /usr/include/sys/_types/_null.h /usr/include/sys/stdio.h \ 9 | /usr/include/sys/_types/_off_t.h /usr/include/sys/_types/_ssize_t.h \ 10 | /usr/include/secure/_stdio.h /usr/include/secure/_common.h \ 11 | /usr/include/math.h testfuncs.h ../api/nlopt.h \ 12 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stddef.h \ 13 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/__stddef_max_align_t.h \ 14 | ../config.h 15 | 16 | /usr/include/stdio.h: 17 | 18 | /usr/include/sys/cdefs.h: 19 | 20 | /usr/include/sys/_symbol_aliasing.h: 21 | 22 | /usr/include/sys/_posix_availability.h: 23 | 24 | /usr/include/Availability.h: 25 | 26 | /usr/include/AvailabilityInternal.h: 27 | 28 | /usr/include/_types.h: 29 | 30 | /usr/include/sys/_types.h: 31 | 32 | /usr/include/machine/_types.h: 33 | 34 | /usr/include/i386/_types.h: 35 | 36 | /usr/include/sys/_pthread/_pthread_types.h: 37 | 38 | /usr/include/sys/_types/_va_list.h: 39 | 40 | /usr/include/sys/_types/_size_t.h: 41 | 42 | /usr/include/sys/_types/_null.h: 43 | 44 | /usr/include/sys/stdio.h: 45 | 46 | /usr/include/sys/_types/_off_t.h: 47 | 48 | /usr/include/sys/_types/_ssize_t.h: 49 | 50 | /usr/include/secure/_stdio.h: 51 | 52 | /usr/include/secure/_common.h: 53 | 54 | /usr/include/math.h: 55 | 56 | testfuncs.h: 57 | 58 | ../api/nlopt.h: 59 | 60 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/stddef.h: 61 | 62 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include/__stddef_max_align_t.h: 63 | 64 | ../config.h: 65 | -------------------------------------------------------------------------------- /nlopt-2.4.2/test/.libs/testopt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/test/.libs/testopt -------------------------------------------------------------------------------- /nlopt-2.4.2/test/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/api -I$(top_srcdir)/util 2 | 3 | noinst_PROGRAMS = testopt 4 | 5 | testopt_SOURCES = testfuncs.c testfuncs.h testopt.cpp 6 | testopt_LDADD = $(top_builddir)/libnlopt@NLOPT_SUFFIX@.la 7 | EXTRA_DIST = test_std.py 8 | 9 | -------------------------------------------------------------------------------- /nlopt-2.4.2/test/test_std.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import nlopt 4 | import numpy as np 5 | 6 | print ('nlopt version='+nlopt.__version__) 7 | 8 | def f(x, grad): 9 | F=x[0] 10 | L=x[1] 11 | E=x[2] 12 | I=x[3] 13 | D=F*L**3/(3.*E*I) 14 | return D 15 | 16 | n = 4 17 | opt = nlopt.opt(nlopt.LN_COBYLA, n) 18 | opt.set_min_objective(f) 19 | lb = np.array([40., 50., 30e3, 1.]) 20 | ub = np.array([60., 60., 40e3, 10.]) 21 | x = (lb+ub)/2. 22 | opt.set_lower_bounds(lb) 23 | opt.set_upper_bounds(ub) 24 | opt.set_xtol_rel(1e-3) 25 | opt.set_ftol_rel(1e-3) 26 | xopt = opt.optimize(x) 27 | 28 | opt_val = opt.last_optimum_value() 29 | result = opt.last_optimize_result() 30 | print ('opt_result='+str(result)) 31 | print ('optimizer='+str(xopt)) 32 | print ('opt_val='+str(opt_val)) 33 | -------------------------------------------------------------------------------- /nlopt-2.4.2/test/testfuncs.h: -------------------------------------------------------------------------------- 1 | #ifndef TESTFUNCS_H 2 | #define TESTFUNCS_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif /* __cplusplus */ 8 | 9 | #include "nlopt.h" 10 | 11 | typedef struct { 12 | nlopt_func f; 13 | void *f_data; 14 | int has_gradient; 15 | int n; 16 | const double *lb, *ub, *xmin; 17 | double minf; 18 | const char *name; 19 | } testfunc; 20 | 21 | #define NTESTFUNCS 22 22 | extern const testfunc testfuncs[NTESTFUNCS]; 23 | 24 | extern int testfuncs_verbose; 25 | extern int testfuncs_counter; 26 | 27 | #ifdef __cplusplus 28 | } /* extern "C" */ 29 | #endif /* __cplusplus */ 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/libutil.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/libutil.a -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/libutil.la: -------------------------------------------------------------------------------- 1 | ../libutil.la -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/mt19937ar.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/mt19937ar.o -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/qsort_r.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/qsort_r.o -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/redblack.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/redblack.o -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/rescale.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/rescale.o -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/sobolseq.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/sobolseq.o -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/stop.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/stop.o -------------------------------------------------------------------------------- /nlopt-2.4.2/util/.libs/timer.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/nlopt-2.4.2/util/.libs/timer.o -------------------------------------------------------------------------------- /nlopt-2.4.2/util/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = -I$(top_srcdir)/api 2 | 3 | noinst_LTLIBRARIES = libutil.la 4 | libutil_la_SOURCES = mt19937ar.c sobolseq.c soboldata.h timer.c stop.c nlopt-util.h redblack.c redblack.h qsort_r.c rescale.c 5 | 6 | noinst_PROGRAMS = redblack_test 7 | redblack_test_SOURCES = redblack_test.c 8 | redblack_test_LDADD = libutil.la 9 | -------------------------------------------------------------------------------- /qTORCH_Software_Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aspuru-guzik-group/qtorch/d564ae6d4f51fec8b8a7b61706ba5b28bd0380cf/qTORCH_Software_Guide.pdf -------------------------------------------------------------------------------- /src/Timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Eric Schuyler Fried, Nicolas Per Dane Sawaya, Alán Aspuru-Guzik 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | */ 17 | 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | namespace qtorch { 24 | 25 | class Timer { 26 | public: 27 | void start(); 28 | 29 | void reset(); 30 | 31 | double getElapsed(); 32 | 33 | double getCPUElapsed(); 34 | 35 | std::chrono::high_resolution_clock::time_point mStart; 36 | std::clock_t mCPUClockStart; 37 | bool mStarted{false}; 38 | }; 39 | 40 | void Timer::start() { 41 | mStart = std::chrono::high_resolution_clock::now(); 42 | mCPUClockStart = std::clock(); 43 | mStarted = true; 44 | } 45 | 46 | double Timer::getElapsed() { 47 | if (!mStarted) { 48 | return 0.0; 49 | } 50 | auto end = std::chrono::high_resolution_clock::now(); 51 | auto duration = std::chrono::duration_cast(end - mStart).count(); 52 | return duration / 1000000000.0; 53 | } 54 | 55 | double Timer::getCPUElapsed() { 56 | return (std::clock() - mCPUClockStart) / (double) CLOCKS_PER_SEC; 57 | } 58 | 59 | void Timer::reset() { 60 | mStarted = false; 61 | } 62 | 63 | 64 | } -------------------------------------------------------------------------------- /src/Wire.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Eric Schuyler Fried, Nicolas Per Dane Sawaya, Alán Aspuru-Guzik 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | */ 17 | 18 | 19 | #pragma once 20 | 21 | #include 22 | #include "Exceptions.h" 23 | 24 | //wire class 25 | namespace qtorch { 26 | class Wire { 27 | public: 28 | explicit Wire(std::shared_ptr nodeA, std::shared_ptr nodeB, int qubitNum) : 29 | mNodeA(std::weak_ptr (nodeA)), 30 | mNodeB(std::weak_ptr (nodeB)), 31 | mQubitNumber(qubitNum) 32 | {}; 33 | 34 | void SetNodeA(std::shared_ptr newNode) { mNodeA = std::weak_ptr(newNode); }; 35 | 36 | void SetNodeB(std::shared_ptr newNode) { mNodeB = std::weak_ptr(newNode); }; 37 | 38 | int GetQubitNumber() { return mQubitNumber; }; 39 | 40 | void SetQubitNumber(int newNum) { mQubitNumber = newNum; }; 41 | 42 | std::weak_ptr GetNodeA() { return mNodeA; }; 43 | 44 | std::weak_ptr GetNodeB() { return mNodeB; }; 45 | 46 | void SetWireID(int wid) { mWireID = wid; }; // npds 47 | int GetWireID() { return mWireID; }; // npds 48 | 49 | void SetIsContracted(bool inp) { this->boolIsContracted = inp; }; // npds 50 | bool IsContracted() { return boolIsContracted; }; // npds 51 | 52 | private: 53 | std::weak_ptr mNodeA; 54 | std::weak_ptr mNodeB; 55 | 56 | int mWireID; // npds 1feb2017 // Used only for some subroutines. Like linegraph. 57 | 58 | int mQubitNumber; 59 | int boolIsContracted = false; // npds 60 | }; 61 | } -------------------------------------------------------------------------------- /src/preprocess.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Eric Schuyler Fried, Nicolas Per Dane Sawaya, Alán Aspuru-Guzik 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | */ 17 | 18 | 19 | #pragma once 20 | 21 | #include 22 | #include "ContractionTools.h" 23 | 24 | namespace qtorch { 25 | 26 | //the function runs a given circuit until it finds a contraction sequence that runs in <= maxTime seconds 27 | //it returns true if a sequence is found, else it returns false 28 | bool preProcess(const std::string &fileName, std::vector> &optimalContractionSequence, 29 | const double timeThreshold) { 30 | maxTime = timeThreshold; 31 | for (int i(0); i < 100; i++) { 32 | double newTime; 33 | totTimer = Timer(); 34 | totTimer.start(); 35 | ContractionTools p(fileName, "measureTest.txt"); 36 | std::shared_ptr temp = p.Contract(Stochastic); 37 | remove("measureTest.txt"); 38 | newTime = totTimer.getElapsed(); 39 | if (newTime <= timeThreshold) //if sequence is found 40 | { 41 | std::for_each(temp->GetAllNodes().begin(), temp->GetAllNodes().end(), 42 | [&optimalContractionSequence](std::shared_ptr node) { 43 | if (!(node->mCreatedFrom.first == 0 && node->mCreatedFrom.second == 0)) { 44 | optimalContractionSequence.push_back(node->mCreatedFrom); 45 | } 46 | }); 47 | totTimer.reset(); 48 | return true; 49 | } 50 | } 51 | return false; 52 | }; 53 | } -------------------------------------------------------------------------------- /src/qtorch.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Eric Schuyler Fried, Nicolas Per Dane Sawaya, Alán Aspuru-Guzik 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | */ 17 | 18 | #pragma once 19 | 20 | //Here are all the includes you'll ever need 21 | #include "qtorch/zconf.h" 22 | #include "qtorch/Timer.h" 23 | #include "qtorch/Exceptions.h" 24 | #include "qtorch/Node.h" 25 | #include "qtorch/Wire.h" 26 | #include "qtorch/Network.h" 27 | #include "qtorch/LineGraph.h" 28 | #include "qtorch/ContractionTools.h" 29 | #include "qtorch/leviParser.hpp" 30 | #include "qtorch/maxcut.h" 31 | #include "qtorch/preprocess.h" 32 | using namespace qtorch; --------------------------------------------------------------------------------