-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ca9055
commit ce3b9c7
Showing
17 changed files
with
37 additions
and
4,333 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
__all__ = ['eigs'] | ||
|
||
from .jitted_functions import * | ||
from .jax_backend import * | ||
|
||
eigs = JaxBackend().eigs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import jax | ||
import jax.numpy as jnp | ||
import numpy as np | ||
|
||
__all__ = ["cpu_eig"] | ||
|
||
def cpu_eig_host(H): | ||
res = np.linalg.eig(H) | ||
print(res) | ||
return res | ||
|
||
def cpu_eig(H): | ||
result_shape = (jax.ShapeDtypeStruct(H.shape[0:1], H.dtype), | ||
jax.ShapeDtypeStruct(H.shape, H.dtype)) | ||
return jax.pure_callback(cpu_eig_host, result_shape, H) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.