pyscf / pyscf/gpu4pyscf

[BUG] to_uhf, to_uks, and other conversion methods are NotImplemented in RHF/RKS

Open
#705 0 comments 0 reactions 1 assignee View on GitHub

@sunqm is already working on this.

Since May 10, 2026.

Dominant language
Cuda
Stars
351
Forks
84
Avg merge
3d 2h
Merged PRs (30d)
35

Description

The conversion methods (e.g., to_uhf, to_uks, to_rks, etc.) in gpu4pyscf.scf.hf.RHF and related classes are currently marked as NotImplemented.

In gpu4pyscf/scf/hf.py, these methods are set to:

    to_rhf                   = NotImplemented
    to_uhf                   = NotImplemented
    to_ghf                   = NotImplemented
    to_rks                   = NotImplemented
    to_uks                   = NotImplemented
    # ... and so on

A simple wrapper leveraging the existing to_cpu() and to_gpu() methods could bridge this gap:

def to_uhf(self):
    return self.to_cpu().to_uhf().to_gpu()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.