From 3c3de9f02e2b00a047a7a8e056847589e68cbf15 Mon Sep 17 00:00:00 2001 From: Yuichi Motoyama Date: Wed, 4 Sep 2024 16:50:19 +0900 Subject: [PATCH 1/2] fix tenes_std for complex but hermite hamiltonian --- tool/tenes_std.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/tenes_std.py b/tool/tenes_std.py index 0f8ef803..25a69de4 100644 --- a/tool/tenes_std.py +++ b/tool/tenes_std.py @@ -885,7 +885,8 @@ def make_evolution_onesite( result_cutoff: float = 1e-15, ) -> List[SiteOperator]: D, V = np.linalg.eigh(hamiltonian.elements) - evo = np.einsum("il, l, jl -> ij", V, np.exp(-tau * D), V) + evo = np.einsum("il, l, jl -> ij", V, np.exp(-tau * D), V.conjugate()) + return [SiteOperator(hamiltonian.site, evo, group=group)] @@ -904,7 +905,7 @@ def make_evolution_twosite( H = hamiltonian.elements.reshape((dims[0] * dims[1], dims[0] * dims[1])) D, V = np.linalg.eigh(H) evo = np.reshape( - np.dot(V, np.dot(np.diag(np.exp(-tau * D)), V.transpose())), + np.einsum("il, l, jl -> ij", V, np.exp(-tau * D), V.conjugate()), hamiltonian.elements.shape, ) bonds = graph.make_path(hamiltonian.bond) From 71c136591d5a444fdb9abe0b70f99e81e7cdec41 Mon Sep 17 00:00:00 2001 From: Yuichi Motoyama Date: Wed, 4 Sep 2024 17:02:42 +0900 Subject: [PATCH 2/2] update gha --- .github/workflows/deploy_docs.yml | 8 ++++---- .github/workflows/linux.yml | 12 +++++++++--- .github/workflows/macos.yml | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index a8939b60..98c10a1e 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -17,20 +17,20 @@ jobs: uses: rlespinasse/github-slug-action@v4.x - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: main - name: Checkout gh-pages - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: gh-pages path: gh-pages - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: '3.10' - name: Install dependencies run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e594754c..dfc2fc63 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,11 +1,17 @@ name: Linux -on: [push] +on: + push: + pull_request: + schedule: + - cron: '0 0 1,15 * *' # JST 9:00 AM, 1st and 15th of every month + jobs: build: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: ["ubuntu-20.04", "ubuntu-22.04"] python-version: ["3.10"] @@ -19,10 +25,10 @@ jobs: compiler: "g++-12" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ac01749a..39096434 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,25 +1,25 @@ name: macOS -on: [push] +on: + push: + pull_request: + schedule: + - cron: '0 0 1,15 * *' # JST 9:00 AM, 1st and 15th of every month jobs: build: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: - os: [macos-12, macos-11] - compiler: [c++, g++-12] - include: - - os: macos-12 - compiler: g++-11 - - os: macos-11 - compiler: g++-10 + os: [macos-14, macos-13] + compiler: [c++, g++-14, g++-12] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10"