Skip to content

Commit

Permalink
fix reset
Browse files Browse the repository at this point in the history
  • Loading branch information
donghufeng committed Dec 19, 2024
1 parent 2fb167f commit 284ee83
Show file tree
Hide file tree
Showing 599 changed files with 4,760 additions and 4,750 deletions.
15 changes: 11 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

BasedOnStyle: Google
AccessModifierOffset: -3
AlignConsecutiveMacros: true
Expand Down Expand Up @@ -42,7 +41,7 @@ IncludeCategories:
# 9. Any local config header
# 10. Local headers
# 11. Catch2 headers
- Regex: '[<"](catch2/([A-Za-z0-9.\/\-_])+)[>"]' # Make sure Catch2 is included last
- Regex: '[<"](catch2/([A-Za-z0-9.\/\-_])+)[>"]' # Make sure Catch2 is included last
Priority: 110
- Regex: '[<"]tweedledum/([A-Za-z0-9.\/\-_])+[>"]'
Priority: 60
Expand Down Expand Up @@ -97,5 +96,13 @@ TypenameMacros: []
Standard: Latest
TabWidth: 4
UseTab: Never
WhitespaceSensitiveMacros: ['CLANG_DIAG_ON', 'CLANG_DIAG_OFF', 'GCC_DIAG_ON', 'GCC_DIAG_OFF', 'MSVC_DIAG_ON',
'MSVC_DIAG_OFF', 'MQ_DO_PRAGMA']
WhitespaceSensitiveMacros:
[
"CLANG_DIAG_ON",
"CLANG_DIAG_OFF",
"GCC_DIAG_ON",
"GCC_DIAG_OFF",
"MSVC_DIAG_ON",
"MSVC_DIAG_OFF",
"QUAFU_DO_PRAGMA",
]
15 changes: 7 additions & 8 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

markup:
first_comment_is_literal: true
format:
Expand Down Expand Up @@ -60,7 +59,7 @@ parse:
pargs:
flags:
- CONFIGURE
- '@ONLY'
- "@ONLY"
kwargs:
OUTPUT: 1
CONTENT: 1
Expand Down Expand Up @@ -100,7 +99,7 @@ parse:
RESULT_VARIABLE: 1
TIMEOUT: 1
WORKING_DIRECTORY: 1
mindquantum_add_pkg:
quafu_add_pkg:
pargs:
nargs: 1
flags:
Expand Down Expand Up @@ -141,13 +140,13 @@ parse:
PRE_CONFIGURE_COMMAND: +
SYSTEM_EXTRA_DEFINES: +
TARGET_ALIAS: +
mq_add_compile_definitions:
quafu_add_compile_definitions:
pargs:
nargs: +
flags:
- TRYCOMPILE
- TRYCOMPILE_FLAGCHECK
mq_link_libraries:
quafu_link_libraries:
pargs:
nargs: +
flags:
Expand All @@ -165,7 +164,7 @@ parse:
nargs: 1+
flags:
- FLAGCHECK
- NO_MQ_TARGET
- NO_QUAFU_TARGET
- NO_TRYCOMPILE_FLAGCHECK_TARGET
- NO_TRYCOMPILE_TARGET
kwargs:
Expand All @@ -178,7 +177,7 @@ parse:
pargs:
nargs: 1+
flags:
- NO_MQ_TARGET
- NO_QUAFU_TARGET
- VERBATIM
kwargs:
LANGS: +
Expand All @@ -199,4 +198,4 @@ lint:
local_var_pattern: _?([a-z][a-z0-9_]+|[A-Z][A-Z0-9_]+)
global_var_pattern: _?([a-z][a-z0-9_]+|[A-Z][A-Z0-9_]+)
internal_var_pattern: _?([a-z][a-z0-9_]+|[A-Z][A-Z0-9_]+)
macro_pattern: '[0-9a-z_]+'
macro_pattern: "[0-9a-z_]+"
2 changes: 1 addition & 1 deletion .cppcheck.suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ syntaxError:ccsrc/include/core/sparse/algo.h
syntaxError:ccsrc/include/ops/gates/terms_operator_base_external_ops.h:92
syntaxError:ccsrc/lib/simulator/vector/detail/cpu_vector_policy.cpp
syntaxError:ccsrc/lib/simulator/vector/detail/cpu_vector_policy_gate_expec.cpp
syntaxError:ccsrc/python/mqbackend/lib/details/define_terms_ops.h
syntaxError:ccsrc/python/quafubackend/lib/details/define_terms_ops.h
syntaxError:ccsrc/lib/simulator/vector/detail/cpu_common/cpu_vector_core_condition.cpp
syntaxError:ccsrc/lib/simulator/vector/detail/cpu_common/cpu_vector_core_gate_expect.cpp
syntaxError:ccsrc/lib/simulator/vector/detail/cpu_common/cpu_vector_core_dot_like.cpp
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: >-
${{ matrix.runs-on }}-python-${{ matrix.python }}-third-party-libs-${{ hashFiles('third_party/**') }}
-${{ secrets.cache_ver }}
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
echo $PYTHONPATH
pip install -r requirements_test.txt
pip install pytest
python3 -c "import mindquantum as mq;print(mq.qft(range(3)))"
python3 -c "import quafu as quafu;print(quafu.qft(range(3)))"
pytest tests/st -rs
# ============================================================================
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: macos-${{ matrix.xcode }}-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure
Expand All @@ -220,7 +220,7 @@ jobs:
echo $PYTHONPATH
pip install -r requirements_test.txt
pip install pytest
python3 -c "import mindquantum as mq;print(mq.qft(range(3)))"
python3 -c "import quafu as quafu;print(quafu.qft(range(3)))"
pytest tests/st -rs
# ============================================================================
Expand All @@ -245,7 +245,7 @@ jobs:

