[Feature] Add ishermitian, isantihermitian, hermitianpart(!) and antihermitianpart(!)#64
[Feature] Add ishermitian, isantihermitian, hermitianpart(!) and antihermitianpart(!)#64
ishermitian, isantihermitian, hermitianpart(!) and antihermitianpart(!)#64Conversation
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
|
Ok I've added a blocked version of the The cache-friendliness of the blocked strategy only seems to show up on my Mac M4 only for really large matrices (several thousands), but that might be because the Apple M processors have very big caches if I remember correctly. The performance seems roughly constant as soon as the blocksize is somewhere in the range 32 - 512, though I did not do any serious benchmarking. Also, this will be hardware dependent, and I assume older hardware would benefit from blocksizes on the smaller end of this range. Interface-wise, I would still like to propose the following changes:
Of course this will need dedicated GPU implementations (@kshyatt 😇). And maybe chainrules? I have not yet looked at the |
lkdvos
left a comment
There was a problem hiding this comment.
Definitely happy with project_hermitian etc instead, might even be nicer to not name-clash with LinearAlgebra too.
I think it might even pay off to add the optimization to the ishermitian check, since this is actually called in all the check_input(eigh_*, ...) methods.
The problem with this is that we then have to provide a I have some more questions about the current Final question concerns the naming. Are we fine shipping our own |
|
For the GPU support, since |
|
The difference with One proposal could be to use underscores always: Alternatively, we could use More ideas are welcome. |
|
On a different note, the blocked versions should probably be restricted to |
|
For the approx versions, we can probably then adapt the one in GPUArrays and revisit it if it's a performance problem, then |
In principle I would think we just provide one set of parameters for that and go from there? I'm okay with trying to pass an algorithm too, but realistically this is not something I will ever try to tweak, so if we can run just a few benchmarks for the blasfloats and select reasonable defaults from there I'd be happy.
Yes, I wasn't thinking about it too much. In principle I guess an optimal implementation should compute both the norm of
I think I'm okay with shipping our own. Given that we already have |
|
Ok, so we keep the current naming? Another question I had while modifying these implementations is when we restrict |
|
One more question: for |
|
I'm happy with the current names. I'm also happy with the default tolerances right now, since I would like to have |
|
Ok, for me this is also ready I think. I know I mentioned to also add |
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
* Bump v0.6 * rename `gaugefix` -> `fixgauge` * reduce unnecessary warnings * fix `copy_input` signatures in Mooncake tests * Add changelog to docs
This is a small feature which I noticed can be useful in various contexts, and which I have definitely wanted to have in the toolbox myself at some point. It still needs some more tests and making sure we have the correct implementations, but I think this would be a good addition to the package.