recreate each ApiHilbertSpace from any object that has a suitable _hilbertSpace() accessor
Example implementation:
template<class T, std::enable_if_t<hasHilbertSpaceAccessor && std17::is_same_v<ApiHilbertSpace::SerializedHilbertSpace, decltype(std::declval()._serializedHilbertSpace())>>> ApiHilbertSpace makeHilbertSpace(const T& t) { return makeHilbertSpace(t._hilbertSpace().xLower, t._hilbertSPace.xUpper, ...etc.); }