Skip to content

Commit

Permalink
Merge pull request #150 from Juan-Gomez1/qiskit-aer
Browse files Browse the repository at this point in the history
Change Aer packaging to be used with Qiskit
  • Loading branch information
atilag authored and GitHub Enterprise committed Dec 18, 2018
2 parents 1fa32db + 4527124 commit b89515a
Show file tree
Hide file tree
Showing 50 changed files with 834 additions and 127 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
* @chriseclectic @atilag

# Individual folders on root directory
/aer @chriseclectic @atilag
/qiskit @chriseclectic @atilag
/cmake @atilag
/doc @chriseclectic @atilag
/examples @chriseclectic @atilag
/legacy-build @chriseclectic @atilag
/contrib @chriseclectic @atilag
/test @chriseclectic @atilag
/src @chriseclectic @atilag

Expand Down
22 changes: 4 additions & 18 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Pre-requisites
~~~~~~~~~~~~~~

Most of the required dependencies can be installed via ``pip``, using the
``requirements-dev.txt`` file that exists on every simulator addon directory, eg:
``pip install -r qiskit-aer/aer/requirements-dev.txt``.
``requirements-dev.txt`` file, eg:
``pip install -r requirements-dev.txt``.

As we are dealing with languages that build to native binaries, we will
need to have installed any of the `supported CMake build tools <https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html>`_.
Expand Down Expand Up @@ -183,7 +183,7 @@ In the case of building the Terra addon, you have to pass these flags after writ

.. code::
qiskit-aer/aer/qiskit_aer$ python ./setup.py bdist_wheel -- -DUSEFUL_FLAG=Value
qiskit-aer$ python ./setup.py bdist_wheel -- -DUSEFUL_FLAG=Value
These are the flags:
Expand Down Expand Up @@ -237,7 +237,7 @@ and then run `unittest` Python framework.
.. code::
qiskit-aer$ python ./setup.py install
qiskit-aer$ python -m unittest discover -s test
qiskit-aer$ python -m unittest discover -s test -v
The integration tests for Terra addon are included in: `test/terra`.

Expand Down Expand Up @@ -394,17 +394,3 @@ There are two main branches in the repository:
stable software ready for production environments.
- All the tags from the release versions are created from this branch.

Release cycle
~~~~~~~~~~~~~

TODO: TBD

What version should I use: development or stable?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TODO: TBD

Documentation
-------------

TODO: TBD
29 changes: 8 additions & 21 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,32 @@ The format is based on `Keep a Changelog`_.

Added
-----
- Added feature example (#662)


Changed
-------
- Some description related to a change made in the code. (#634)


Removed
-------
- etc (#661)


Fixed
-----
- etc (#663)


`0.1.0`_ - 2018-08-29

`0.1.0`_ - 2018-12-19
=====================

Added
-----
- Added ... description


Changed
-------
- Changed ... description


Removed
-------
- Removed ... description


Fixed
-----
- Fixed ... description
- QASM Simulator
- Statevector Simulator
- Unitary Simulator
- Noise models
- Terra integration
- Standalone Simulators support


.. _UNRELEASED: https://github.com/Qiskit/qiskit-terra/compare/0.4.0...HEAD
Expand Down
18 changes: 13 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ project(qasm_simulator LANGUAGES CXX C)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR}/cmake)

# Warning: Because of a bug on CMake's FindBLAS or (it's not clear whoes fault is)
# libopenblas.a for Ubuntu (maybe others) we need to copy the file:
# cmake/FindBLAS.cmake.fix-static-linking, to the directory were CMake Modules are
# installed in the system, but with the name: FindBLAS.cmake
option(STATIC_LINKING "Specify if we want statically link the executable (for
redistribution mainly)" FALSE)
option(BUILD_TESTS "Specify whether we want to build tests or not" FALSE)
Expand Down Expand Up @@ -59,10 +63,10 @@ set_target_properties(qasm_simulator PROPERTIES
RUNTIME_OUTPUT_DIRECTORY_RELEASE Release)

if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# In order to build for MacOSX 10.7 and above with Clang, we need to force the "deployment target" to 10.7
# In order to build for MacOSX 10.9 and above with Clang, we need to force the "deployment target" to 10.9
# and force using libc++ instead of the default for this target: libstdc++ otherwise we could not
# use C++11/14
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.7" CACHE STRING "" FORCE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE)
enable_cxx_compiler_flag_if_supported("-stdlib=libc++")
endif()

Expand Down Expand Up @@ -126,7 +130,12 @@ if(NOT "${OpenMP_FOUND}" OR NOT "${OpenMP_CXX_FOUND}")
execute_process(COMMAND ${BREW} --prefix libomp OUTPUT_VARIABLE BREW_LIBOMP_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp")
set(OpenMP_CXX_LIB_NAMES "omp")
set(OpenMP_omp_LIBRARY "${BREW_LIBOMP_PREFIX}/lib/libomp.dylib")
if(STATIC_LINKING)
message(STATUS "Using static library for OMP Threads: libomp.a")
set(OpenMP_omp_LIBRARY "${BREW_LIBOMP_PREFIX}/lib/libomp.a")
else()
set(OpenMP_omp_LIBRARY "${BREW_LIBOMP_PREFIX}/lib/libomp.dylib")
endif()
include_directories("${BREW_LIBOMP_PREFIX}/include")
message(STATUS "Using Homebrew libomp from ${BREW_LIBOMP_PREFIX}")
set(OPENMP_FOUND TRUE)
Expand All @@ -139,7 +148,6 @@ endif()
if(OPENMP_FOUND)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
#if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(APPLE)
# On Apple and clang, we do need to link against the library
set(OPENMP_EXTERNAL_LIB "${OpenMP_${OpenMP_CXX_LIB_NAMES}_LIBRARY}")
Expand Down Expand Up @@ -195,5 +203,5 @@ endif()

# Cython build is only enabled if building through scikit-build.
if(SKBUILD)
add_subdirectory(qiskit_aer/backends/wrappers)
add_subdirectory(qiskit/providers/aer/backends/wrappers)
endif()
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include qiskit_aer/VERSION.txt
include qiskit/providers/aer/VERSION.txt
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ qiskit-aer$ pip install dist/qiskit_aer-0.1.0-cp36-cp36m-linux_x86_64.whl

We are all set! Now we ready to start using the simulator in our python code:
```python
import qiskit_aer as aer
from qiskit_aer import Aer # Imports the Aer Provider
from qiskit import Aer # Imports the Aer Provider

Aer.backends() # List Aer backends
Aer.backends() # List of the backends
```
Loading

0 comments on commit b89515a

Please sign in to comment.