Skip to content

v0.5.0 — packaging and API for the paper

Choose a tag to compare

@vukics vukics released this 07 Nov 11:09
· 9 commits to main since this release

Packaging and API for the paper. Application and its results are unchanged since v0.4.2.

Breaking changes

  • While the major version is 0, the installed package accepts only requests for its own minor version: an installed 0.5.x satisfies find_package(cppqed-multidiagonal 0.5) but not a request for 0.4 or 0.6 (#9). A consumer that asks for 0.4 (such as FIND_PACKAGE_ARGS 0.4) falls back to fetching its pinned commit.
  • The library no longer requires or links the compiled Boost.Serialization (#16). It uses only Boost.Serialization's headers (MultiArray's save and load), which come with every Boost installation. Whoever writes or reads archives links Boost::serialization itself.
  • The install rules are generated only in a top-level build, unless MULTIDIAGONAL_INSTALL=ON (#9): a project that fetches the library no longer installs it along with itself.

Construction API (#15): quantumoperator::multidiagonal::diagonal(offset, values) returns the rank-1 operator with the single diagonal values at the signed offset, of dimension values.size()+|offset|. Operators with several diagonals or on several axes are built from these with +, | (composition) and * (direct product). The README has a usage example, a Jaynes–Cummings coupling of a qubit and a mode. It is also the first part of tests/consumer/consumer.cc, so CI compiles and runs it against the installed library.

JSON (#18): a MultiDiagonal is read back from the JSON it writes. Duplicate offsets and diagonals implying different dimensions are rejected.

CMake (#9, #16)

  • The target requires C++23 (cxx_std_23), so consumers are compiled as C++23.
  • Minimum versions Boost 1.80 and Eigen 3.4, also in the installed package config. Eigen is checked after find_package, so that Eigen 5 is accepted.
  • The installed target finds its headers also with a CMAKE_INSTALL_INCLUDEDIR other than include.
  • LICENSE.txt is installed.
  • The version file is architecture-independent.
  • MULTIDIAGONAL_BUILD_BENCHMARKS switches the benchmarks off.
  • CMP0167 is set to NEW, so CMake 3.30 and later find Boost through its package config without a warning.

Tests

  • Catch2 is pinned by full commit SHA, and an installed Catch2 3 is used when found, so the tests configure without network (#11).
  • Clang 23's -Wc2y-extensions on Catch2's __COUNTER__ no longer breaks builds with warnings as errors (#24). CI's Clang 18 doesn't have the warning; checked with Clang 23.1.4.