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

Operator tools #140

Merged
merged 36 commits into from
Jun 14, 2019
Merged

Operator tools #140

merged 36 commits into from
Jun 14, 2019

Conversation

joshcombes
Copy link
Contributor

@joshcombes joshcombes commented Jun 12, 2019

This is a first pass. Note these things

  1. major module re-org
  2. fix to plotting module
  3. update random operators notebook
  4. update superoperator tools notebook
  5. type checking in random ops
  6. new module to check plain old operators are unitary etc

Not sure that I am happy with the current names or organization. I liked having a big monolithic superoperators module. The imports via __init__ is awkward, try it in a notebook.

Feel free to change and make commits on this branch as you see fit.

@joshcombes joshcombes requested a review from kylegulshen June 12, 2019 04:47
@joshcombes joshcombes requested a review from a team as a code owner June 12, 2019 04:47
@joshcombes joshcombes mentioned this pull request Jun 12, 2019
12 tasks
@joshcombes
Copy link
Contributor Author

@kylegulshen i cant figure the failure out. the t2 notebook runs fine locally.

@joshcombes
Copy link
Contributor Author

ok now they work ...

Copy link
Contributor

@kylegulshen kylegulshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should investigate the pad issue further but otherwise LGTM. I'm going to push some minor revisions to the random_operators notebook. If we decide to move permute_tensor_factor somewhere else we need to take it out of the notebook too.

return Z


def permute_tensor_factors(dims: Union[int, List[int]], perm: List[int]) -> np.ndarray:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move this to somewhere else? It doesn't really fit here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok lets make a PR to put this somewhere else.

ax.set_xticks(range(dim_squared))
ax.set_xlabel("Input Pauli Operator", fontsize=fontsizes)
ax.set_yticks(range(dim_squared))
ax.set_ylabel("Output Pauli Operator", fontsize=fontsizes)
ax.set_title(title, fontsize= int(np.floor(1.2*fontsizes)))
ax.set_title(title, fontsize= int(np.floor(1.2*fontsizes)), pad=15)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pad causes an AttributeError: Unkown property pad for me when running random_operators.ipynb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably a matplotlib version problem. Perhaps we should upgrade the requirements.

@joshcombes joshcombes merged commit a374475 into master Jun 14, 2019
@joshcombes joshcombes deleted the operator_tools branch June 14, 2019 21:10
@joshcombes joshcombes mentioned this pull request Jun 14, 2019
@joshcombes
Copy link
Contributor Author

partial close of #98

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