Skip to content

Commit

Permalink
Merge pull request #97 from issp-center-dev/fix_std
Browse files Browse the repository at this point in the history
Fix a bug for complex Hamiltonian
  • Loading branch information
yomichi authored Sep 4, 2024
2 parents b3ef5fb + 71c1365 commit 6efe5d1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ jobs:
uses: rlespinasse/[email protected]

- 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: |
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -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"]
Expand All @@ -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 }}

Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
5 changes: 3 additions & 2 deletions tool/tenes_std.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]


Expand All @@ -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)
Expand Down

0 comments on commit 6efe5d1

Please sign in to comment.