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

bumps tensorflow version to v2.14 #281

Merged
merged 9 commits into from Oct 13, 2023
Merged

bumps tensorflow version to v2.14 #281

merged 9 commits into from Oct 13, 2023

Conversation

zeyueN
Copy link
Collaborator

@zeyueN zeyueN commented Oct 6, 2023

Context:

This PR manages to

  • bump tensorflow to its latest version v2.14, on all platforms (no longer v2.12 as the branch name is suggesting)
  • add native M1 Mac support! (outside of devcontainers)
  • improve poetry installation without the need to reinstall tensorflow with pip

Description of the Change:

  • pyproject.toml updated with better TF dependency handling (documented in comments)
  • updated lock file
  • TF API change: Adam -> legacy.Adam
  • TF API change: concat of scalars uses stack now

Benefits:
NATIVE, MAC, SUPPORT

Possible Drawbacks:
pyproject.toml got more complex?

Related GitHub Issues:

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #281 (5152498) into develop (a4fbee5) will decrease coverage by 0.15%.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #281      +/-   ##
===========================================
- Coverage    78.90%   78.75%   -0.15%     
===========================================
  Files           54       54              
  Lines         4512     4514       +2     
===========================================
- Hits          3560     3555       -5     
- Misses         952      959       +7     
Files Coverage Δ
mrmustard/math/tensorflow.py 87.74% <100.00%> (+0.08%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4fbee5...5152498. Read the comment docs.

@zeyueN zeyueN changed the title bumps tensorflow version to v2.12 for amd64 arch bumps tensorflow version to v2.14 Oct 13, 2023
@zeyueN
Copy link
Collaborator Author

zeyueN commented Oct 13, 2023

I think this is ready for review. We got a lot further than expected.

The tests all passed on our M1 Mac mini natively with poetry installation in pyenv 🥲
And it's actually very fast, with all tests done in 2:30...

image

@zeyueN zeyueN marked this pull request as ready for review October 13, 2023 02:29
Copy link
Contributor

@ggulli ggulli left a comment

Choose a reason for hiding this comment

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

Great work solving those Tensorflow dependencies! 🚀

@heltluke heltluke merged commit 95752f3 into develop Oct 13, 2023
5 of 6 checks passed
@heltluke heltluke deleted the bump-tf-v2.12-amd64 branch October 13, 2023 15:22
Copy link
Collaborator

@ziofil ziofil left a comment

Choose a reason for hiding this comment

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

outstanding 💯

@ziofil ziofil mentioned this pull request Oct 14, 2023
ziofil added a commit that referenced this pull request Oct 14, 2023
# Release 0.6.0 (current release)

### New features

* Added a new method to discretize Wigner functions that revolves
Clenshaw summations. This method is expected to be fast and
reliable for systems with high number of excitations, for which the
pre-existing iterative method is known to be unstable. Users
can select their preferred methods by setting the value of
`Settings.DISCRETIZATION_METHOD` to either `interactive` (default) or
`clenshaw`.

* Added the `PhaseNoise(phase_stdev)` gate (non-Gaussian). Output is a
mixed state in Fock representation.
It is not based on a choi operator, but on a nonlinear transformation of
the density matrix.
  [(#275)](#275)

### Breaking changes

* The value of `hbar` can no longer be specified outside of `Settings`.
All the classes and
methods that allowed specifying its value as an input now retrieve it
directly from `Settings`.

* Certain attributes of `Settings` can no longer be changed after their
value is queried for the
  first time.

### Improvements

* Tensorflow bumped to v2.14 with poetry installation working out of the
box on Linux and Mac.
  [(#281)](#281)

### Bug fixes

* Fixed a bug about the variable names in functions (apply_kraus_to_ket,
apply_kraus_to_dm, apply_choi_to_ket, apply_choi_to_dm).
[(#271)](#271)

* Fixed a bug that was leading to an error when computing the Choi
representation of a unitary transformation.

### Documentation

### Contributors
[Filippo Miatto](https://github.com/ziofil), [Samuele
Ferracin](https://github.com/SamFerracin), [Yuan
Yao](https://github.com/sylviemonet), [Zeyue
Niu](https://github.com/zeyueN)

---------

Co-authored-by: Sebastián Duque Mesa <675763+sduquemesa@users.noreply.github.com>
Co-authored-by: JacobHast <jacobhastrup@gmail.com>
Co-authored-by: elib20 <53090166+elib20@users.noreply.github.com>
Co-authored-by: Luke Helt <31250931+heltluke@users.noreply.github.com>
Co-authored-by: zeyueN <48225584+zeyueN@users.noreply.github.com>
Co-authored-by: Robbe De Prins <52749580+rdprins@users.noreply.github.com>
Co-authored-by: Robbe De Prins (UGent-imec) <Robbe.DePrins@UGent.be>
Co-authored-by: Yuan <16817699+sylviemonet@users.noreply.github.com>
Co-authored-by: Ryk <47638463+ryk-wolf@users.noreply.github.com>
Co-authored-by: Gabriele Gullì <120967042+ggulli@users.noreply.github.com>
Co-authored-by: Yuan Yao <yuan.yao@xanadu-Yuan-YAO.local>
Co-authored-by: SamFerracin <samuele.ferracin@xanadu.ai>
Co-authored-by: Yuan Yao <yuan.yao@xanadu-infras-MacBook-Air.local>
Co-authored-by: heltluke <luke.helt@gmail.com>
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.

None yet

4 participants