diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a743899..c2e1d5acb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased](https://github.com/qutip/QuantumToolbox.jl/tree/main) +- Add `QuantumToolbox.cite()` for bibtex generator of `QuantumToolbox.jl`. ([#544]) +- Add `sortby` and `rev` keyword arguments to eigensolvers. ([#546]) + ## [v0.35.0] Release date: 2025-09-03 @@ -21,7 +24,6 @@ Release date: 2025-08-23 - Improve Bloch sphere rendering for animation. ([#520]) - Add support to `Enzyme.jl` for `sesolve` and `mesolve`. ([#531]) -- Add `sortby` and `rev` keyword arguments to eigensolvers. ([#546]) ## [v0.34.0] Release date: 2025-07-29 @@ -315,4 +317,5 @@ Release date: 2024-11-13 [#536]: https://github.com/qutip/QuantumToolbox.jl/issues/536 [#537]: https://github.com/qutip/QuantumToolbox.jl/issues/537 [#539]: https://github.com/qutip/QuantumToolbox.jl/issues/539 +[#544]: https://github.com/qutip/QuantumToolbox.jl/issues/544 [#546]: https://github.com/qutip/QuantumToolbox.jl/issues/546 diff --git a/CITATION.bib b/CITATION.bib index aea40ca26..265f6af66 100644 --- a/CITATION.bib +++ b/CITATION.bib @@ -1,11 +1,13 @@ -@article{QuantumToolbox-jl2025, - title={{QuantumToolbox.jl}: An efficient {Julia} framework for simulating open quantum systems}, - author={Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco}, - journal={arXiv preprint arXiv:2504.21440}, - year={2025}, - publisher = {arXiv}, - eprint={2504.21440}, - archivePrefix={arXiv}, - primaryClass={quant-ph}, - doi = {10.48550/arXiv.2504.21440} +@article{QuantumToolbox.jl2025, + title = {Quantum{T}oolbox.jl: {A}n efficient {J}ulia framework for simulating open quantum systems}, + author = {Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco}, + journal = {{Quantum}}, + issn = {2521-327X}, + publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}}, + volume = {9}, + pages = {1866}, + month = sep, + year = {2025}, + doi = {10.22331/q-2025-09-29-1866}, + url = {https://doi.org/10.22331/q-2025-09-29-1866} } \ No newline at end of file diff --git a/README.md b/README.md index 26dac7d65..c9935660a 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ and [Y.-T. Huang](https://github.com/ytdHuang). [license-img]: https://img.shields.io/badge/license-New%20BSD-blue.svg [license-url]: https://opensource.org/licenses/BSD-3-Clause -[cite-img]: https://img.shields.io/badge/cite-arXiv%3A2504.21440_(2025)-blue -[cite-url]: https://doi.org/10.48550/arXiv.2504.21440 +[cite-img]: https://img.shields.io/badge/cite-Quantum_9%2C_1866_(2025)-blue +[cite-url]: https://doi.org/10.22331/q-2025-09-29-1866 [download-img]: https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Ftotal_downloads%2FQuantumToolbox&query=total_requests&label=Downloads [download-url]: https://juliapkgstats.com/pkg/QuantumToolbox @@ -179,19 +179,21 @@ You are most welcome to contribute to `QuantumToolbox.jl` development by forking For more information about contribution, including technical advice, please see the [Contributing to Quantum Toolbox in Julia](https://qutip.org/QuantumToolbox.jl/stable/resources/contributing). ## Cite `QuantumToolbox.jl` -If you like `QuantumToolbox.jl`, we would appreciate it if you starred the repository in order to help us increase its visibility. Furthermore, if you find the framework useful in your research, we would be grateful if you could cite our arXiv preprint [ [arXiv:2504.21440 (2025)](https://doi.org/10.48550/arXiv.2504.21440) ] using the following bibtex entry: +If you like `QuantumToolbox.jl`, we would appreciate it if you starred the repository in order to help us increase its visibility. Furthermore, if you find the framework useful in your research, we would be grateful if you could cite our publication [ [Quantum 9, 1866 (2025)](https://doi.org/10.22331/q-2025-09-29-1866) ] using the following bibtex entry: ```bib -@article{QuantumToolbox-jl2025, - title={{QuantumToolbox.jl}: An efficient {Julia} framework for simulating open quantum systems}, - author={Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco}, - journal={arXiv preprint arXiv:2504.21440}, - year={2025}, - publisher = {arXiv}, - eprint={2504.21440}, - archivePrefix={arXiv}, - primaryClass={quant-ph}, - doi = {10.48550/arXiv.2504.21440} +@article{QuantumToolbox.jl2025, + title = {Quantum{T}oolbox.jl: {A}n efficient {J}ulia framework for simulating open quantum systems}, + author = {Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco}, + journal = {{Quantum}}, + issn = {2521-327X}, + publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}}, + volume = {9}, + pages = {1866}, + month = sep, + year = {2025}, + doi = {10.22331/q-2025-09-29-1866}, + url = {https://doi.org/10.22331/q-2025-09-29-1866} } ``` diff --git a/docs/src/getting_started/cite.md b/docs/src/getting_started/cite.md index a3a44e0ad..7212e5727 100644 --- a/docs/src/getting_started/cite.md +++ b/docs/src/getting_started/cite.md @@ -1,17 +1,19 @@ # [Cite QuantumToolbox.jl](@id doc:Cite) -If you like `QuantumToolbox.jl`, we would appreciate it if you could cite our arXiv preprint [ [arXiv:2504.21440 (2025)](https://doi.org/10.48550/arXiv.2504.21440) ] using the following bibtex entry: +If you like `QuantumToolbox.jl`, we would appreciate it if you could cite our publication [ [Quantum 9, 1866 (2025)](https://doi.org/10.22331/q-2025-09-29-1866) ] using the following bibtex entry: ```bib -@article{QuantumToolbox-jl2025, - title={{QuantumToolbox.jl}: An efficient {Julia} framework for simulating open quantum systems}, - author={Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco}, - journal={arXiv preprint arXiv:2504.21440}, - year={2025}, - publisher = {arXiv}, - eprint={2504.21440}, - archivePrefix={arXiv}, - primaryClass={quant-ph}, - doi = {10.48550/arXiv.2504.21440} +@article{QuantumToolbox.jl2025, + title = {Quantum{T}oolbox.jl: {A}n efficient {J}ulia framework for simulating open quantum systems}, + author = {Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco}, + journal = {{Quantum}}, + issn = {2521-327X}, + publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}}, + volume = {9}, + pages = {1866}, + month = sep, + year = {2025}, + doi = {10.22331/q-2025-09-29-1866}, + url = {https://doi.org/10.22331/q-2025-09-29-1866} } ``` diff --git a/docs/src/resources/api.md b/docs/src/resources/api.md index da800fc76..38b6bb226 100644 --- a/docs/src/resources/api.md +++ b/docs/src/resources/api.md @@ -314,6 +314,7 @@ AbstractLinearMap QuantumToolbox.settings QuantumToolbox.versioninfo QuantumToolbox.about +QuantumToolbox.cite gaussian n_thermal PhysicalConstants @@ -342,4 +343,4 @@ add_line! add_arc! add_states! clear! -``` \ No newline at end of file +``` diff --git a/src/versioninfo.jl b/src/versioninfo.jl index fe288536e..8f6c17cbd 100644 --- a/src/versioninfo.jl +++ b/src/versioninfo.jl @@ -2,7 +2,7 @@ Command line output of information on QuantumToolbox, dependencies, and system information =# -""" +@doc raw""" QuantumToolbox.versioninfo(io::IO=stdout) Command line output of information on QuantumToolbox, dependencies, and system information, same as [`QuantumToolbox.about`](@ref). @@ -36,20 +36,32 @@ function versioninfo(io::IO = stdout) ) # print System information - println(io, "System information:") - println(io, "====================================") - println(io, """OS : $(OS_name) ($(Sys.MACHINE))""") - println(io, """CPU : $(length(cpu)) × $(cpu[1].model)""") - println(io, """Memory : $(round(Sys.total_memory() / 2 ^ 30, digits=3)) GB""") - println(io, """WORD_SIZE: $(Sys.WORD_SIZE)""") - println(io, """LIBM : $(Base.libm_name)""") - println(io, """LLVM : libLLVM-$(Base.libllvm_version) ($(Sys.JIT), $(Sys.CPU_NAME))""") - println(io, """BLAS : $(basename(BLAS_info.libname)) ($(BLAS_info.interface))""") - println(io, """Threads : $(Threads.nthreads()) (on $(Sys.CPU_THREADS) virtual cores)""") - return print(io, "\n") + println( + io, + "System information:\n", + "====================================\n", + """OS : $(OS_name) ($(Sys.MACHINE))\n""", + """CPU : $(length(cpu)) × $(cpu[1].model)\n""", + """Memory : $(round(Sys.total_memory() / 2 ^ 30, digits=3)) GB\n""", + """WORD_SIZE: $(Sys.WORD_SIZE)\n""", + """LIBM : $(Base.libm_name)\n""", + """LLVM : libLLVM-$(Base.libllvm_version) ($(Sys.JIT), $(Sys.CPU_NAME))\n""", + """BLAS : $(basename(BLAS_info.libname)) ($(BLAS_info.interface))\n""", + """Threads : $(Threads.nthreads()) (on $(Sys.CPU_THREADS) virtual cores)\n""", + ) + + # print citation information + println( + io, + "+---------------------------------------------------+\n", + "| Please cite QuantumToolbox.jl in your publication |\n", + "+---------------------------------------------------+\n", + "For your convenience, a bibtex reference can be easily generated using `QuantumToolbox.cite()`.\n", + ) + return nothing end -""" +@doc raw""" QuantumToolbox.about(io::IO=stdout) Command line output of information on QuantumToolbox, dependencies, and system information, same as [`QuantumToolbox.versioninfo`](@ref). @@ -64,3 +76,27 @@ function _get_pkg_version(pkg_name::String) end end end + +@doc raw""" + QuantumToolbox.cite(io::IO = stdout) + +Command line output of citation information and bibtex generator for `QuantumToolbox.jl`. +""" +function cite(io::IO = stdout) + citation = raw""" + @article{QuantumToolbox.jl2025, + title = {Quantum{T}oolbox.jl: {A}n efficient {J}ulia framework for simulating open quantum systems}, + author = {Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco}, + journal = {{Quantum}}, + issn = {2521-327X}, + publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}}, + volume = {9}, + pages = {1866}, + month = sep, + year = {2025}, + doi = {10.22331/q-2025-09-29-1866}, + url = {https://doi.org/10.22331/q-2025-09-29-1866} +} + """ + return println(io, citation) +end diff --git a/test/core-test/utilities.jl b/test/core-test/utilities.jl index c14a023f4..acab3769a 100644 --- a/test/core-test/utilities.jl +++ b/test/core-test/utilities.jl @@ -1,4 +1,24 @@ @testitem "Utilities" begin + + # citation bibtex + io_buffer = IOBuffer() + QuantumToolbox.cite(io_buffer) + captured_output = String(take!(io_buffer)) + @test captured_output == + """@article{QuantumToolbox.jl2025,\n""" * + """ title = {Quantum{T}oolbox.jl: {A}n efficient {J}ulia framework for simulating open quantum systems},\n""" * + """ author = {Mercurio, Alberto and Huang, Yi-Te and Cai, Li-Xun and Chen, Yueh-Nan and Savona, Vincenzo and Nori, Franco},\n""" * + """ journal = {{Quantum}},\n""" * + """ issn = {2521-327X},\n""" * + """ publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}},\n""" * + """ volume = {9},\n""" * + """ pages = {1866},\n""" * + """ month = sep,\n""" * + """ year = {2025},\n""" * + """ doi = {10.22331/q-2025-09-29-1866},\n""" * + """ url = {https://doi.org/10.22331/q-2025-09-29-1866}\n""" * + """}\n\n""" + @testset "n_thermal" begin ω1 = rand(Float64) ω2 = rand(Float64)