Releases: qutip/qutip
Releases · qutip/qutip
QuTiP 5.3.0
Features
Solvers improvements
- Introduces a matrix-form solver that leverages matrix-matrix products for better memory efficiency. It can be used by passing
options={"matrix_form": True}tomesolveorMESolver. (#2811, by Ashley Milsted) - Allow the matrix-form
mesolve(options={"matrix_form": True}) to evolve non-Hermitian initial states such as transition matrices|i><j|. (#2898, by Ashley Milsted) - Enables Krylov subspace method for density matrices in closed and open (Lindblad-like) systems. Adds Arnoldi and fully-reorthogonalized Lanczos to algorithms for Krylov basis construction. (#2725, by Maximilian MM)
- Uses the
mean_abs_nonzerofunction from qutip/core/data/mean.pyx module in the direct method of the steady state solver. The function is overloaded for different data layer types (Dense, CSR, and Dia) and hence enables replacing if-else conditional with one function call. (#2824, Veronika Kurth) - Adds
plot_expect()toResultandMultiTrajResult, andplot_photocurrent()toMcResult, for visualising solver output directly from result objects. (#2837, by Chinmay-Tangal)
Matrix operations
- Adds
local_matmul: applying a smaller operator on a state on an extended Hilbert space. (#2743) - Support for direct sums: create direct sum objects using
qt.direct_sum, extract blocks withqt.direct_component, and overwrite blocks withqt.set_direct_component. Added newqt.dimensions.SumSpaceto describe dimensions of direct sum objects. (#2785) - Adds operator overloading for functions
mean_nonzeroandmean_abs_nonzero(mean of absolute values) for complex matrices (qutip.data.Dia, qutip.data.CSR, qutip.data.Dense). (#2817, by Veronika Kurth)
Superoperators improvements
- Adds the commutator and anticommutator for superoperators. (#2861, by Mudit Maheshwari)
- Adds support for constructing superoperators to/from Pauli using to_superpauli() and from_superpauli() (#2835, by Mudit Maheshwari)
Other improvements
- Adds
propagator_piecewisefunction andpiecewise_tparameter topropagatorfor efficient computation of propagators for piecewise constant Hamiltonians and Liouvillians. This optimization uses direct matrix exponentiation on each constant interval instead of numerical ODE integration, providing significant speedup for systems with discontinuous time-dependence. (#2774, by Rafael Haenel) - Adds adjoint (dag) in-place matmul for QobjEvo and optimize matmul ops on Apple Silicon. (#2802, Ashley Milsted)
- Adds
max_t_plus_tauand map parameters tocorrelation_3op,correlation_3op_2t, andcorrelation_2op_2tfor improved performance. Solves #2315 (#2831, by Chinmay-Tangal). - Adds the offset parameter to the wigner function and other visualization functions. (#2839, by Mudit Maheshwari)
- Adds
Qobj.full_tensor()to return a dense ndarray reshaped according to the quantum object's tensor dimensions. (#2841, by K Soveet Kumar Prusty) - Adds
**kwargsto arguments of:add_state,add_vector,add_pointsto pass to underlying matplotlib function (#2847, by Mudit Maheshwari) - Adds ubuntu-24-arm64, windows-11-arm64 to wheels build target (#2855, by Mayank Goel)
Bug Fixes
- Fixes color ordering for single points in Bloch sphere. Previously, when plotting a single point on a Bloch sphere via
Bloch.add_points(colors=...)or by modifyingBloch.point_color, the color list could become mismatched with the point order after internal sorting. This fix ensures colors are reordered correctly, eliminating miscoloring. Fixes #2681 (#2754, by QiLin Xue) - Fixes missing binding of docstrings of
tensor_swapandexpand_operatorinto APIdoc (#2775, by Clemens Possel) - Enables performing computations on sparse matrices of high dimensionalities in the "direct" method of the steady-state solver without running into out-of-memory allocation problems. Fixes issue #2747. (#2803, by Veronika Kurth)
- Fixes scipy.linalg.LinAlgWarning: Matrix is singular when calculating the fidelity of pure state denisty matrix. (#2822, by Tim Liao)
- Fixes UnboundLocalError in
plot_spin_distributionand improved function by changing cmap implementation and adding kwargs. (#2834, by Mudit Maheshwarih) - Fixes bug in
Propagatorused for negative times. (#2858) - Fixes overflow error occuring in krylovsolve when calculating large krylov dimensions (#2885, by Maximilian MM)
Documentation
- Clarifies the x and y axis order for the arrays returned by the phase-space functions wigner,
spin_wigner,qfuncandspin_q_function. Fixes #1532. (#2830, by harsshg31085) - Adds user-guide documentation for solver progress bar options, including available values and
progress_kwargsusage. (#2846, by DeconBear) - Adds the sphinx-copybutton extension. This shows a copy button towards the right corner for codeblocks in the documentation. (#2851, by Mayank Goel)
- Aligns the Read the Docs build with the shared pip-based documentation requirements and remove the stale RTD-specific environment file. (#2866, by Asish Kumar)
- Migrates Jake Lishman development documentation (#2867)
Deprecations
- Removes support for Python 3.10 (#2875)
- Updates
Qobj.__matmul__to throw deprecation warning for Qobj @ numpy.array operation (#2829, by Mudit Maheshwari) - Renames
steadystate_floquettosteadystate_fourier. The old name is deprecated and will be removed in a future release. (#2823, by Chinmay-Tangal) - Removes support for position entry of options, e_ops and args. (#2870)
- Removes passing solver options as kwargs instead of in options dict. (#2870)
- Removes deprecated Environment approximation methods. (#2870)
- Adds deprecation warning for dict coefficient format. (#2889)
Miscellaneous
- Adds type annotations to
core.qobj._require_equal_typeto ensure proper typing forQobj.__add__andQobj.__sub__. (#2848, by JacobHast) - Adds fallback for missing mpmath module for OhmicEnvironment (#2859)
- Adds GitHub Sponsors button. (#2869)
- Updates manylinux-x86_64-image from manylinux2014 to manylinux_2_28. Update build-frontend to build from pip. This allows to use custom build frontends like uv in the future. Update wheel number from 20 to 24 while deploying. (#2883, by Mayank Goel)
- Adds AI Tool Usage Policy (#2891, by Mayank Goel)
- Remove outdated code (#2899, by Mayank Goel)
QuTiP 5.2.3.post1
No code change.
The github tag v5.2.3 is pointing to the wrong branch.
QuTiP 5.2.3
Add support to scipy 1.17.
Bug Fixes
- Enables discovery of declaration files (.pxd) by Cython's compiler during the runtime compilation in qutip/core/coefficient.py under editable installs. Fixes issue #2770. (#2796, by Veronika Kurth)
Documentation
- Updated verification command in Quick Start guide to support standard installs. (#2793, by Omkar Sarkar)
Miscellaneous
- Add support for scipy 1.17 (#2800)
QuTiP 5.2.2
Add wheels for python 3.14.
Bug Fixes
- Add sanity check to CSR initialization. (#2748, reported by Pieter Eendebak)
- Fix color ordering for single points in Bloch sphere. Previously, when plotting a single point on a Bloch sphere via
Bloch.add_points(colors=...)or by modifyingBloch.point_color, the color list could become mismatched with the point order after internal sorting. This fix ensures colors are reordered correctly, eliminating miscoloring. (Fixes #2681) (#2754, by QiLin Xue) - The test test_fixed_prony_fit[True-UD Example] failed when using netlib's blas (#2759, by Gerardo Jose Suarez)
- Change measure functions to handle not only list[Qobj] but any iterable[Qobj] for POVM measurement (#2766, by Clemens Possel)
- Fix bug with repeated
conjofQobjEvo(#2767)
Documentation
- Fix typo in Qobj.overlap. (#2757, by Kemal Bidzhiev)
- Add "tlist5" ODE method to documentation. (#2739)
Miscellaneous
- Make handling of dimensions more consistent, make ENR spaces usable with more modules, add tests, bugfixes (#2751)
- Improve code to find MKL libraries (#2742)
- Improve test stability. (#2773, #2769, #2763, #2753)
- Remove fast-path for solver first state in result (#2760)
- Ensure expect work with the settings
auto_real_casting=False. (#2752) - Remove intermediate step when creating a
fock_dm. (#2772)
QuTiP 5.2.1
Features
- Add tsit5 integration method (#2720)
- Provided functionality to output Qobj eigenstates as a list of kets or an operator. (#2731, by Hrishikesh Belagali)
Bug Fixes
- ENR dimension bugfix for when QobjEvo is multiplied by Coefficient (#2713, by ottosalmenkivi)
- Use the common error definition in the homemade ODE solvers. (#2726)
It used to computertolon the vector norm, now it's computed per element. - Fix a bug with histogram animation showing only one bar. (#2682, by Sneha Uppula)
Miscellaneous
QuTiP 5.2.0
Features
Improvements to Environment
- Two 'DrudeLorentzPadeBath' can be added with complex conjugate 'gammas' to create a Shifted-DrudeLorentzPadeBath. (#2574, by Akhil Bhartiya)
- Adds extra fitting methods (power spectrum, prony, esprit, aaa, espira-I, espira-II) for bosonic environments (#2594, by Gerardo Jose Suarez)
- Add support for
FermionicEnvironmentin Bloch Redfield tensor and solver. (#2628)
New experimental solver
- Add a first version of Dysolve solver as
dysolve_propagator.
A perturbation solver for Schrödinger equation optimized for driven systems.
(#2648, #2679, by Mathis)
Better matrix format control
- Add "default_dtype_scope" option.
AdddtypetoQobjinitialization method.
Give more control on matrix format used by operations. (#2519) - Creating operator from dense ket.proj return CSR when appropriate (#2700)
|ket> @ <bra|create sparse matrix per default. (#2611)- Tensor product of sparse and dense matrices return sparse matrix per default. (#2391)
Other improvements
- Add the calculation of the third cumulant to the functions of countstat.py.
I use a result of "Electrons in nanostructures" C. Flindt, PhD Thesis (#2435, by Daniel Moreno Galán) - Support pretty-printing of basis expansion for states (e.g.
(0.5+0j) |0010> + ...). (#2620, by Sola85) - Added QuTiP family package information to qutip.about().
The information is provided by a new QuTiP family package entry point. (#2604) - Speed up ptrace for kets (by several orders of magnitude for large states). (#2657, by Sola85)
- Implement partial trace and tensor product for states in excitation-number restricted space. (#2696, magzpavz)
Bug Fixes
- Fix arc behind hidden behind the wireframe. (#2467, by PositroniumJS)
- Update mkl finding to support the 'emscripten' sys.platform. (#2606)
- Make sure that dims of rand_ket output are set correctly. (#2613, reported by Mário Filho)
- Allow np.int as targets in expand_operator (#2634, by Sola85)
- Fix coefficient
argsnot being properly updated
when initiated from another coefficient. (#2646, reported by Kyle Wamer) - Fix equality operators for diagonal format Qobj. (#2669, reported by Richard Dong)
- Enable again to plot a state as a point on the Bloch sphere with a RGBA tuple.
Enable to do the same as a vector. (#2678, by PositroniumJS) - Added missing abs when checking hermiticity (#2680, by Tanuj Rai, reported by tuureorell)
- Fix types and exceptions (#2701, Emmanuel Ferdman)
Documentation
- Docstrings, typing, guide page for distributions. (#2599, by Mathis)
- Guide for qutip.distributions (#2600, by Mathis)
- Removes the Quantum Optimal Control page in the Users Guide and adds Family guide page in Users guide. (#2616, by Kavya Rambhia)
- Fix small typo in docstring for
sesolve. (#2677, by Sarang Joshi)
Miscellaneous
- Removed WignerDistribution, QDistribution from distributions with their tests.
Added plot_qfunc to plot Husimi-Q function with tests and animation. (#2607, by Mathis) - Specialized A @ B.dag() operation. (#2610)
- Set auto_tidyup_dims default to True (#2623)
- Change default ode method for mcsolve (#2643)
- Fix parameter name inconsistency in qsave (#2688, by Andrey Rakhubovsky)
- Add tests for qdiags and phasegate Hermitian fix (#2698, by Tanuj Rai)
- Changed type hints in function visualize in distributions.py (tests failed if mpl not installed). (#2607, by Mathis)
QuTiP 5.1.1
QuTiP 5.1.1
Patch to add support for scipy 1.15.
Features
- qutip.cite() now cites the QuTiP 5 paper, https://arxiv.org/abs/2412.04705 (#2592).
- Added QuTiP family package information to qutip.about(). (#2604)
Bug Fixes
QuTiP 5.1.0
QuTiP 5.1.0
Features
- It adds odd parity support to HEOM's fermionic solver (#2261, by Gerardo Jose Suarez)
- Create
SMESolver.run_from_experiment, which allows to run stochastic evolution from know noise or measurements. (#2318) - Add types hints. (#2327, #2473)
- Weighted trajectories in trajectory solvers (enables improved sampling for nm_mcsolve) (#2369, by Paul Menczel)
- Updated
qutip.core.metrics.dnormto have an efficient speedup when finding the difference of two unitaries. We use a result on page 18 of
D. Aharonov, A. Kitaev, and N. Nisan, (1998). (#2416, by owenagnel) - Allow mixed initial conditions for mcsolve and nm_mcsolve. (#2437, by Paul Menczel)
- Add support for
jitandgradin qutip.core.metrics (#2461, by Rochisha Agarwal) - Allow merging results from stochastic solvers. (#2474)
- Support measurement statistics for
jaxandjaxdiadtypes (#2493, by Rochisha Agarwal) - Enable mcsolve with jax.grad using numpy_backend (#2499, by Rochisha Agarwal)
- Add propagator method to steadystate (#2508)
- Introduces the qutip.core.environment module, which contains classes that characterize bosonic and fermionic thermal environments. (#2534, by Gerardo Jose Suarez)
- Implements a
einsumfunction for Qobj dimensions (Evaluates the Einstein summation convention on the operands.) (#2545, by Franco Mayo) - Wave function calculations have been sped up with a Cython implementation.
It optimizes the update method of the HarmonicOscillatorWaveFunction class in distribution.py. (#2553, by Matheus Gomes Cordeiro) - Speed up
kraus_to_superby adding asparseoption. (#2569, by Sola85)
Bug Fixes
- Fix a dimension problem for the argument color of Bloch.add_states
Clean-up of the code in Bloch.add_state
Add Bloch.add_arc and Bloch.add_line in the guide on Bloch class (#2445, by PositroniumJS) - Fix HTMLProgressBar display (#2475)
- Make expm, cosm, sinm work with jax. (#2484, by Rochisha Agarwal)
- Fix stochastic solver step method (#2491)
clipgives deprecation warning, that might be a problem in the future. Hence switch towhere(#2507, by Rochisha Agarwal)- Fix brmesolve detection of contant vs time-dependent system. (#2530)
propagatornow accepts list formatc_opslikemesolvedoes. (#2532)- Fix compatibility issue with matplotlib>=3.9 in matrix_histogram (#2544, by Andreas Maeder)
- Resolve incompatibility of TwoModeQuadratureCorrelation class (#2548, by quantum-menace)
- Fix sparse eigen solver issue with many degenerate eigen values. (#2586)
- Fix getting tensor permutation for uneven super operators. (#2561)
Documentation
- Improve guide-settings page. (#2403)
- Tidy up formatting of type aliases in the api documentation (#2436, by Paul Menczel)
- Update documentation
- Update contributors
- Improve apidoc readability (#2523)
- Fix error in simdiag docstring (#2585, by Sola85)
Miscellaneous
- Add auto_real_casting options. (#2329)
- Add dispatcher for sqrtm (#2453, by Rochisha Agarwal)
- Make
e_ops,argsandoptionskeyword only.
Solver were inconsistent withe_opsusually followingc_opsbut sometime
preceding it. Setting it as keyword only remove the need to memorize the
signature of each solver. (#2489) - Introduces a new
NumpyBackendclass that enables dynamic selection of the numpy_backend used inqutip.
The class facilitates switching between different numpy implementations (numpyandjax.numpymainly ) based on the configuration specified insettings.core. (#2490, by Rochisha Agarwal) - Improve mkl lookup function. (#2497)
- Deterministic trajectories are not counted in
ntraj. (#2502) - Allow tests to be executed multiple times in one Python session (#2538, by Zhang Maiyun)
- Improve performance of qutip.Qobj by using static numpy version check (#2557, by Pieter Eendebak)
- Fix towncrier check (#2542)
QuTiP 5.0.4
Micro release to add support for numpy 2.1
Bug Fixes
- Fixed rounding error in dicke_trace_function that resulted in negative eigenvalues. (#2466, by Andrey Nikitin)
QuTiP 5.0.3
Micro release to add support for numpy 2.
Bug Fixes
- Bug Fix in Process Matrix Rendering. (#2400, by Anush Venkatakrishnan)
- Fix steadystate permutation being reversed. (#2443)
- Add parallelizing support for
vernNmethods withmcsolve. (#2454 by Utkarsh)
Documentation
- Added
qutip.core.gatesto apidoc/functions.rst and a Gates section to guide-states.rst. (#2441, by alan-nala)