Skip to content

Commit

Permalink
Merge pull request #34 from QE-Lab/develop
Browse files Browse the repository at this point in the history
Prepare release 0.2beta
  • Loading branch information
Nader-Khammassi authored Aug 22, 2018
2 parents 2cfe2ac + 62be274 commit e38993f
Show file tree
Hide file tree
Showing 119 changed files with 5,644 additions and 7,991 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "src/parser/libqasm"]
path = src/parser/libqasm
url = [email protected]:QE-Lab/libqasm.git
branch = develop
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

SET(PROJECT_NAME "qx-simulator")
PROJECT(${PROJECT_NAME})

enable_testing()

FIND_PACKAGE(OpenMP)
IF(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
Expand All @@ -16,6 +18,12 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wfatal-errors -O3 -DCG_BC -DQX_SPARSE_MV_MUL -D__BUILTIN_LINALG__ -msse4.2 -DUSE_OPENMP")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
SET(CXX "Clang-omp++")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++11 -Wall -Wfatal-errors -Wno-unused-local-typedef -O3 -DCG_BC -DQX_SPARSE_MV_MUL -D__BUILTIN_LINALG__ -msse4.2 -DUSE_OPENMP -Wno-reorder -Wno-unneeded-internal-declaration -Wno-unused-variable -Wno-unused-private-field -Wno-deprecated-register -Wno-unused-function")
ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")


SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXPU_TIMER")

ADD_SUBDIRECTORY(
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04

RUN apt-get update && \
apt-get -y install g++ cmake make
apt-get -y install g++ cmake make git python3 python3-dev bison flex swig
42 changes: 32 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,45 @@

pipeline {
agent {
dockerfile {
filename 'Dockerfile.build'
agent any
environment {
PERSIST_WORKSPACE = ""
}
stages {
stage('Checkout submodules') {
steps {
script {
PERSIST_WORKSPACE = WORKSPACE
}
sh 'pwd'
sh 'GIT_SSH_COMMAND="ssh -i /var/jenkins_home/.ssh/jenkins_libqasm_deploy_id_rsa" git submodule update --init -- src/parser/libqasm'
sh 'cd src/parser/libqasm/ && git submodule update --init -- qasm_flex_bison/test/doctest'
}
}
}
stages {
stage('Build') {
agent {
dockerfile {
filename 'Dockerfile.build'
}
}
steps {
sh 'pwd'
sh 'mkdir build && cd build && cmake ../ && make'
dir(PERSIST_WORKSPACE) {
sh 'pwd'
sh 'mkdir build && cd build && cmake ../ && make'
}
}
}
stage('Test') {
agent {
dockerfile {
filename 'Dockerfile.build'
}
}
steps {
sh 'for file in src/circuits/*.qc; do build/bin/qx-simulator/qx-simulator "$file"; done'

dir(PERSIST_WORKSPACE) {
sh 'for file in tests/circuits/*.qc; do build/bin/qx-simulator "$file"; done'
}
}
}

}
}
}
7 changes: 4 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
xpu-0.1.5
parser
parser/libqasm/qasm_flex_bison/library/
qcode
)

ADD_LIBRARY(lexgram SHARED IMPORTED)
SET_TARGET_PROPERTIES(lexgram PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/parser/liblexgram.so)
ADD_SUBDIRECTORY(
${CMAKE_CURRENT_SOURCE_DIR}/parser/libqasm/qasm_flex_bison/library
)

ADD_EXECUTABLE(qx-server qx_server.cc)
ADD_EXECUTABLE(qx-simulator-old simulator_old.cc)
Expand Down
2 changes: 1 addition & 1 deletion src/INFO/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/ /___/ / _> < _\ \ _/ / / /|_/ / / /_/ / / /__ / __ | / / / /_/ / / , _/
\______/\__\ /_/|_| /___/ /___/ /_/ /_/ \____/ /____//_/ |_|/_/ \____/ /_/|_|

version 0.1 beta - QuTech - 2016 - report bugs and suggestions to: [email protected]
version 0.2 beta - QuTech - 2018 - report bugs and suggestions to: [email protected]
===================================================================================================


Expand Down
Loading

0 comments on commit e38993f

Please sign in to comment.