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

Unwanted canonical form in tests #29

Closed
dsuess opened this issue Dec 15, 2016 · 1 comment
Closed

Unwanted canonical form in tests #29

dsuess opened this issue Dec 15, 2016 · 1 comment
Labels

Comments

@dsuess
Copy link
Owner

dsuess commented Dec 15, 2016

I just noticed that many tests still use s.th. like

mps = random_mpa(...)
mps /= mp.norm(mps)

This is a bad idea since the call to norm brings the mps into full left-canoncial form, which might be unintended. So the somewhat right call would be

mps /= mp.norm(mps.copy())

However, the correct thing to do is to use the normalized=True argument provided by most factory functions.

@dsuess dsuess added the bug label Dec 15, 2016
@dsuess
Copy link
Owner Author

dsuess commented Dec 19, 2016

Fixed in ade14b6.

@dsuess dsuess closed this as completed Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant