Skip to content

Conversation

@albertomercurio
Copy link
Owner

Description

This PR fixes a JET static analysis warning in the liouvillian function by adding a type annotation to the Id_cache parameter.

Changes

  • Added ::Diagonal type annotation to Id_cache parameter in liouvillian function in src/qobj/superoperators.jl

Problem

JET was detecting a type instability issue where the Id_cache parameter had no type annotation, causing it to report:

no matching method found `_sum_lindblad_dissipators(::Tuple, ::Nothing)`, 
`_sum_lindblad_dissipators(::AbstractVector, ::Nothing)`, etc.

Solution

By adding the ::Diagonal type annotation, Julia can now properly infer that Id_cache will always be of type Diagonal, which matches what the _sum_lindblad_dissipators function expects.

Testing

All code quality tests now pass:

  • ✅ Aqua.jl: 9/9 tests passed
  • ✅ JET.jl: 1/1 test passed

albertomercurio and others added 30 commits November 10, 2024 03:32
…anges (qutip#293)

* add Makefile command for starting Vitepress locally

* minor changes
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.27.0 to 1.27.3.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](crate-ci/typos@v1.27.0...v1.27.3)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
* fix repo link

* modify qutip hyper-link

* update bib

* update footer and fix toc

* fix latex `eqref`
* Fix documentation

* fix typo
* fix bad link for API button in home page

* fix spelling typo
* add CHANGELOG.md

* fix typos

* remove subsubsections in `CHANGELOG.md`

* update PR template

* rename `change_log` as `changelog`

* fix typo

* fix typo

* minor changes
* add allocations tests and clean time evolution tests

* Format Document

* Remove global tlist

* Fix format
* bump version to `v0.21.5`

* bump version to `v0.21.5`
* try to fix several missing favicons in doc

* fix indent
…qutip#311)

* Working sesolve

* add `inplace` keywork argument

* add SciMLStructures and relax params type

* Working mcsolve (no type-stability)

* Fix type-instabilities for mcsolve

* Add SciMLStructures.jl methods

* Add callbacks helpers

* Fix dsf_mcsolve

* Remove ProgressBar from ODE parameters

* Fix abstol and reltol extraction

* Use Base allequal function

* Remove expvals from TimeEvolutionParameters

* Make NullParameters as default for params

* Remove custom PresetTimeCallback

* Update description of `inplace` argument

* Working mesolve

* Fix dfd_mesolve and dsf_mesolve

* Remove TimeEvolutionParameters (type-unstable)

* Fix type instabilities

* Fix type instabilities on Julia v1.10

* Format document
ytdHuang and others added 30 commits July 27, 2025 13:19
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yi-Te Huang <[email protected]>
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.

5 participants