Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bug for complex Hamiltonian #97

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/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: |
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