Fix Yao
extension by properly transposing matrices
#212
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.
This PR resolves #210 by transposing the matrices received from
Yao
. This has to be done, sinceYao
's conventions seem to be (outputs, inputs), rather than (inputs, outputs) that we usually do. See that this problem is now fixed:@amrFRE, see that here I computed some expectation values too.
Note that I used the function
find_permutation
to permute the result tensor so it follows the usual order (site1, site2, site3). @mofeing, shouldn't we add this function too? I think it makes sense, since if we want the state vector we should permute the tensor properly before the reshape.This is the function I used: