Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
79bfade7
Commit
79bfade7
authored
Nov 07, 2019
by
Mccaskey, Alex
Browse files
fix to rtd
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
ad3ce167
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/doxygen/Doxyfile.cmake
View file @
79bfade7
...
...
@@ -315,7 +315,7 @@ EXTENSION_MAPPING =
# case of backward compatibilities issues.
# The default value is: YES.
MARKDOWN_SUPPORT =
YES
MARKDOWN_SUPPORT =
NO
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
# to that level are automatically included in the table of contents, even if
...
...
@@ -889,7 +889,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.
EXCLUDE = ../../quantum/plugins/ibm/accelerator/qiskit-terra/
#
EXCLUDE = ../../quantum/plugins/ibm/accelerator/qiskit-terra/
../../xacc/optimizers/nlopt-optimizer/nlopt/ ../../tpls/ ../../quantum/plugins/dwave/embedding/minorminer/
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
...
...
@@ -906,6 +906,10 @@ EXCLUDE_SYMLINKS = NO
# exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS = */tests/*
EXCLUDE_PATTERNS += */qiskit-terra/*
EXCLUDE_PATTERNS += */nlopt/*
EXCLUDE_PATTERNS += */tpls/*
EXCLUDE_PATTERNS += */minorminer/*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
...
...
@@ -1964,7 +1968,7 @@ MAN_LINKS = NO
# captures the structure of the code including all documentation.
# The default value is: NO.
GENERATE_XML =
YES
GENERATE_XML =
NO
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
...
...
docs/source/basics.rst
View file @
79bfade7
...
...
@@ -5,20 +5,20 @@ Here we demonstrate leveraging the XACC framework for various
quantum-classical programming tasks. We provide examples in both
C++ and Python.
`AcceleratorBuffer` Usage
`
`AcceleratorBuffer`
`
Usage
-------------------------
The `AcceleratorBuffer` represents a register of qubits. Programmers allocate
The
`
`AcceleratorBuffer`
`
represents a register of qubits. Programmers allocate
this register of a certain size, and pass it by reference to all execution tasks.
These execution tasks are carried out by concrete instances of the `Accelerator`
interface, and these instances are responsible for persisting information to the
provided buffer reference. This ensures programmers have access to all execution results
and metadata upon execution completion.
Programmers can allocate a buffer through the `xacc::qalloc(const int n)` (`xacc.qalloc(int)` in Python) call.
Programmers can allocate a buffer through the
`
`xacc::qalloc(const int n)`
`
(`
`
xacc.qalloc(int)`
`
in Python) call.
After execution, measurement results can be queried as well as backend-specific
execution metadata. Below demonstrate some basic usage of the `AcceleratorBuffer`
execution metadata. Below demonstrate some basic usage of the
`
`AcceleratorBuffer`
`
.. code::
.. code::
cpp
#include "xacc.hpp"
...
...
...
@@ -33,7 +33,7 @@ execution metadata. Below demonstrate some basic usage of the `AcceleratorBuffer
in Python
.. code::
.. code::
python
import xacc
...
...
...
@@ -54,7 +54,7 @@ is represented in XACC as a `CompositeInstruction`. The creation of `Instruction
implementation of the `IRProvider`, specifically a 3 instruction circuit with one
parameterized `Ry` on a variable `theta`.
.. code::
.. code::
cpp
#include "xacc.hpp"
...
...
...
@@ -67,7 +67,7 @@ parameterized `Ry` on a variable `theta`.
in Python
.. code::
.. code::
python
import xacc
...
...
...
@@ -84,7 +84,7 @@ a `Compiler` implementation for the language being used. `Compilers` take kernel
source strings and produce IR (one or many `CompositeInstruction`s). Here we demonstrate
the same circuit as above, but using a Quil kernel
.. code::
.. code::
cpp
#include "xacc.hpp"
...
...
...
@@ -109,7 +109,7 @@ the same circuit as above, but using a Quil kernel
in Python
.. code::
.. code::
python
import xacc
...
...
...
@@ -138,7 +138,7 @@ backend execution.
Next we demonstrate how one might leverate `IRTransformation` to perform general optimizations
on IR instances.
.. code::
.. code::
cpp
#include "xacc.hpp"
...
...
...
@@ -161,7 +161,7 @@ on IR instances.
in Python
.. code::
.. code::
python
import xacc
...
...
...
@@ -193,7 +193,7 @@ The `Observable` concept in XACC dictates measurements to be performed
on unmeasured an `CompositeInstruction`. XACC provides `pauli` and `fermion`
`Observable` implementations. Below we demonstrate how one might create these objects.
.. code::
.. code::
cpp
#include "xacc.hpp"
#include "xacc_observable.hpp"
...
...
@@ -212,7 +212,7 @@ on unmeasured an `CompositeInstruction`. XACC provides `pauli` and `fermion`
in Python
.. code::
.. code::
python
import xacc
...
...
...
@@ -235,7 +235,7 @@ Here we demonstrate getting reference to an `Accelerator` and using it to execut
Note this is a full example, that leverages the `xasm` compiler as well as requisite C++ framework
initialization and finalization.
.. code::
.. code::
cpp
#include "xacc.hpp"
int main(int argc, char **argv) {
...
...
@@ -267,7 +267,7 @@ initialization and finalization.
in Python
.. code::
.. code::
python
import xacc
...
...
@@ -295,7 +295,7 @@ a thin wrapper for functor-like objects exposing a specific argument structure (
arg a `vector<double>` representing current iterate's parameters, and another one representing the mutable
gradient vector). Below is a demonstration of how one might use this utility:
.. code::
.. code::
cpp
auto optimizer =
xacc::getOptimizer("nlopt");
...
...
@@ -319,7 +319,7 @@ gradient vector). Below is a demonstration of how one might use this utility:
or in Python
.. code::
.. code::
python
def rosen_with_grad(x):
g = [-2*(1-x[0]) + 400.*(x[0]**3 - x[1]*x[0]), 200 * (x[1] - x[0]**2)]
...
...
@@ -346,7 +346,7 @@ internal compilation database (standard map of CompositeInstruction names to Com
can get reference to the individual CompositeInstructions via an exposed `getCompiled()` XACC API call. The
code below demonstrates how one would use `qasm()` and its overall utility.
.. code::
.. code::
cpp
#include "xacc.hpp"
...
...
...
@@ -385,7 +385,7 @@ code below demonstrates how one would use `qasm()` and its overall utility.
or in Python
.. code::
.. code::
python
import xacc
...
...
...
docs/source/install.rst
View file @
79bfade7
...
...
@@ -14,7 +14,7 @@ install BLAS and LAPACK as well, which is required to build some optional simula
We install libunwind-dev which is also optional, but provides verbose stack-trace printing
upon execution error.
.. code::
.. code::
bash
$ sudo apt-get update && sudo apt-get install -y software-properties-common
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt-get update
...
...
@@ -30,7 +30,7 @@ install BLAS and LAPACK as well, which is required to build some optional simula
We install libunwind-dev which is also optional, but provides verbose stack-trace printing
upon execution error.
.. code::
.. code::
bash
$ sudo apt-get update
$ sudo apt-get -y install gcc g++ git libcurl4-openssl-dev python3 libunwind-dev \
...
...
@@ -41,7 +41,7 @@ Centos 7 Prerequisites
Here we will demonstrate installing from a bare Centos 7 install using GCC 8. We
install BLAS and LAPACK as well, which is required to build some optional simulators.
.. code::
.. code::
bash
$ sudo yum install libcurl-devel python3-devel git centos-release-scl make \
devtoolset-8-gcc devtoolset-8-gcc-c++ blas-devel lapack-devel
...
...
@@ -52,7 +52,7 @@ Fedora 30 Prerequisites
Here we will demonstrate installing from a bare Fedora 30 install using GCC 9. We
install BLAS and LAPACK as well, which is required to build some optional simulators.
.. code::
.. code::
bash
$ sudo dnf install python3-devel libcurl-devel git g++ gcc make blas-devel lapack-devel
$ sudo python3 -m pip install cmake
...
...
@@ -64,7 +64,7 @@ standard includes like `wchar.h` and others. See `here <https://stackoverflow.co
for proper XCode install and configuring to address these types of issues. Here we assume you
have Homebrew installed.
.. code::
.. code::
bash
$ brew install python3 openssl curl
...
...
@@ -72,13 +72,13 @@ Build XACC
----------
The best way to install a recent version of CMake is through Python Pip.
.. code::
.. code::
bash
$ sudo python3 -m pip install cmake
Now clone and build XACC
.. code::
.. code::
bash
$ git clone https://github.com/eclipse/xacc
$ cd xacc && mkdir build && cd build
...
...
@@ -92,7 +92,7 @@ Now clone and build XACC
You can run Python examples as well
.. code::
.. code::
bash
[ you may also want to add this to your .bashrc ]
$ export PYTHONPATH:$PYTHONPATH:$HOME/.xacc
...
...
@@ -100,7 +100,7 @@ You can run Python examples as well
Most users build and install the TNQVM Accelerator
.. code::
.. code::
bash
$ git clone https://github.com/ornl-qci/tnqvm
$ cd tnqvm && mkdir build && cd build
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment