Aleph - 0.39.0
๐ Highlightsโ
- Polynomial and ChebyshevSeries bindings in Aleph now expose clearer typed names and richer editing APIs, including explicit real/complex variants and mutable coefficient/interval setters.
- Spin-half symbolic operators are now easier to inspect from Aleph. In addition to the existing dynamic
parameters()accessor, you can now ask for common payload kinds explicitly, which makes scripts clearer and gives documentation and LSP more useful return types. - Example:
var angles = RotEuler(0.1, 0.2, 0.3, 0).parameters(as_list)var dense = operator_dense(matrix([[0, 1], [1, 0]], as_real), [0]).parameters(as_matrix | as_real)var word = pauli_string("XYZ", [0, 2, 4]).parameters(as_string)
- Introduced quadratic operators which can be used to efficiently represent and manipulate quadratic fermionic Hamiltonians.
โจ New Featuresโ
-
operator_function's options now includemode, which can be set to0(default) or1for Hermitian operators.0is usually more efficient, because multi-threaded, but1is more robust. -
Added typed Aleph bindings for polynomial and ChebyshevSeries objects:
RealPolynomialandComplexPolynomialRealChebyshevSeriesandComplexChebyshevSeries
-
Added typed Aleph bindings for operator-valued polynomial and ChebyshevSeries constructions:
RealOperatorPolynomialandComplexOperatorPolynomialRealOperatorChebyshevSeriesandComplexOperatorChebyshevSeries
-
Polynomial and ChebyshevSeries bindings now expose setter-style editing APIs:
set_coefficients(...)for both polynomials and ChebyshevSeries objectsset_interval(...)for ChebyshevSeries objects
-
Polynomial bindings now expose scalar division and unary plus consistently in Aleph.
-
Added typed parameter inspection for symbolic spin-half operators in Aleph.
-
You can still use
parameters()for a generic dynamic result, but you can now request specific payload forms when you know what kind of operator you have:parameters(as_list)for parameter lists such as rotation angles or permutation dataparameters(as_matrix | as_real)andparameters(as_matrix | as_complex)for dense operator payloadsparameters(as_sparsematrix | as_real)andparameters(as_sparsematrix | as_complex)for sparse operator payloadsparameters(as_string)for Pauli strings
-
Quadratic operators
TransferSumrepresents the sum .PairingSumrepresents the sum .QuadraticSumrepresents the sum .- Quadratic operators implement
get_bdg_matrixandget_bdg_shiftto extract the Bogoliubov-De Gennes matrix and constant energy shift respectively. - Quadratic operators can be constructed directly from valid operator sums, avoiding the manual bookkeeping usually required to build the Bogoliubov-De Gennes matrix.
-
New fermionic operators
- The
CreateCreate(i,j)operator which represents the operator . - The
DestroyDestroy(i,j)operator which represents the operator .
- The
๐ Fixesโ
- Fixed Aleph formatter edge cases around numeric literals, complex-number suffixes and
ifheaders. - Fixed Aleph exception stack trace collection so exceptions thrown from Aleph code, including values passed through
throw(...), retain their source locations and stack frames. - Fixed
operator_functionwhich would throw when the right-hand-side vector was an eigenstate of the input operator.
โ๏ธ Internal / Technical Changesโ
- Unified the internal implementation of spin-half operator payload inspection so the same Aleph API works consistently across parameterized operators, dense and sparse matrix operators, and Pauli-string operators.
- Added native integrated test support to the Aleph language core, including
test,test_section, hooks, parameterizedcases,options, expectations, test discovery, and structured test results. This is the foundation for first-class Aleph testing; Workshop integration and full user documentation are still in progress.
โ ๏ธ Breaking Changesโ
- Aleph polynomial and ChebyshevSeries type names have changed from generic/template-style names to explicit typed names:
Polynomial([ ... ])should now be written asRealPolynomial([ ... ])orComplexPolynomial([ ... ])ChebyshevSeries(...)should now be written asRealChebyshevSeries(...)orComplexChebyshevSeries(...)
- Aleph operator-valued ChebyshevSeries construction now uses the typed wrapper names such as
RealOperatorChebyshevSeries(...)instead of the previous generic form. - Some polynomial and ChebyshevSeries member names have been cleaned up in Aleph:
get_degree()->degree()get_coeffs()->get_coefficients()- polynomial composition is now exposed as
compose(...)instead of overloadingevaluate(...)
QbitandFbit'sinsert(position, value)method now accepts any integralvalueinstead of just0and1.integersare converted toboolinternally, so0is treated asfalseand any non-zero value is treated astrue.- Spin-half operator classes (OperatorNamed, OperatorDense, OperatorSparse, etc.) have been unified into a single class:
SpinHalfOperator. The specific operator kind is now visible via the payload returned byparameters().
๐งช Migration Notesโ
- Update any generic polynomial and ChebyshevSeries construction calls to use the typed variants that match your scalar type.
- Update any Aleph code that still calls
get_degree()orget_coeffs()to usedegree()andget_coefficients(). - If you were previously using polynomial-on-polynomial
evaluate(...), switch those call sites tocompose(...). - If you construct operator-valued ChebyshevSeries or polynomial wrappers in Aleph, migrate to the new typed wrapper names.