diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7044a440..04a6cf56 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,13 +12,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: key: ${{ github.ref }} path: .cache - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Upgrade pip @@ -44,7 +44,6 @@ jobs: fail-fast: false matrix: include: - - {python-version: "3.9", backend: "numpy", os: ubuntu-latest, coverage: True, minimal: True, full: True} - {python-version: "3.10", backend: "numpy", os: ubuntu-latest, coverage: True, minimal: True, full: True} - {python-version: "3.11", backend: "numpy", os: ubuntu-latest, coverage: True, minimal: True, full: True} - {python-version: "3.12", backend: "numpy", os: ubuntu-latest, coverage: False, minimal: True, full: True} @@ -52,13 +51,13 @@ jobs: - {python-version: "3.12", backend: "jax", os: ubuntu-latest, coverage: False, minimal: True, full: False} steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: key: ${{ github.ref }} path: .cache - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Upgrade pip @@ -97,13 +96,13 @@ jobs: if: github.ref == 'refs/heads/master' steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: key: ${{ github.ref }} path: .cache - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.10" - name: Upgrade pip diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index e298f296..f8a5e3cc 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -17,11 +17,11 @@ jobs: id-token: write steps: - - uses: actions/checkout@v2 - - name: Set up python "3.9" - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up python "3.10" + uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" - name: Upgrade pip run: | python -m pip install --upgrade pip diff --git a/ebcc/ext/fci.py b/ebcc/ext/fci.py index 03194c39..62437c58 100644 --- a/ebcc/ext/fci.py +++ b/ebcc/ext/fci.py @@ -399,9 +399,11 @@ def _get_c(spins: str) -> NDArray[T]: cn = ci[addrsi, addrsj] * signsi * signsj # Decompress the axes + spins_full = spins + spins + spins_full = spins_full[::2] + spins_full[1::2] shape = tuple( space["ab".index(s)].size(char) - for char, s in zip("O" * nalph + "V" * nalph + "O" * nbeta + "V" * nbeta, spins + spins) + for char, s in zip("O" * nalph + "V" * nalph + "O" * nbeta + "V" * nbeta, spins_full) ) subscript = "i" * nalph + "a" * nalph + "j" * nbeta + "b" * nbeta cn = util.decompress_axes(subscript, cn, shape=shape) diff --git a/ebcc/util/einsumfunc.py b/ebcc/util/einsumfunc.py index 6c71f205..352cfd1e 100644 --- a/ebcc/util/einsumfunc.py +++ b/ebcc/util/einsumfunc.py @@ -511,7 +511,7 @@ def einsum( # If it's a chain of contractions, use the path optimizer args = list(args) path_kwargs = dict(optimize=optimize, einsum_call=True) - contractions = np.einsum_path(subscript, *args, **path_kwargs)[1] + contractions = np.einsum_path(subscript, *args, **path_kwargs)[1] # type: ignore[arg-type] for contraction in contractions: inds, idx_rm, einsum_str, remain = list(contraction[:4]) contraction_args = [args.pop(x) for x in inds] # type: ignore