XanaduAI / strawberryfields

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
https://strawberryfields.ai
Apache License 2.0
754 stars 191 forks source link

Rearrange qchem utility functions #487

Closed soranjh closed 3 years ago

soranjh commented 3 years ago

This PR moves the prob and marginals functions from apps.qchem.dynamics to apps.qchem.utils. These functions were initially created as utility functions for simulating vibrational dynamics of molecules. However, they can also be used in other applications such as simulating vibrational excitations and therefore should be moved to the utils module which is created for hosting general-purpose utility functions. The arrangement of the qchem functions in this PR is shown in the image below.

qchem

josh146 commented 3 years ago

@soranjh does this require any changes to existing SF demos?

soranjh commented 3 years ago

@soranjh does this require any changes to existing SF demos?

Hi @josh146. No, the change does not affect any demos.

codecov[bot] commented 3 years ago

Codecov Report

Merging #487 (e04986c) into master (3f63d51) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #487   +/-   ##
=======================================
  Coverage   96.86%   96.86%           
=======================================
  Files          70       70           
  Lines        7154     7154           
=======================================
  Hits         6930     6930           
  Misses        224      224           
Impacted Files Coverage Δ
strawberryfields/apps/qchem/dynamics.py 100.00% <ø> (ø)
strawberryfields/apps/qchem/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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