- name: Get history and tags for SCM versioning to work
run: |
git config --global --add safe.directory /__w/mindquantum/mindquantum
git config --global --add safe.directory /__w/quafu/quafu
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
Expand Down Expand Up @@ -288,7 +288,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: gcc-${{ matrix.gcc }}-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure
Expand Down Expand Up @@ -369,7 +369,7 @@ jobs:
echo $PYTHONPATH
pip install -r requirements_test.txt
pip install pytest
python3 -c "import mindquantum as mq;print(mq.qft(range(3)))"
python3 -c "import quafu as quafu;print(quafu.qft(range(3)))"
pytest tests/st -rs
# ============================================================================
Expand Down Expand Up @@ -410,7 +410,7 @@ jobs:
run: |
ls -alth
# pwd
# git config --global --add safe.directory /__w/mindquantum/mindquantum
# git config --global --add safe.directory /__w/quafu/quafu
# git fetch --prune --unshallow
# git fetch --depth=1 origin +refs/tags/*:refs/tags/*
Expand Down Expand Up @@ -453,7 +453,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: clang-${{ matrix.clang }}-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure (Clang)
Expand Down Expand Up @@ -540,7 +540,7 @@ jobs:
echo $PYTHONPATH
pip install -r requirements_test.txt
pip install pytest
python3 -c "import mindquantum as mq;print(mq.qft(range(3)))"
python3 -c "import quafu as quafu;print(quafu.qft(range(3)))"
pytest tests/st -rs
# ============================================================================
Expand Down Expand Up @@ -600,7 +600,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: msvc-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure
Expand Down Expand Up @@ -688,7 +688,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: clang-cl-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure
Expand Down Expand Up @@ -753,7 +753,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: mingw64-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Set up MinGW64
Expand Down Expand Up @@ -911,7 +911,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: msys2-${{ matrix.msystem }}-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure
Expand Down Expand Up @@ -1011,7 +1011,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: cuda-${{ matrix.cuda }}-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure
Expand All @@ -1038,7 +1038,7 @@ jobs:
echo $PYTHONPATH
pip install -r requirements_test.txt
pip install pytest
python3 -c "import mindquantum as mq;print(mq.qft(range(3)))"
python3 -c "import quafu as quafu;print(quafu.qft(range(3)))"
pytest tests/st -rs
# ============================================================================
Expand Down Expand Up @@ -1104,7 +1104,7 @@ jobs:
if: env.ACT != 'true'
uses: actions/cache@v3
with:
path: build/.mqlibs
path: build/.quafulibs
key: nvhpc-${{ matrix.nvhpc }}-third-party-libs-${{ hashFiles('third_party/**') }}-${{ secrets.cache_ver }}

- name: Configure
Expand Down
6 changes: 2 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# NB: this is mainly shown for illustration purposes and is not actively maintained.

---

include: .gitlab/hashes.yml

variables:
Expand Down Expand Up @@ -43,11 +42,11 @@ variables:
./build_locally.sh --cxx --debug-cmake --test --ccache
--configure-only -c --clean-3rdparty --prefix=$PWD/install
- ./build_locally.sh --cxx --debug-cmake --test --ccache
- ./build_locally.sh --install # NB: no need to pass the other parameters
- ./build_locally.sh --install # NB: no need to pass the other parameters

.cache_paths:
paths: &cache_paths
- build/.mqlibs
- build/.quafulibs
- cache
- venv

Expand Down Expand Up @@ -79,7 +78,6 @@ gcc:
script:
- *default_script_unix


clang:
image: silkeh/clang:${CLANG}
inherit:
Expand Down
10 changes: 5 additions & 5 deletions .jenkins/check/config/filter_cmakelint.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# MindQuantum
"mindquantum/cmake" "whitespace/indent"
"mindquantum/cmake/Modules" "whitespace/indent"
"mindquantum/cmake/Modules/apple" "whitespace/indent"
"mindquantum/ccsrc/lib/simulator/stabilizer/CMakeLists.txt" "whitespace/indent"
# quafu
"quafu/cmake" "whitespace/indent"
"quafu/cmake/Modules" "whitespace/indent"
"quafu/cmake/Modules/apple" "whitespace/indent"
"quafu/ccsrc/lib/simulator/stabilizer/CMakeLists.txt" "whitespace/indent"
Loading

0 comments on commit 284ee83

Please sign in to comment.