Skip to content

QuTiP 4.6.3

Compare
Choose a tag to compare
@hodgestar hodgestar released this 08 Feb 23:01
5a6ada2

This minor release adds support for numpy 1.22 and Python 3.10 and removes some blockers for running QuTiP on the Apple M1.

The performance of the enr_destroy, state_number_enumerate and hadamard_transform functions was drastically improved (up to 70x or 200x faster in some common cases), and support for the drift Hamiltonian was added to the qutip.qip Processor.

The qutip.hardware_info module was removed as part of adding support for the Apple M1. We hope the removal of this little-used module does not adversely affect many users -- it was largely unrelated to QuTiP's core functionality and its presence was a continual source of blockers to importing qutip on new or changed platforms.

A new check on the dimensions of Qobj's were added to prevent segmentation faults when invalid shape and dimension combinations were passed to Cython code.

In addition, there were many small bugfixes, documentation improvements, and improvements to our building and testing processes.

Improvements

  • The enr_destroy function was made ~200x faster in many simple cases. (#1593 by Johannes Feist)
  • The state_number_enumerate function was made significantly faster. (#1594 by Johannes Feist)
  • Added the missing drift Hamiltonian to the method run_analytically of Processor. (#1603 Boxi Li)
  • The hadamard_transform was made much faster, e.g., ~70x faster for N=10. (#1688 by Asier Galicia)
  • Added support for computing the power of a scalar-like Qobj. (#1692 by Asier Galicia)
  • Removed the hardware_info module. This module wasn't used inside QuTiP and regularly broke when new operating systems were released, and in particular prevented importing QuTiP on the Apple M1. (#1754, #1758 by Eric Giguère)

Bug Fixes

  • Fixed support for calculating the propagator of a density matrix with collapse operators. QuTiP 4.6.2 introduced extra sanity checks on the dimensions of inputs to mesolve (Fix mesolve segfault with bad initial state #1459), but the propagator function's calls to mesolve violated these checks by supplying initial states with the dimensions incorrectly set. propagator now calls mesolve with the correct dimensions set on the initial state. (#1588 by Simon Cross)
  • Fixed support for calculating the propagator for a superoperator without collapse operators. This functionality was not tested by the test suite and appears to have broken sometime during 2019. Tests have now been added and the code breakages fixed. (#1588 by Simon Cross)
  • Fixed the ignoring of the random number seed passed to rand_dm in the case where pure was set to true. (#1600 by Pontus Wikståhl)
  • Fixed qutip.control.optimize_pulse support for sparse eigenvector decomposition with the Qobj oper_dtype (the Qobj oper_dtype is the default for large systems). (#1621 by Simon Cross)
  • Removed qutip.control.optimize_pulse support for scipy.sparse.csr_matrix and generic ndarray-like matrices. Support for these was non-functional. (#1621 by Simon Cross)
  • Fixed errors in the calculation of the Husimi spin_q_function and spin_wigner functions and added tests for them. (#1632 by Mark Johnson)
  • Fixed setting of OpenMP compilation flag on Linux. Previously when compiling the OpenMP functions were compiled without parallelization. (#1693 by Eric Giguère)
  • Fixed tracking the state of the Bloch sphere figure and axes to prevent exceptions during rendering. (#1619 by Simon Cross)
  • Fixed compatibility with numpy configuration in numpy's 1.22.0 release. (#1752 by Matthew Treinish)
  • Added dims checks for e_ops passed to solvers to prevent hanging the calling process when e_ops of the wrong dimensions were passed. (#1778 by Eric Giguère)
  • Added a check in Qobj constructor that the respective members of data.shape cannot be larger than what the corresponding dims could contain to prevent a segmentation fault caused by inconsistencies between dims and shapes. (#1783, #1785, #1784 by Lajos Palanki & Eric Giguère)

Documentation Improvements

  • Added docs for the num_cbits parameter of the QubitCircuit class. (#1652 by Jon Crall)
  • Fixed the parameters in the call to fsesolve in the Floquet guide. (#1675 by Simon Cross)
  • Fixed the description of random number usage in the Monte Carlo solver guide. (#1677 by Ian Thorvaldson)
  • Fixed the rendering of equation numbers in the documentation (they now appear on the right as expected, not above the equation). (#1678 by Simon Cross)
  • Updated the installation requirements in the documentation to match what is specified in setup.py. (#1715 by Asier Galicia)
  • Fixed a typo in the chi_to_choi documentation. Previously the documentation mixed up chi and choi. (#1731 by Pontus Wikståhl)
  • Improved the documentation for the stochastic equation solvers. Added links to notebooks with examples, API doumentation and external references. (#1743 by Leonardo Assis)
  • Fixed a typo in qutip.settings in the settings guide. (#1786 by Mahdi Aslani)
  • Made numerous small improvements to the text of the QuTiP basics guide. (#1768 by Anna Naden)
  • Made a small phrasing improvement to the README. (#1790 by Rita Abani)

Developer Changes

  • Improved test coverage of states and operators functions. (#1578 by Eric Giguère)
  • Fixed test_interpolate mcsolve use (#1645 by Eric Giguère)
  • Ensured figure plots are explicitly closed during tests so that the test suite passes when run headless under Xvfb. (#1648 by Simon Cross)
  • Bumped the version of pillow used to build documentation from 8.2.0 to 9.0.0. (#1654, #1760 by dependabot)
  • Bumped the version of babel used to build documentation from 2.9.0 to 2.9.1. (#1695 by dependabot)
  • Bumped the version of numpy used to build documentation from 1.19.5 to 1.21.0. (#1767 by dependabot)
  • Bumped the version of ipython used to build documentation from 7.22.0 to 7.31.1. (#1780 by dependabot)
  • Rename qutip.bib to CITATION.bib to enable GitHub's citation support. (#1662 by Ashish Panigrahi)
  • Added tests for simdiags. (#1681 by Eric Giguère)
  • Added support for specifying the numpy version in the CI test matrix. (#1696 by Simon Cross)
  • Fixed the skipping of the dnorm metric tests if cvxpy is not installed. Previously all metrics tests were skipped by accident. (#1704 by Florian Hopfmueller)
  • Added bug report, feature request and other options to the GitHub issue reporting template. (#1728 by Aryaman Kolhe)
  • Updated the build process to support building on Python 3.10 by removing the build requirement for numpy < 1.20 and replacing it with a requirement on oldest-supported-numpy. (#1747 by Simon Cross)
  • Updated the version of cibuildwheel used to build wheels to 2.3.0. (#1747, #1751 by Simon Cross)
  • Added project urls to linking to the source repository, issue tracker and documentation to setup.cfg. (#1779 by Simon Cross)
  • Added a numpy 1.22 and Python 3.10 build to the CI test matrix. (#1777 by Simon Cross)
  • Ignore deprecation warnings from SciPy 1.8.0 scipy.sparse.X imports in CI tests. (#1797 by Simon Cross)
  • Add building of wheels for Python 3.10 to the cibuildwheel job. (#1796 by Simon Cross)