Building with mlpack

To build the mlpack optimizer plugins, you must pull down ensmallen and armadillo

1 $ mkdir $HOME/.xacc_tpls
2 $ cd $HOME/.xacc_tpls
3 $ git clone https://github.com/mlpack/ensmallen
4 $ git clone https://gitlab.com/conradsnicta/armadillo-code armadillo

Note on the Rigetti QMI, you may have to download a tar.gz of the armadillo repo and upload via scp. I have found that I am unable to git clone from non-github repos...

Now configure XACC, pointing to the appropriate ensmallen and armadillo-code installs

1 $ cd $HOME
2 $ git clone --recursive https://github.com/eclipse/xacc
3 $ cd xacc && mkdir build && cd build
4 $ cmake .. -DXACC_ENSMALLEN_INCLUDE_DIR=$HOME/.xacc_tpls/ensmallen/include
5  -DXACC_ARMADILLO_INCLUDE_DIR=$HOME/.xacc_tpls/armadillo/include
6  [add any other cmake args you may need, see top-level readme]
7 $ make -j4 install

That should install the mlpack optimizer!