-
Notifications
You must be signed in to change notification settings - Fork 56
DiagonalTensorMap constructor rrule #208
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
Merged
Jutho
merged 29 commits into
QuantumKitHub:master
from
ebelnikola:ProjectTo-for-DiagonalTensorMap
Feb 8, 2025
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2b79107
adds `ProjectTo` for `DiagonalTensorMap`
ebelnikola f275175
adds an `rrule` for `DiagonalTensorMap` constructor
ebelnikola 2cf4cb4
Corrects bug in the DiagonalTensorMap rrule, adds
ebelnikola c43535f
@test missing in the constructor test added...
ebelnikola 4653113
wait no, @test did not belong there
ebelnikola c81e43c
Update ext/TensorKitChainRulesCoreExt/utility.jl
ebelnikola 41d1113
mixed type tests for ProjectTo
ebelnikola 53b399c
+ rrule test on complex tensors.
ebelnikola 8b51b8b
correct data length for DiagonalTensor in tests
ebelnikola 2905c0b
correct data length in DiagonalTensorMap for random tnagents
ebelnikola 79a38b6
Comment on the test failure
ebelnikola 689b4ea
Jutho's corrections
ebelnikola e1fe3be
Add `DiagonalTensorMap(::AbstractTensorMap)`
lkdvos ccb7c93
Specialize `to_vec(::DiagonalTensorMap)`
lkdvos f8ca1fd
Add rrules matrix functions
lkdvos 98dea08
Add tests AD of matrixfunctions
lkdvos 58904f7
Merge branch 'master' into ProjectTo-for-DiagonalTensorMap
lkdvos 5eec371
Remove duplicate methods
lkdvos 9e834c4
disable broken tests
lkdvos a5ba340
Fix CI check
lkdvos 3e45ff2
Adapt rrules for constructors and getproperty to include qdims
lkdvos f9ed03e
exchange sqrt and invsqrt in hope of fixing without thinking
lkdvos b195929
Merge branch 'master' into ProjectTo-for-DiagonalTensorMap
lkdvos 643aba7
Actually think to fix the problem
lkdvos 06d3784
Simplify positive data generation
lkdvos 2732f66
simplify CI detection
lkdvos 455bcc2
Merge branch 'master' into ProjectTo-for-DiagonalTensorMap
lkdvos 8c08866
Fix bad merge
lkdvos 618aaad
uncomment non-ad tests
Jutho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule KrylovKit
added at
8bccac
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very strange construct. Why not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mostly taken from here.
I think the biggest problem is that the environment variables are strings, so they really become
"true"and"false", which makes for an annoying interface.I don't think the construction above works, because
"true"would not evaluate as a bool...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,
parse(Bool, get(ENV, "CI", "false"))There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this, I tried
get(ENV, "CI", "false") == "true". Does that work?