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

Change symbols in phased_iswap_test #2672

Merged
merged 2 commits into from
Jan 8, 2020

Conversation

dstrain115
Copy link
Collaborator

  • In sympy 1.2, print(1 - sympy.Symbol('t')) outputs "-t + 1"
  • While the requirements do require sympy 1.4, the actual symbols used
    in this test are not important to the testing of phased iswap, and this
    change will simplify people who are forced to use older versions of
    sympy (i.e. me).

- In sympy 1.2, print(1 - sympy.Symbol('t')) outputs "-t + 1"
- While the requirements do require sympy 1.4, the actual symbols used
in this test are not important to the testing of phased iswap, and this
change will simplify people who are forced to use older versions of
sympy (i.e. me).
@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Jan 7, 2020
Copy link
Collaborator

@vtomole vtomole left a comment

Choose a reason for hiding this comment

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

Nit: Change sympy.Symbol('t') + 1) to 1 + sympy.Symbol('t'))? The second change is more "minor"

@dstrain115
Copy link
Collaborator Author

Change sympy.Symbol('t') + 1) to 1 + sympy.Symbol('t'))? The second change is more "minor"

I'd have to go back and check, but I don't think that has a consistent printing in sympy either. I think that sympy 1.2 prints it as "1+t" but sympy 1.4 prints it as "t+1"

@vtomole
Copy link
Collaborator

vtomole commented Jan 8, 2020

# 1.2
>>> print(1 + sympy.Symbol('t'))
t + 1
>>> print(sympy.Symbol('t') + 1)
t + 1
# 1 .4
>>> import sympy
>>> print(1 + sympy.Symbol('t'))
t + 1
>>> print(sympy.Symbol('t') + 1)
t + 1

@dstrain115 dstrain115 merged commit 3469e5c into quantumlib:master Jan 8, 2020
olliahonen pushed a commit to iqm-finland/Cirq that referenced this pull request Jan 10, 2020
* Change symbols in phased_iswap_test

- In sympy 1.2, print(1 - sympy.Symbol('t')) outputs "-t + 1"
- While the requirements do require sympy 1.4, the actual symbols used
in this test are not important to the testing of phased iswap, and this
change will simplify people who are forced to use older versions of
sympy (i.e. me).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants