Skip to content

Commit 01de514

Browse files
authored
Merge pull request #429 from ValeevGroup/feature/export-numpy
[export] minimal numpy support
2 parents 71755a6 + 12d5788 commit 01de514

17 files changed

+2714
-51
lines changed

.github/workflows/cmake.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ jobs:
6464
steps:
6565
- uses: actions/checkout@v5
6666

67+
- name: free up disk space on Ubuntu runner
68+
if: ${{ matrix.os == 'ubuntu-24.04' }}
69+
uses: jlumbroso/free-disk-space@main
70+
71+
- name: Setup Python
72+
uses: actions/setup-python@v5
73+
with:
74+
python-version: '3.x'
75+
76+
- name: Install Python packages
77+
run: pip install numpy torch
78+
6779
- name: Create Build Environment
6880
# Some projects don't allow in-source building, so create a separate build directory
6981
# We'll use this as our working directory for all subsequent commands

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ _deps
6565
# End of https://www.gitignore.io/api/cmake
6666
# build directory
6767
build
68+
_codeql_build_dir
69+
_codeql_detected_source_root
6870

6971
.clangd
7072
.vscode

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ set(SeQuant_src
350350
SeQuant/core/utility/macros.hpp
351351
SeQuant/core/utility/nodiscard.hpp
352352
SeQuant/core/utility/permutation.hpp
353+
SeQuant/core/utility/scope.hpp
353354
SeQuant/core/utility/singleton.hpp
354355
SeQuant/core/utility/string.cpp
355356
SeQuant/core/utility/string.hpp

SeQuant/core/export/julia_tensor_operations.hpp

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -219,49 +219,21 @@ class JuliaTensorOperationsGenerator : public Generator<Context> {
219219
" += " + to_julia_expr(expression, ctx) + "\n";
220220
}
221221

222-
void declare(const Index &idx, const Context &ctx) override {
223-
(void)idx;
224-
(void)ctx;
225-
}
222+
void declare(const Index &, const Context &) override {}
226223

227-
void declare(const Variable &variable, UsageSet usage,
228-
const Context &ctx) override {
229-
(void)variable;
230-
(void)usage;
231-
(void)ctx;
232-
}
224+
void declare(const Variable &, UsageSet, const Context &) override {}
233225

234-
void declare(const Tensor &tensor, UsageSet usage,
235-
const Context &ctx) override {
236-
(void)tensor;
237-
(void)usage;
238-
(void)ctx;
239-
}
226+
void declare(const Tensor &, UsageSet, const Context &) override {}
240227

241-
void all_indices_declared(std::size_t amount, const Context &ctx) override {
242-
(void)amount;
243-
(void)ctx;
244-
}
228+
void all_indices_declared(std::size_t, const Context &) override {}
245229

246-
void all_variables_declared(std::size_t amount, const Context &ctx) override {
247-
(void)amount;
248-
(void)ctx;
249-
}
230+
void all_variables_declared(std::size_t, const Context &) override {}
250231

251-
void all_tensors_declared(std::size_t amount, const Context &ctx) override {
252-
(void)amount;
253-
(void)ctx;
254-
}
232+
void all_tensors_declared(std::size_t, const Context &) override {}
255233

256-
void begin_declarations(DeclarationScope scope, const Context &ctx) override {
257-
(void)scope;
258-
(void)ctx;
259-
}
234+
void begin_declarations(DeclarationScope, const Context &) override {}
260235

261-
void end_declarations(DeclarationScope scope, const Context &ctx) override {
262-
(void)scope;
263-
(void)ctx;
264-
}
236+
void end_declarations(DeclarationScope, const Context &) override {}
265237

266238
void insert_comment(const std::string &comment, const Context &) override {
267239
m_generated += "# " + comment + "\n";

0 commit comments

Comments
 (0)