Skip to content
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

Update constraints.py #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Jonathan-Lindley
Copy link
Collaborator

Hello, I have been working on making various changes to the code:

Added code implementing the Q condition

Made various corrections to ensure code runs as intended (e.g. adding required if/else statements which were absent, fixing a normalisation factor)

There is an issue with dimensionality in the existing code - when running certain constraints, you input a rank-4 tensor and get out a rank-6 tensor. This then causes an issue when going to the next constraint in the sequence as the expected input is a rank-4 tensor. To fix this I have added code to convert the rank-6 tensors into rank-4 tensors, but this should be checked.

Added code to the find_closest_sdp function which reshapes rank-4 n x n x n x n tensor into matrix with dimensions n2 x n2. This should allow the function to run. The matrix is then reshaped back into a rank-4 tensor after the algorithm is applied.

@PaulWAyers
Copy link
Member

The rank-4 to rank-6 tensor is expected. There pull-back then converts rank-6 to rank-4.

So the workflow is rank-4 to rank-6 to rank-2. Force rank-2 tensor to be positive semidefinite with the correct trace; take the corrected rank-2 tensor, conver it to rank-6, then pull back to rank-4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants