Release notes
v1.3.0 (2023-09-19)
This is a minor release with some bug fixes in LaTeX output, added unit tests for many functions, and some new features and deprecations:
- The functions that generate operators now can be conjugated directly, e.g.,
a'()
is equivalent toadag()
(and toa()'
, which was already the case beforehand). The old_dag
functions for bosons and fermions are deprecated and will be removed in a future version. - Preferences.jl is now used to set and store preferences. The following preferences are available:
"define_default_ops"
: if this is set tofalse
(default istrue
), the "default" operatorsa, adag, f, fdag, σx, σy, σz, σp, σm
are not defined upon import. Note that changing this value requires restarting the Julia session to take effect. The setting can be changed withQuantumAlgebra.set_define_default_ops(true/false)
(which will inform you whether a restart is required) or withPreferences.set_preferences!(QuantumAlgebra,"define_default_ops"=>true/false).
"auto_normal_form"
: Choose whether all expressions are automatically converted to normal form upon creation. The default isfalse
. It can be changed for a single session withQuantumAlgebra.auto_normal_form(true/false)
, and can be made permanent withQuantumAlgebra.auto_normal_form(true/false; set_preference=true)
or withPreferences.set_preferences!(QuantumAlgebra,"auto_normal_form"=>true/false)
. Note that this could previously be set by defining an environment variable"QUANTUMALGEBRA_AUTO_NORMAL_FORM"
, but this usage has been deprecated and will be removed in a future version."use_σpm"
: Choose whether for two-level systems, the "basic" operators are excitation/deexcitation operators $σ^{±}$ or the Pauli matrices $σ^{xyz}$. This can be changed in a single session by callingQuantumAlgebra.use_σpm(true/false)
, and can be made permanent withQuantumAlgebra.use_σpm(true/false; set_preference=true)
or withPreferences.set_preferences!(QuantumAlgebra,"use_σpm"=>true/false)
.
- Use PrecompileTools.jl instead of SnoopPrecompile.jl for precompilation.
v1.2.0 (2023-04-22)
This is a minor revision with some bug fixes, and some new features:
- Add the
heisenberg_eom
function to calculate the Heisenberg equations of motions of operators. - Switch the LaTeX output to use Latexify.jl, which also enables support for display of vectors, tuples, etc of
QuExpr
. - Require at least Julia v1.6.
v1.1.0 (2021-09-02)
This is a minor revision with some and bug fixes, and one new feature: It is now possible to use @anticommuting_fermion_group
to define several fermionic operators that mutually anticommute, allowing to refer to different kinds of states for the same "species" (e.g., localized and itinerant electrons):
julia> @anticommuting_fermion_group c d
julia> normal_form(c()*d() + d()*c())
0
v1.0.0 (2021-07-23)
This is a major revision with some breaking changes. The backend has been almost completely rewritten to make the code more efficient when dealing with large expressions, and the interface has been cleaned up in several places.
Important changes:
- Canonical normal form is not automatically enforced by default. In order to transform expressions to normal form, use
normal_form(x)
. Since automatic conversion to normal form can be convenient for interactive work, it can be enabled withQuantumAlgebra.auto_normal_form(true)
, or alternatively by setting the environment variableQUANTUMALGEBRA_AUTO_NORMAL_FORM
to"true"
(or any value thatparse(Bool,value)
parses astrue
) beforeusing QuantumAlgebra
. - The function to obtain expectation values is now
expval(A)
(instead ofExpVal
), andexpval_as_corrs(A)
to express an expectation value through a correlator / cumulant expansion, e.g., $⟨AB⟩ = ⟨AB⟩_{c}$ - $⟨A⟩_{c} ⟨B⟩_{c}$, with corresponding extensions for products of more operators. Note that for a single operator, $⟨A⟩_{c} = ⟨A⟩$, but we distinguish the two formally for clarity. - There is a new function
julia_expression(A)
that converts a QuantumAlgebra object to a julia expression, which helps in using QuantumAlgebra to programatically derive codes for numerical implementation. The objectA
cannot contain any "bare" operators, but only expectation values or correlators. See the documentation for more details. - QuantumAlgebra expressions are now printed in pretty format in the terminal etc.