Skip to main content

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 include mode, which can be set to 0 (default) or 1 for Hermitian operators. 0 is usually more efficient, because multi-threaded, but 1 is more robust.

  • Added typed Aleph bindings for polynomial and ChebyshevSeries objects:

    • RealPolynomial and ComplexPolynomial
    • RealChebyshevSeries and ComplexChebyshevSeries
  • Added typed Aleph bindings for operator-valued polynomial and ChebyshevSeries constructions:

    • RealOperatorPolynomial and ComplexOperatorPolynomial
    • RealOperatorChebyshevSeries and ComplexOperatorChebyshevSeries
  • Polynomial and ChebyshevSeries bindings now expose setter-style editing APIs:

    • set_coefficients(...) for both polynomials and ChebyshevSeries objects
    • set_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 data
    • parameters(as_matrix | as_real) and parameters(as_matrix | as_complex) for dense operator payloads
    • parameters(as_sparsematrix | as_real) and parameters(as_sparsematrix | as_complex) for sparse operator payloads
    • parameters(as_string) for Pauli strings
  • Quadratic operators

    • TransferSum represents the sum โˆ‘i,jAi,jfiโ€ fj\sum_{i,j}A_{i,j}f_i^{\dagger}f_j.
    • PairingSum represents the sum โˆ‘i<jPi,jfiโ€ fjโ€ +โˆ‘i>jPi,jfifj\sum_{i<j}P_{i,j}f_i^{\dagger}f_j^{\dagger} + \sum_{i>j}P_{i,j}f_if_j.
    • QuadraticSum represents the sum โˆ‘i,jSi,j+,โˆ’fiโ€ fj+Si,jโˆ’,+fifjโ€ +Si,j+,+fiโ€ fjโ€ +Si,jโˆ’,โˆ’fifj\sum_{i,j}S_{i,j}^{+,-}f_i^{\dagger}f_j + S_{i,j}^{-,+}f_if_j^{\dagger} + S_{i,j}^{+,+}f_i^{\dagger}f_j^{\dagger} + S_{i,j}^{-,-}f_if_j.
    • Quadratic operators implement get_bdg_matrix and get_bdg_shift to 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 fiโ€ fjโ€ f_i^{\dagger}f_j^{\dagger}.
    • The DestroyDestroy(i,j) operator which represents the operator fifjf_if_j.

๐Ÿ› Fixesโ€‹

  • Fixed Aleph formatter edge cases around numeric literals, complex-number suffixes and if headers.
  • 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_function which 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, parameterized cases, 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 as RealPolynomial([ ... ]) or ComplexPolynomial([ ... ])
    • ChebyshevSeries(...) should now be written as RealChebyshevSeries(...) or ComplexChebyshevSeries(...)
  • 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 overloading evaluate(...)
  • Qbit and Fbit's insert(position, value) method now accepts any integral value instead of just 0 and 1. integers are converted to bool internally, so 0 is treated as false and any non-zero value is treated as true.
  • 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 by parameters().

๐Ÿงช 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() or get_coeffs() to use degree() and get_coefficients().
  • If you were previously using polynomial-on-polynomial evaluate(...), switch those call sites to compose(...).
  • If you construct operator-valued ChebyshevSeries or polynomial wrappers in Aleph, migrate to the new typed wrapper names.