Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Typedefs | Enumerations | Functions | Variables

Namespaces

namespace  async
 This represents the reverse-mode adjoint for functions of complex variables, assuming a real-valued scalar loss function ( L \colon \mathbb{C} \to \mathbb{R} ).
 
namespace  blas
 
namespace  check
 
namespace  cli
 
namespace  cublas
 
namespace  cuda
 
namespace  cusolver
 
namespace  demangle
 
namespace  display
 
namespace  examples
 
namespace  kernel
 
namespace  krylov
 
namespace  lapack
 
namespace  layout
 
namespace  linalg
 
namespace  literals
 
namespace  math
 Shared scalar math with native overloads and class-specific ADL customization.
 
 
namespace  models
 
namespace  mplapack
 
namespace  output_detail
 
namespace  performance
 
namespace  presentation
 
namespace  tensor_network
 

Classes

struct  accessor_applies_conjugation
 Trait used by mdspan accessors that present conjugated values on read. More...
 
struct  accessor_applies_conjugation< conjugated_accessor< Accessor > >
 
struct  AsyncSeparateSparseBlockStorage
 Sparse storage with one independently scheduled dense Tensor per block. More...
 
class  basic_half_int
 Signed value type that stores multiples of one half exactly. More...
 
class  BlockKey
 Opaque logical block-selection coordinates in boundary order. More...
 
struct  BlockRangeMapping
 Destination range of one irregular block after regularization. More...
 
struct  BlockSector
 One symmetry sector inside a block-structured space. More...
 
class  BlockSpace
 Immutable coalesced tensor space represented as unique symmetry blocks. More...
 
class  BlockSvdDecomposition
 Intermediate per-sector block SVD retaining factors and logical basis maps. More...
 
struct  BlockSvdMaterialization
 Materialized paired factors and statistics for one SVD selection. More...
 
struct  BlockSvdMaterializationOptions
 Options controlling one selected block-SVD materialization. More...
 
class  BlockSvdSelection
 Arbitrary paired-state selection from a block-SVD spectrum. More...
 
struct  BlockSvdState
 One charge-labelled entry in a globally sorted singular spectrum. More...
 
struct  BlockSvdStateId
 Stable identity of one paired or side-specific block-SVD state. More...
 
class  BlockSvdVectorSelection
 Selection of singular vectors which need not form paired triplets. More...
 
class  BlockTensor
 Fixed-order tensor whose blocks obey a bosonic abelian selection rule. More...
 
struct  BlockTensorSpaceTraits
 Compile-time storage properties of one BlockTensor boundary space. More...
 
struct  BlockTensorSpaceTraits< BlockSpace >
 BlockSpace selects a sector and stores its degeneracy dimension. More...
 
struct  BlockTensorSpaceTraits< DenseSpace >
 DenseSpace has one structural choice and stores its full extent. More...
 
struct  BlockTensorSpaceTraits< Dual< SpaceType > >
 Explicit duality preserves key-coordinate and dense-axis structure. More...
 
struct  BlockTensorSpaceTraits< IrregularSpace >
 IrregularSpace selects a stored block and stores its dimension. More...
 
struct  BlockTensorSpaceTraits< LocalSpace >
 LocalSpace selects one state but stores no within-state multiplicity. More...
 
struct  BlockTensorSpaceTraits< QNumSpace >
 QNumSpace carries one fixed irrep and needs no per-block storage axis. More...
 
class  Codomain
 Ordered codomain spaces of a tensor morphism. More...
 
class  configuration
 Parser-independent configuration with CLI/API > file > attribute > environment > default precedence. More...
 
class  configuration_binding
 A single declared scalar, with application-selected fallback sources. More...
 
class  conjugated_accessor
 Read-only accessor that returns uni20::conj of the wrapped accessor value. More...
 
class  ConjugatedTensorView
 Non-owning tensor view whose immediate or deferred metadata presents conjugated values. More...
 
class  const_accessor_adaptor
 Adaptor that exposes a mutable lvalue accessor as read-only. More...
 
class  ConstTensorView
 Non-owning read-only view of a tensor-level object. More...
 
struct  cuda_access_domain
 Execution domain in which CUDA device code may evaluate an accessor. More...
 
struct  CudaStorage
 Tensor storage policy for device-resident CUDA values. More...
 
class  decimal_literal
 A precisionless decimal spelling produced by the _mp literal operator. More...
 
struct  DefaultAccessorFactory
 Factory that provides default accessors for tensor storage containers. More...
 
class  DenseSpace
 Symmetry-neutral dense tensor space with one fixed extent. More...
 
class  diagnostic_error
 Base class for exceptions raised through Uni20's diagnostic boundary. More...
 
class  diagonal_accessor
 Mdspan accessor over a compressed rank-N generalized diagonal. More...
 
struct  diagonal_data_handle
 Handle for one compressed generalized diagonal value sequence. More...
 
class  diagonal_reference
 Writable proxy for one structural diagonal or off-diagonal element. More...
 
class  Domain
 Ordered domain spaces of a tensor morphism. More...
 
class  Dual
 Tensor space represented in an explicitly dual basis. More...
 
class  exact_rational
 Owning arbitrary-size rational with exact, eager arithmetic. More...
 
struct  extent_stride
 Represents a single dimension's extent and stride for iteration planning. More...
 
struct  extent_strides
 Structure to represent a common extent and an array of strides. More...
 
struct  frexp_result
 A binary significand and exponent: value = fraction * 2^exponent. More...
 
struct  GeneralZipLayout
 Fallback zip layout for arbitrary mapping policies. More...
 
class  generated_accessor
 Accessor that evaluates a generator at the logical index encoded by an offset. More...
 
struct  generated_data_handle
 Compact mdspan handle identifying a base offset in a generated value sequence. More...
 
struct  GeneratedLayout
 Synthetic non-strided layout used by generated tensor accessors. More...
 
struct  GeneratedStorage
 Backend-neutral storage policy for tensors generated from compact state. More...
 
class  GeneratedTensor
 Compact read-only tensor evaluated from logical indices. More...
 
struct  host_access_domain
 Execution domain in which ordinary host code may evaluate an accessor. More...
 
class  HostBuffer
 Owning contiguous host buffer used by HostStorage. More...
 
struct  HostStorage
 Default pageable-host tensor storage policy. More...
 
class  IndirectReshapedTensorView
 Tensor-level descriptor that resolves a reshape through its parent tensor. More...
 
class  IrregularSpace
 Ordered block space whose quantum-number sectors may repeat. More...
 
struct  IrregularSpaceRegularization
 Result of regularizing an ordered segmented IrregularSpace. More...
 
struct  is_complex_t
 Trait to detect whether a type is a complex scalar type. More...
 
struct  is_complex_t< detail::standard_complex< T > >
 
struct  is_default_accessor
 Trait that recognizes the standard mdspan default accessor. More...
 
struct  is_default_accessor< stdex::default_accessor< ElementType > >
 Specialization for stdex::default_accessor<T>. More...
 
struct  is_integer_t
 Trait to detect whether a type is an integer scalar (excluding bool). More...
 
struct  is_real_t
 Trait to detect whether a type is a real-valued scalar. More...
 
struct  is_real_t< double >
 
struct  is_real_t< float >
 
struct  is_real_t< long double >
 
struct  iteration_offset_range
 Inclusive range of handle-relative offsets visited by an iteration plan. More...
 
struct  lgamma_result
 Logarithm of the absolute Gamma value and Gamma's sign. More...
 
class  LocalSpace
 Ordered local-state space whose quantum numbers may repeat. More...
 
struct  LocalSpaceRegularization
 Result of regularizing an immutable LocalSpace. More...
 
class  log_gamma_context
 Immutable reusable right-half-plane log-Gamma and real-shift log-ratio context. More...
 
struct  log_gamma_options
 Work limits for recurrence and Stirling/logarithm series evaluation. More...
 
struct  log_gamma_result
 Analytic log-Gamma value, truncation bound and heuristic roundoff indicator. More...
 
struct  logical_value
 Map an execution expression type to its backend-neutral logical value type. More...
 
struct  logical_value<::cuda::std::complex< Real > >
 
struct  make_complex
 Metafunction to convert a type to its complexified analog. More...
 
struct  make_complex< T >
 Metafunction that produces the complex counterpart of a real-valued scalar. More...
 
struct  make_real
 Metafunction to convert a type to its real-valued analog. More...
 
struct  make_real< T >
 
class  mdspec
 Store a data descriptor with the mapping and accessor for an eventual mdspan. More...
 
class  MdspecTensorView
 TensorView materialization over writable and read-only mdspec values. More...
 
class  metadata_document
 Ordered, uniquely identified metadata. Copies are independent snapshots. More...
 
struct  metadata_field
 
struct  metadata_field_options
 
struct  metadata_group
 
class  metadata_value
 An immutable owned value that retains its native scalar and optional type. More...
 
struct  modf_result
 Signed fractional and integral parts of a real value. More...
 
class  mpcomplex
 Exact rational complex value or owning finite-precision MPC approximation. More...
 
class  mpreal
 Owning exact rational or finite-precision MPFR real, with eager arithmetic. More...
 
struct  multi_iteration_plan
 Compact affine iteration plan shared by host and device backends. More...
 
class  nifty_counter
 Runs shared initialization before namespace-scope users and shared cleanup after them. More...
 
struct  numeric_limits
 Project-level numeric limits customization point. More...
 
struct  numeric_limits< basic_half_int< T > >
 Exact representation properties and range of a half-integer scalar. More...
 
struct  numeric_limits< mpreal >
 Type properties and explicit runtime limits for exact-or-approximate reals. More...
 
struct  numeric_limits< T >
 
struct  numeric_limits< T const >
 
struct  numeric_limits< T const volatile >
 
struct  numeric_limits< T volatile >
 
struct  output_destination_options
 
class  output_error
 
struct  output_failure
 
struct  output_report
 
class  output_session
 An explicitly finalized set of owned result streams, with no global display changes. More...
 
struct  PackedCompleteBlockStorage
 Complete storage packing every symmetry-legal dense block into one leaf buffer. More...
 
struct  PackedDiagonalBlockStorage
 Sparse BlockTensor storage packing each generalized diagonal block into one leaf buffer. More...
 
struct  PackedSparseBlockStorage
 Sparse storage packing every stored dense block into one leaf buffer. More...
 
struct  ParallelPackedCompleteBlockStorage
 Complete packed storage whose disjoint blocks may be processed in a scheduler batch. More...
 
struct  ParallelPackedSparseBlockStorage
 Packed sparse storage whose disjoint dense blocks may be processed in a scheduler batch. More...
 
struct  ParallelSeparateSparseBlockStorage
 Sparse storage whose separate dense blocks may be processed in a scheduler batch. More...
 
class  Precision
 Exact arithmetic or an explicit binary working precision. More...
 
class  QNum
 One irrep label together with the symmetry context needed to interpret it. More...
 
class  QNumList
 Explicit sparse tensor space represented as quantum numbers with one shared symmetry. More...
 
struct  QNumListRegularization
 Result of regularizing a sparse QNumList into a coalesced BlockSpace. More...
 
class  QNumSpace
 Tensor space carrying one irreducible-representation label. More...
 
struct  quadrature_point
 An abscissa and independently evaluated distances to its finite endpoints. More...
 
struct  quadrature_result
 Last complete mesh, its diagnostic estimates and total work, including an interrupted mesh. More...
 
class  read_mdspan_lease
 Move-only RAII lease exposing one resolved read-only mdspan. More...
 
class  read_tensor_lease
 Move-only RAII lease exposing a read-only ImmediateTensorView. More...
 
class  ready_access
 Always-ready awaitable that transfers one access lease. More...
 
struct  remove_proxy_reference
 Trait for extracting the element type from a proxy reference. More...
 
struct  remove_proxy_reference< cuda::CudaComplexReference< Real > >
 
struct  remove_proxy_reference< diagonal_reference< ElementType > >
 Recover the stored value type from a writable diagonal proxy. More...
 
struct  remquo_result
 Nearest-even remainder and the signed low three bits of its quotient. More...
 
class  ReshapedTensor
 Tensor-level descriptor owning a reshaped mdspan and backend selector. More...
 
struct  resolved_value
 
struct  run_clock_sample
 One clock sample; unavailable process CPU time is distinct from zero. More...
 
class  run_context
 Parser-independent run state. More...
 
struct  run_context_options
 
struct  scalar_format_options
 Formatting options for Uni20 real and complex scalars. More...
 
struct  scalar_type
 Trait to extract the scalar type from a type T. More...
 
struct  scalar_type< T >
 
struct  SchedulerBatchBlockExecution
 Execute independent block-level work through the active scheduler's synchronous batch interface. More...
 
struct  SeparateSparseBlockStorage
 Sparse storage with one independently owning dense Tensor per stored block. More...
 
struct  SerialBlockExecution
 Execute block-level work serially on the calling thread. More...
 
struct  sincos_result
 Sine and cosine evaluated at one input and precision. More...
 
struct  sinhcosh_result
 Hyperbolic sine and cosine evaluated at one input and precision. More...
 
struct  span_offset_type
 Trait to pull an AccessorPolicy’s offset_type if present, or fall back to std::size_t otherwise. More...
 
struct  span_offset_type< AP, std::void_t< typename AP::offset_type > >
 Partial specialization that uses an accessor policy’s declared offset_type. More...
 
struct  StridedZipLayout
 Zip layout for NumSpans strided spans (all using layout_stride). More...
 
class  Symmetry
 Public handle to a canonicalized direct-product symmetry specification. More...
 
struct  tanh_sinh_options
 Explicit precision, component tolerances and work limits for tanh-sinh quadrature. More...
 
class  TaskRegistry
 No-op task registry implementation for non-debug async builds. More...
 
class  TaskRegistryDebug
 Tracks coroutine and epoch-context lifecycle events in debug builds. More...
 
struct  TaskRegistryGraphAwaitDependency
 Concrete awaited dependency captured for a task. More...
 
struct  TaskRegistryGraphDataNode
 Async value node captured in a task-registry graph snapshot. More...
 
struct  TaskRegistryGraphDiagnostics
 Diagnostics derived from a structured task-registry graph snapshot. More...
 
struct  TaskRegistryGraphEpoch
 Epoch context captured in a task-registry graph snapshot. More...
 
struct  TaskRegistryGraphProvenance
 Optional source provenance attached to a task, epoch, or dependency edge. More...
 
struct  TaskRegistryGraphSnapshot
 Structured task-registry graph snapshot. More...
 
struct  TaskRegistryGraphTask
 Coroutine task captured in a task-registry graph snapshot. More...
 
struct  TaskRegistryReportOptions
 Options controlling an async task-registry summary report. More...
 
struct  TaskRegistryStacktraceOptions
 Runtime controls for formatting captured task-registry stacktraces. More...
 
class  Tensor
 General-purpose owning tensor with immediate or deferred mdspan metadata. More...
 
struct  theta_constant_result
 A positive theta constant represented as scaled_value * exp(log_scale). More...
 
struct  theta_jet_result
 Theta value and first two u derivatives with a shared real exponential scale. More...
 
class  U1
 Value-level quantum number type representing one U(1) irrep. More...
 
struct  uninitialized_t
 Request storage whose numerical values must be written before being read. More...
 
struct  value_origin
 Identifies the winning source, without retaining discarded candidates. More...
 
class  write_mdspan_lease
 Move-only RAII lease exposing one resolved writable mdspan. More...
 
class  write_tensor_lease
 Move-only RAII lease exposing mutable and const immediate TensorViews. More...
 
struct  zip_layout_selector
 Picks the right zip layout for a pack of mdspan types. More...
 
struct  zip_layout_selector< Spans... >
 Specialization that selects StridedZipLayout when all spans are strided. More...
 

Concepts

concept  ConfigurationValue
 Binding values whose textual conversion needs no runtime precision choice.
 
concept  uninitialized_ok
 Whether raw allocation may establish storage for T without construction.
 
concept  ExactRationalSource
 Exact numeric sources accepted without an approximation precision.
 
concept  Integer
 Concept for integer scalar types (excluding char and bool).
 
concept  Real
 Concept for real scalar types (float, double, etc.).
 
concept  Complex
 Concept for complex scalar types.
 
concept  Scalar
 Concept for numeric scalar types (integer, real, or complex).
 
concept  RealOrComplex
 Concept for types that are either real or complex.
 
concept  BlasReal
 Real scalar types supported by the configured raw-pointer BLAS wrappers.
 
concept  BlasComplex
 Complex scalar types supported by the configured raw-pointer BLAS wrappers.
 
concept  BlasScalar
 Scalar types supported by the configured raw-pointer BLAS wrappers.
 
concept  LapackReal
 Real scalar types supported by the configured raw-pointer LAPACK wrappers.
 
concept  LapackComplex
 Complex scalar types supported by the configured raw-pointer LAPACK wrappers.
 
concept  LapackRealOrComplex
 Concept for real or complex scalar fields with real LAPACK coverage.
 
concept  LapackComplexReal
 Concept for real precisions whose Uni20 complex scalar has LAPACK coverage.
 
concept  LapackScalar
 Concept for scalar types with a configured dense LAPACK backend.
 
concept  ScalarValued
 Concept for scalar types or types whose recursive value_type resolves to a scalar.
 
concept  IntegerScalarValued
 Concept for scalar-valued types whose scalar_t<T> is an integer scalar.
 
concept  RealScalarValued
 Concept for scalar-valued types whose scalar_t<T> is a real scalar.
 
concept  ComplexScalarValued
 Concept for scalar-valued types whose scalar_t<T> is a complex scalar.
 
concept  RealOrComplexScalarValued
 Concept for scalar-valued types whose scalar_t<T> is real or complex.
 
concept  AsyncTensorOutput
 Mutable Tensor output supported by async operation wrappers.
 
concept  AccessorPolicy
 A model of the C++ mdspan AccessorPolicy named requirement.
 
concept  AccessorInDomain
 Accessor policy explicitly valid in one execution domain.
 
concept  HostAccessibleAccessor
 Accessor policy that may be evaluated directly by host code.
 
concept  CudaAccessibleAccessor
 Accessor policy that may be evaluated directly by CUDA device code.
 
concept  MdspanLike
 A readable type implementing the mdspan observers and multidimensional subscript contract.
 
concept  MdspecLike
 Mdspan metadata whose data handle is immediate or available through a data descriptor.
 
concept  HostAccessibleMdspan
 Mdspan whose accessor may be evaluated directly by host code.
 
concept  CudaAccessibleMdspan
 Mdspan whose accessor may be evaluated directly by CUDA device code.
 
concept  HostAccessibleMdspec
 Immediate or descriptor-backed mdspan metadata targeting host access.
 
concept  CudaAccessibleMdspec
 Immediate or descriptor-backed mdspan metadata targeting CUDA access.
 
concept  MutableMdspanLike
 MdspanLike types whose accessor supports indexed assignment.
 
concept  MutableMdspecLike
 MdspecLike types whose eventual storage supports writes.
 
concept  StridedMdspanLike
 An mdspan-like type whose mapping is always strided and exposes stride observers.
 
concept  MutableStridedMdspanLike
 Mutable mdspan-like types whose layout reports they are always strided.
 
concept  StridedMdspecLike
 An mdspec-like type whose mapping exposes multidimensional strides.
 
concept  MutableStridedMdspecLike
 Mutable mdspec-like type whose mapping is always strided.
 
concept  RankedMdspanLike
 An mdspan-like type with a specified static rank.
 
concept  RankedMdspecLike
 An mdspec-like type with a specified static rank.
 
concept  DiagonalMdspecLike
 Full logical mdspec with a rank-one view of its generalized diagonal components.
 
concept  MutableDiagonalMdspecLike
 Writable generalized-diagonal mdspec with writable rank-one components.
 
concept  MutableRankedMdspecLike
 Mutable mdspec-like type with a specified static rank.
 
concept  MutableRankedMdspanLike
 A mutable mdspan-like type with a specified static rank.
 
concept  DefaultAccessorMdspanLike
 An mdspan-like type whose accessor is stdex::default_accessor.
 
concept  RankedStridedMdspanLike
 A strided mdspan-like type with a specified static rank.
 
concept  RankedStridedMdspecLike
 A strided mdspec-like type with a specified static rank.
 
concept  MutableRankedStridedMdspecLike
 Mutable strided mdspec-like type with a specified static rank.
 
concept  MutableRankedStridedMdspanLike
 A mutable strided mdspan-like type with a specified static rank.
 
concept  BlockTensorView
 Tensor-level view of a symmetry-preserving collection of dense blocks.
 
concept  MutableBlockTensorView
 BlockTensorView whose stored dense blocks support eventual mutation.
 
concept  ImmediateBlockTensorView
 BlockTensorView whose read-only dense blocks are immediately accessible.
 
concept  MutableImmediateBlockTensorView
 MutableBlockTensorView whose writable dense blocks are immediately accessible.
 
concept  DiagonalBlockTensorView
 BlockTensorView whose stored numerical blocks are generalized diagonals.
 
concept  BorrowedBlockTensorView
 BlockTensorView whose destruction does not destroy its referenced numerical payload.
 
concept  AsyncBlockTensorView
 BlockTensorView exposing an independently scheduled read timeline per block.
 
concept  MutableAsyncBlockTensorView
 MutableBlockTensorView exposing an independently scheduled write timeline per block.
 
concept  BlockTensorSpace
 Tensor space with an explicit block-coordinate/dense-axis classification.
 
concept  BlockTensorStorage
 Storage policy for a BlockTensor container.
 
concept  SparseBlockStorage
 BlockTensor storage whose stored key set may omit legal blocks.
 
concept  CompleteBlockStorage
 BlockTensor storage which contains every symmetry-legal block.
 
concept  DiagonalBlockStorage
 BlockTensor storage whose stored numerical blocks are generalized diagonals.
 
concept  BlockTensorStorageFor
 Storage policy instantiated for one block scalar and tensor order.
 
concept  LocalBlockStorageFor
 BlockTensor storage whose blocks reside within one local process.
 
concept  ImmediateLocalBlockStorageFor
 Local BlockTensor storage whose block TensorViews are immediately accessible.
 
concept  AsyncLocalBlockStorageFor
 Local BlockTensor storage with one independently scheduled async value per block.
 
concept  DistributedBlockStorageFor
 Distributed BlockTensor storage refinement.
 
concept  DualSpace
 Space value whose object basis is explicitly dual.
 
concept  Space
 Tensor-space value with a mutable semantic leg label.
 
concept  SymmetrySpace
 Space whose structure is interpreted in one explicit symmetry context.
 
concept  TensorAccessState
 Movable state retaining one acquired tensor data-handle lifetime.
 
concept  ReadMdspanLease
 Move-only lease exposing a resolved read-only mdspan.
 
concept  WriteMdspanLease
 Move-only lease exposing a resolved writable mdspan.
 
concept  HostReadMdspanLease
 Read mdspan lease whose resolved accessor is valid in host code.
 
concept  HostWriteMdspanLease
 Write mdspan lease whose resolved accessor is valid in host code.
 
concept  CudaReadMdspanLease
 Read mdspan lease whose resolved accessor is valid in CUDA code.
 
concept  CudaWriteMdspanLease
 Write mdspan lease whose resolved accessor is valid in CUDA code.
 
concept  ReadTensorLease
 ImmediateTensorView that owns a move-only read access lifetime.
 
concept  WriteTensorLease
 MutableImmediateTensorView that owns a move-only write access lifetime.
 
concept  HostReadTensorLease
 Read lease whose resolved mdspan is directly host-accessible.
 
concept  HostWriteTensorLease
 Write lease whose resolved mutable mdspan is directly host-accessible.
 
concept  CudaReadTensorLease
 Read lease whose resolved mdspan is directly CUDA-accessible.
 
concept  CudaWriteTensorLease
 Write lease whose resolved mutable mdspan is directly CUDA-accessible.
 
concept  HostReadableMdspec
 Mdspec metadata supporting host read acquisition.
 
concept  HostWritableMdspec
 Mutable mdspec metadata supporting host write acquisition.
 
concept  HostReadableTensor
 Tensor view supporting host read acquisition.
 
concept  HostWritableTensor
 Mutable tensor view supporting host write acquisition.
 
concept  TensorView
 Tensor-level object exposing readable multidimensional metadata and a backend selector.
 
concept  ImmediateTensorView
 TensorView whose mdspec is already an mdspan.
 
concept  OwningTensor
 Tensor-level object that owns the storage described by its multidimensional view.
 
concept  MutableTensorView
 TensorView whose writable mdspec supports eventual element assignment.
 
concept  MutableImmediateTensorView
 MutableTensorView whose writable mdspec is already an mdspan.
 
concept  RankedTensorView
 TensorView whose readable mdspec has a specified static rank.
 
concept  StridedTensorView
 TensorView whose readable mdspec is strided.
 
concept  MutableStridedTensorView
 MutableTensorView whose readable and writable mdspecs are strided.
 
concept  RankedStridedTensorView
 StridedTensorView with a specified static rank.
 
concept  MutableRankedTensorView
 MutableTensorView with a specified static rank.
 
concept  ScalarTensorView
 TensorView whose readable mdspec has rank zero.
 
concept  MutableScalarTensorView
 MutableTensorView whose writable mdspec has rank zero.
 
concept  MutableRankedStridedTensorView
 Mutable strided TensorView with a specified static rank.
 
concept  StridedImmediateTensorView
 ImmediateTensorView whose readable mdspan is strided.
 
concept  MutableStridedImmediateTensorView
 MutableImmediateTensorView whose readable and writable mdspans are strided.
 
concept  RankedImmediateTensorView
 ImmediateTensorView whose readable mdspan has a specified static rank.
 
concept  MutableRankedImmediateTensorView
 MutableImmediateTensorView whose writable mdspan has a specified static rank.
 
concept  ScalarImmediateTensorView
 Tensor-level object whose readable resolved mdspan has rank zero.
 
concept  MutableScalarImmediateTensorView
 Mutable tensor-level object whose writable resolved mdspan has rank zero.
 
concept  RankedStridedImmediateTensorView
 Strided tensor-level object whose resolved mdspan has a specified static rank.
 
concept  MutableRankedStridedImmediateTensorView
 Mutable strided tensor-level object whose resolved mdspan has a specified static rank.
 
concept  TensorExtentsLike
 Extents-like shape accepted by tensor output preparation.
 
concept  ResizableTensorOutput
 Mutable tensor output that can replace its shape and storage.
 

Typedefs

using attribute_map = std::map< std::string, metadata_value >
 
template<typename ElementType , typename Extents , typename StoragePolicy = HostStorage, typename LayoutPolicy = stdex::layout_left, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using BasicTensor = Tensor< ElementType, Extents::rank(), StoragePolicy, LayoutPolicy, AccessorFactory, Extents >
 Configurable owning tensor with an explicit mdspan extents type.
 
template<class Tensor >
using block_tensor_codomain_t = typename block_tensor_type_t< Tensor >::codomain_type
 Ordered codomain type exposed by a BlockTensor-level object.
 
template<class Tensor >
using block_tensor_const_block_t = decltype(std::declval< block_tensor_type_t< Tensor > const & >().block_by_ordinal(std::size_t{}))
 Read-only dense-block TensorView exposed by stable block ordinal.
 
template<class Tensor >
using block_tensor_domain_t = typename block_tensor_type_t< Tensor >::domain_type
 Ordered domain type exposed by a BlockTensor-level object.
 
template<class Tensor >
using block_tensor_key_t = typename block_tensor_type_t< Tensor >::key_type
 Logical block-key type exposed by a BlockTensor-level object.
 
template<class Tensor >
using block_tensor_mutable_block_t = decltype(std::declval< std::remove_reference_t< Tensor > & >().block_by_ordinal(std::size_t{}))
 Writable dense-block TensorView exposed by stable block ordinal.
 
template<class Tensor >
using block_tensor_type_t = std::remove_cvref_t< Tensor >
 Cvref-stripped BlockTensor-level object type.
 
template<class Tensor >
using block_tensor_value_t = typename block_tensor_type_t< Tensor >::value_type
 Scalar value type exposed by a BlockTensor-level object.
 
template<class SourceTensor , std::size_t... Axis>
using BlockTensorPermutationView = typename detail::PermutationViewTraits< SourceTensor, Axis... >::type
 Zero-copy bosonic permutation of factors within each morphism side.
 
template<class SourceTensor , MorphismSide Side, BoundaryEnd End>
using BlockTensorRepartitionView = typename detail::RepartitionViewTraits< SourceTensor, Side, End >::type
 Zero-copy view of one bosonic edge leg bent across a morphism boundary.
 
using cdouble = complex< double >
 
using cfloat = complex< float >
 
using ColumnMajor = stdex::layout_left
 Conventional column-major contiguous mdspan layout.
 
template<typename ElementType , std::size_t Rank, typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using ColumnMajorTensor = Tensor< ElementType, Rank, StoragePolicy, ColumnMajor, AccessorFactory >
 Owning runtime-extents tensor with canonical column-major storage.
 
template<typename... Spans>
using common_extents_t = typename detail::common_extents< Spans... >::type
 Convenience alias that represents the common extents of a set of mdspans.
 
template<typename Real >
using complex = typename detail::complex_type< Real >::type
 Project-level complex scalar spelling.
 
using complex128 = complex< double >
 
using complex64 = complex< float >
 
template<AccessorPolicy Acc>
using const_accessor_t = decltype(const_accessor(std::declval< Acc >()))
 Type alias that produces the const-qualified version of an accessor policy.
 
template<typename ElementType , typename LayoutPolicy = ColumnMajor>
using DenseMatrix = Tensor< ElementType, 2, HostStorage, LayoutPolicy >
 Owning dense host matrix with a compile-time contiguous layout.
 
using float32 = float
 
using float64 = double
 
using half_int = basic_half_int< std::int64_t >
 Default half-integer type used by Uni20.
 
template<class Mdspec >
using host_read_mdspan_t = std::remove_cvref_t< decltype(std::declval< detail::host_read_mdspan_lease_t< Mdspec > & >().mdspan())>
 Read-only mdspan type resolved by host descriptor acquisition.
 
template<class Tensor >
using host_read_tensor_mdspan_t = std::remove_cvref_t< decltype(std::declval< detail::host_read_tensor_lease_t< Tensor > & >().mdspan())>
 Read-only mdspan type resolved by host tensor acquisition.
 
template<class Mdspec >
using host_write_mdspan_t = std::remove_cvref_t< decltype(std::declval< detail::host_write_mdspan_lease_t< Mdspec > & >().mdspan())>
 Writable mdspan type resolved by host descriptor acquisition.
 
template<class Tensor >
using host_write_tensor_mdspan_t = std::remove_cvref_t< decltype(std::declval< detail::host_write_tensor_lease_t< Tensor > & >().mdspan())>
 Writable mdspan type resolved by host tensor acquisition.
 
template<ImmediateTensorView T>
using immediate_tensor_mdspan_t = std::remove_cvref_t< detail::tensor_const_mdspan_t< T > >
 Resolved readable mdspan type exposed by a tensor-level object.
 
using index_type = std::ptrdiff_t
 
template<typename Value >
using logical_value_t = typename logical_value< std::remove_cvref_t< Value > >::type
 Backend-neutral logical value represented by an execution expression.
 
template<typename T >
using make_complex_t = typename make_complex< T >::type
 Alias for the complexified version of T.
 
template<typename T >
using make_real_t = typename make_real< T >::type
 Alias for the underlying real-valued type of T.
 
template<MutableImmediateTensorView T>
using mutable_immediate_tensor_mdspan_t = std::remove_cvref_t< detail::tensor_mutable_mdspan_t< T > >
 Resolved writable mdspan type exposed by a mutable tensor-level object.
 
template<MutableTensorView T>
using mutable_tensor_mdspec_t = std::remove_cvref_t< detail::normalized_mutable_mdspec_t< T > >
 Normalized writable MdspecLike type exposed by a mutable tensor-level object.
 
template<class T >
using primal_space_t = typename detail::PrimalSpaceType< std::remove_cvref_t< T > >::type
 Remove one explicit dual-space adaptor from a space type.
 
template<typename R >
using remove_proxy_reference_t = std::conditional_t< is_proxy_reference_v< R >, typename remove_proxy_reference< std::remove_cvref_t< R > >::type, std::remove_reference_t< R > >
 Extracts the underlying value type of a proxy (or normal) reference.
 
using RowMajor = stdex::layout_right
 Conventional row-major contiguous mdspan layout.
 
template<typename ElementType , std::size_t Rank, typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using RowMajorTensor = Tensor< ElementType, Rank, StoragePolicy, RowMajor, AccessorFactory >
 Owning runtime-extents tensor with canonical row-major storage.
 
template<typename T >
using scalar_t = typename scalar_type< std::remove_cvref_t< T > >::type
 
template<typename ElementType , typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using ScalarTensor = Tensor< ElementType, 0, StoragePolicy, ColumnMajor, AccessorFactory >
 Owning rank-zero tensor that retains storage and backend semantics.
 
using size_type = std::ptrdiff_t
 Signed size and index type, used for tensor extents and indexing.
 
template<typename AP >
using span_offset_t = typename span_offset_type< AP >::type
 Convenience alias for accessor_offset_type<AP>::type.
 
template<typename ElementType , std::size_t Rank, typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using StridedTensor = Tensor< ElementType, Rank, StoragePolicy, stdex::layout_stride, AccessorFactory >
 Owning runtime-extents tensor with an explicitly strided mapping.
 
using TaskRegistry = TaskRegistryDebug
 Alias selecting the active task registry implementation.
 
template<TensorView T>
using tensor_element_t = std::remove_cv_t< typename tensor_mdspec_t< T >::element_type >
 Scalar value type exposed by a tensor-level object.
 
template<TensorView T>
using tensor_extents_t = typename tensor_mdspec_t< T >::extents_type
 Extents type exposed by a tensor-level object.
 
template<TensorView T>
using tensor_mdspec_t = std::remove_cvref_t< detail::normalized_const_mdspec_t< T > >
 Normalized readable MdspecLike type exposed by a tensor-level object.
 
template<class Tensor >
using tensor_storage_policy_t = typename detail::TensorStoragePolicy< std::remove_cvref_t< Tensor > >::type
 Storage-policy type exposed by a tensor-level object, or void.
 
template<typename T , std::size_t N>
using tuple_n = decltype(detail::make_tuple_n_impl< T >(std::make_index_sequence< N >{}))
 Alias: tuple_n<T,N> is std::tuple<T,T,…> with N repetitions of T.
 
template<typename... Spans>
using zip_layout_t = typename zip_layout_selector< Spans... >::type
 Alias to extract the chosen layout policy for the given spans.
 

Enumerations

enum class  BoundaryEnd { Left , Right }
 Planar boundary end at which repartition bends one leg. More...
 
enum class  configuration_source {
  explicit_input , command_line , option_file , attribute ,
  environment , application_default
}
 
enum class  MorphismSide { Domain , Codomain }
 Morphism side from which repartition bends one edge leg. More...
 
enum class  output_format {
  terminal , csv , tsv , commented_csv ,
  commented_tsv , json , named_json
}
 
enum class  output_operation {
  open , begin , row , table_finish ,
  flush , finish , close
}
 
enum class  quadrature_status {
  converged , evaluation_limit , refinement_limit , endpoint_limit ,
  nonfinite_integrand , arithmetic_range
}
 Termination of finite-interval tanh-sinh integration. More...
 
enum class  real_format_notation { real_format_notation::general , real_format_notation::fixed , real_format_notation::scientific }
 Selects how real scalar values are rendered as text. More...
 
enum class  run_outcome { success , partial , failed , cancelled }
 
enum class  ScalarPrecision { fp32 , fp64 , fp80 , fp128 }
 Runtime identifier for the real precision underlying a scalar type. More...
 
enum class  StorageInitialization { Zero , Uninitialized }
 Numerical initialization requested from a storage implementation. More...
 
enum class  TaskRegistryGraphRole { Reader , Writer }
 Reader/writer role for a task-registry graph dependency. More...
 

Functions

template<std::signed_integral T>
constexpr auto abs (basic_half_int< T > value) -> basic_half_int< T >
 Return the absolute value of a half-integer.
 
mpreal abs (mpcomplex const &z)
 
mpreal abs (mpcomplex const &z, Precision p)
 Evaluate abs(z.at(p)), returning an approximation at finite precision p.
 
mpreal abs (mpreal const &x)
 
mpreal abs (mpreal const &x, Precision p)
 Evaluate abs(x.at(p)), returning an approximation at finite precision p.
 
mpreal acos (mpreal const &x)
 Inverse cosine in radians; retain input precision or a supported exact result.
 
mpreal acos (mpreal const &x, Precision p)
 Evaluate acos(x.at(p)), returning an approximation at finite precision p.
 
mpcomplex acosh (mpcomplex const &z)
 Principal inverse hyperbolic cosine, with imaginary signed zero selecting the cut side.
 
mpcomplex acosh (mpcomplex const &z, Precision p)
 Evaluate acosh(z.at(p)), returning an approximation at finite precision p.
 
mpreal acosh (mpreal const &x)
 Inverse hyperbolic cosine; retain input precision or a supported exact result.
 
mpreal acosh (mpreal const &x, Precision p)
 Evaluate acosh(x.at(p)), returning an approximation at finite precision p.
 
mpreal acospi (mpreal const &x)
 Principal arccosine divided by pi.
 
mpreal acospi (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate acospi at p.
 
template<cuda::BufferMdspec Mdspec>
requires std::is_const_v<typename std::remove_cvref_t<Mdspec>::element_type>
auto acquire_cuda_read_access_async (Mdspec const &mdspec, cuda::Stream const &stream)
 Resolve borrowed CUDA read access synchronized with an operation stream.
 
template<class Tensor >
requires (!std::is_lvalue_reference_v<Tensor>) && TensorView<std::remove_cvref_t<Tensor>> && (!ImmediateTensorView<std::remove_cvref_t<Tensor>>) && OwningTensor<std::remove_cvref_t<Tensor>> && cuda::BufferMdspec<tensor_mdspec_t<std::remove_cvref_t<Tensor>>> && requires(Tensor&& tensor) { { std::move(tensor).release_storage() } -> std::same_as<typename std::remove_cvref_t<Tensor>::storage_type>; }
auto acquire_cuda_read_access_async (Tensor &&tensor, cuda::Stream const &stream)
 Move an owning CUDA tensor into a stream-ordered read lease.
 
template<class Tensor >
requires TensorView<Tensor> && (!ImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>>
auto acquire_cuda_read_access_async (Tensor &tensor, cuda::Stream const &stream)
 Acquire stream-ordered read access as an immediately-ready awaitable.
 
template<cuda::BufferMdspec Mdspec>
requires std::is_const_v<typename std::remove_cvref_t<Mdspec>::element_type>
auto acquire_cuda_read_access_sync (Mdspec const &mdspec)
 Host-wait for prior CUDA work and resolve a borrowed read descriptor.
 
template<class Tensor >
requires (!std::is_lvalue_reference_v<Tensor>) && TensorView<std::remove_cvref_t<Tensor>> && (!ImmediateTensorView<std::remove_cvref_t<Tensor>>) && OwningTensor<std::remove_cvref_t<Tensor>> && cuda::BufferMdspec<tensor_mdspec_t<std::remove_cvref_t<Tensor>>> && requires(Tensor&& tensor) { { std::move(tensor).release_storage() } -> std::same_as<typename std::remove_cvref_t<Tensor>::storage_type>; }
auto acquire_cuda_read_access_sync (Tensor &&tensor)
 Move an owning CUDA tensor into a synchronized CUDA read lease.
 
template<class Tensor >
requires TensorView<Tensor> && (!ImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>>
auto acquire_cuda_read_access_sync (Tensor &tensor)
 Host-wait for prior CUDA work and acquire a CUDA-accessible read lease.
 
template<class Mdspec >
requires cuda::BufferMdspec<Mdspec> && MutableMdspecLike<Mdspec>
auto acquire_cuda_write_access_async (Mdspec &mdspec, cuda::Stream const &stream)
 Resolve borrowed CUDA write access synchronized with an operation stream.
 
template<class Tensor >
requires MutableTensorView<Tensor> && (!MutableImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>> && cuda::BufferMdspec<mutable_tensor_mdspec_t<Tensor>>
auto acquire_cuda_write_access_async (Tensor &tensor, cuda::Stream const &stream)
 Acquire stream-ordered write access as an immediately-ready awaitable.
 
template<class Mdspec >
requires cuda::BufferMdspec<Mdspec> && MutableMdspecLike<Mdspec>
auto acquire_cuda_write_access_sync (Mdspec &mdspec)
 Host-wait for prior CUDA work and resolve a borrowed write descriptor.
 
template<class Tensor >
requires MutableTensorView<Tensor> && (!MutableImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>> && cuda::BufferMdspec<mutable_tensor_mdspec_t<Tensor>>
auto acquire_cuda_write_access_sync (Tensor &tensor)
 Host-wait for prior CUDA work and acquire a CUDA-accessible write lease.
 
template<ImmediateTensorView Tensor>
requires HostAccessibleMdspan<immediate_tensor_mdspan_t<Tensor>>
auto acquire_host_read_access_async (Tensor &tensor)
 Return an immediately-ready host read acquisition.
 
template<HostAccessibleMdspan Mdspan>
requires std::is_const_v<typename std::remove_cvref_t<Mdspan>::element_type>
auto acquire_host_read_access_sync (Mdspan const &mdspan)
 Acquire a directly host-accessible read-only mdspan.
 
template<ImmediateTensorView Tensor>
requires HostAccessibleMdspan<immediate_tensor_mdspan_t<Tensor>>
auto acquire_host_read_access_sync (Tensor &tensor)
 Acquire an immediately host-accessible tensor view for read-only use.
 
template<MutableImmediateTensorView Tensor>
requires HostAccessibleMdspan<mutable_immediate_tensor_mdspan_t<Tensor>>
auto acquire_host_write_access_async (Tensor &tensor)
 Return an immediately-ready host write acquisition.
 
template<MutableMdspanLike Mdspan>
requires HostAccessibleMdspan<Mdspan>
auto acquire_host_write_access_sync (Mdspan &mdspan)
 Acquire a directly host-accessible writable mdspan.
 
template<MutableImmediateTensorView Tensor>
requires HostAccessibleMdspan<mutable_immediate_tensor_mdspan_t<Tensor>>
auto acquire_host_write_access_sync (Tensor &tensor)
 Acquire an immediately host-accessible mutable tensor view.
 
int add (int a, int b)
 
template<class OutputStorage = void, BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Lhs, Rhs> && SparseBlockStorage<detail::selected_linear_storage_t<OutputStorage, Lhs>> && detail::CompatibleLinearOutputStorage<detail::selected_linear_storage_t<OutputStorage, Lhs>, Lhs, Rhs>
auto add (Lhs const &lhs, Rhs const &rhs)
 Return the sum of two BlockTensor values using the union of stored keys.
 
template<MutableBlockTensorView Output, BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Output, Lhs> && detail::CompatibleBlockTensorValues<Output, Rhs> && detail::CompatibleLinearOutputRepresentation<Output, Lhs, Rhs> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Lhs> && !AsyncBlockTensorView<Rhs>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Lhs> && AsyncBlockTensorView<Rhs>))
void add (Output &output, Lhs const &lhs, Rhs const &rhs)
 Overwrite a fixed BlockTensor output with the sum of two values.
 
template<MutableBlockTensorView Output, BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void add_inplace (Output &output, Input const &input)
 Add one BlockTensor value to an existing output in place.
 
mpreal agm (mpreal const &a, mpreal const &x)
 Nonnegative real arithmetic-geometric mean.
 
mpreal agm (mpreal const &a, mpreal const &x, Precision p)
 Convert both inputs to finite precision p, then evaluate agm at p.
 
mpreal airy_ai (mpreal const &x)
 Real Airy Ai; MPFR recommends arguments with magnitude below about 500.
 
mpreal airy_ai (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate airy_ai at p.
 
template<typename T >
auto allocate_temporary_buffer (std::size_t N, std::size_t align=64)
 Allocate a temporary buffer of T[N] aligned to align.
 
template<typename T >
auto allocate_temporary_buffer_uninitialized (std::size_t N, std::size_t align=64)
 Allocate a temporary buffer of T[N] that is always uninitialized.
 
template<typename T >
detail::aligned_buf_t< T > allocate_uninitialized_buffer (std::size_t N, std::size_t align=64)
 Allocate raw, aligned storage for T[N] without running constructors or destructors.
 
mpreal arg (mpcomplex const &z)
 
mpreal arg (mpcomplex const &z, Precision p)
 Evaluate arg(z.at(p)), returning an approximation at finite precision p.
 
template<class Tensor >
requires BlockTensorView<Tensor> && requires(Tensor& tensor) { detail::as_block_tensor_view_impl(tensor, std::make_index_sequence<block_tensor_type_t<Tensor>::order()>{}); }
auto as_block_tensor_view (Tensor &tensor)
 Materialize a borrowed identity view over an existing BlockTensor view.
 
mpreal asin (mpreal const &x)
 Inverse sine in radians; retain input precision or a supported exact result.
 
mpreal asin (mpreal const &x, Precision p)
 Evaluate asin(x.at(p)), returning an approximation at finite precision p.
 
mpreal asinh (mpreal const &x)
 Inverse hyperbolic sine; retain input precision or a supported exact result.
 
mpreal asinh (mpreal const &x, Precision p)
 Evaluate asinh(x.at(p)), returning an approximation at finite precision p.
 
mpreal asinpi (mpreal const &x)
 Principal arcsine divided by pi.
 
mpreal asinpi (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate asinpi at p.
 
template<MutableBlockTensorView Output, class Scalar , BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void assign_scale (Output &output, Scalar factor, Input const &input)
 Overwrite a fixed BlockTensor output with a scaled input value.
 
template<MutableTensorView Output, TensorView Input>
requires (tensor_mdspec_t<Output>::rank() == tensor_mdspec_t<Input>::rank())
void assign_through (Output &output, Input const &input)
 Assign tensor values through a mutable tensor alias descriptor.
 
template<AsyncTensorOutput OutputTensor, class Function >
void assign_transform (async::Async< OutputTensor > &output, Function &&function)
 Schedule a nullary overwrite using the static Tensor selector.
 
template<AsyncTensorOutput OutputTensor, class Function , TensorView FirstInputTensor, TensorView... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void assign_transform (async::Async< OutputTensor > &output, Function &&function, async::Async< FirstInputTensor > const &first_input, async::Async< RestInputTensors > const &... rest_inputs)
 Schedule a variadic elementwise overwrite using the static Tensor selector.
 
template<class BackendSelector , class OutputMdspan , class Function , class... InputMdspans>
requires detail::OverwriteTransformSpans<OutputMdspan, InputMdspans...>
void assign_transform (BackendSelector &&selector, OutputMdspan &&output, Function &&function, InputMdspans &&... inputs)
 Overwrite a fixed-shape mdspan through an explicit backend selector.
 
template<class BackendSelector , MutableTensorView OutputTensor, class Function >
void assign_transform (BackendSelector &&selector, OutputTensor &&output, Function &&function)
 Overwrite a fixed-shape Tensor from a nullary element generator.
 
template<class BackendSelector , class OutputTensor , class Function , class FirstInputTensor , class... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void assign_transform (BackendSelector &&selector, OutputTensor &&output, Function &&function, FirstInputTensor const &first_input, RestInputTensors const &... rest_inputs)
 Overwrite a Tensor output through an explicit backend selector.
 
template<class BackendSelector , AsyncTensorOutput OutputTensor, class Function >
void assign_transform (BackendSelector selector, async::Async< OutputTensor > &output, Function &&function)
 Schedule a nullary overwrite of an existing async Tensor.
 
template<class BackendSelector , AsyncTensorOutput OutputTensor, class Function , TensorView FirstInputTensor, TensorView... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void assign_transform (BackendSelector selector, async::Async< OutputTensor > &output, Function &&function, async::Async< FirstInputTensor > const &first_input, async::Async< RestInputTensors > const &... rest_inputs)
 Schedule a variadic elementwise overwrite with an explicit backend selector.
 
template<MutableTensorView OutputTensor, class Function >
void assign_transform (OutputTensor &&output, Function &&function)
 Overwrite a fixed-shape Tensor from a nullary element generator.
 
template<class OutputTensor , class Function , class FirstInputTensor , class... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void assign_transform (OutputTensor &&output, Function &&function, FirstInputTensor const &first_input, RestInputTensors const &... rest_inputs)
 Overwrite a Tensor output using its operands' default backend selector.
 
template<TensorView Input>
auto at_precision (Input const &input, Precision p)
 Materialize an owning tensor with every element converted to p.
 
mpreal atan (mpreal const &x)
 
mpreal atan (mpreal const &x, Precision p)
 Evaluate atan(x.at(p)), returning an approximation at finite precision p.
 
mpreal atan2 (mpreal const &y, mpreal const &x)
 
mpreal atan2 (mpreal const &y, mpreal const &x, Precision p)
 Evaluate atan2(y.at(p), x.at(p)), overriding both operands' precisions.
 
mpreal atan2pi (mpreal const &y, mpreal const &x)
 Quadrant-aware arctangent of y/x, divided by pi.
 
mpreal atan2pi (mpreal const &y, mpreal const &x, Precision p)
 Convert y and x to p, then evaluate atan2pi(y,x) at p.
 
mpreal atanh (mpreal const &x)
 Inverse hyperbolic tangent; retain input precision or a supported exact result.
 
mpreal atanh (mpreal const &x, Precision p)
 Evaluate atanh(x.at(p)), returning an approximation at finite precision p.
 
mpreal atanpi (mpreal const &x)
 Principal arctangent divided by pi.
 
mpreal atanpi (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate atanpi at p.
 
template<MutableBlockTensorView Output, class Scalar , BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void axpy (Output &output, Scalar factor, Input const &input)
 Compute output += factor * input without changing either key pattern.
 
template<detail::MathInteger I>
mpreal bessel_j (I n, mpreal const &x)
 Bessel function of the first kind, with a checked signed integer order.
 
template<detail::MathInteger I>
mpreal bessel_j (I n, mpreal const &x, Precision p)
 Convert x to p, then evaluate bessel_j(n,x) at p.
 
template<detail::MathInteger I>
mpreal bessel_y (I n, mpreal const &x)
 Bessel function of the second kind, with a checked signed integer order.
 
template<detail::MathInteger I>
mpreal bessel_y (I n, mpreal const &x, Precision p)
 Convert x to p, then evaluate bessel_y(n,x) at p.
 
mpreal beta (mpreal const &a, mpreal const &x)
 Real Beta function; positive rational/integer pairs retain exact values.
 
mpreal beta (mpreal const &a, mpreal const &x, Precision p)
 Convert both inputs to finite precision p, then evaluate beta at p.
 
std::string BLAS_Vendor ()
 Reports the human-readable vendor string for the active BLAS backend.
 
std::string BLAS_Version ()
 Retrieves the version identifier associated with the active BLAS backend.
 
template<ImmediateBlockTensorView Tensor, class Measurements , class Event >
requires uni20::LapackScalar<block_tensor_value_t<Tensor>> && performance::BatchMeasurementPolicy<Measurements, Event>
auto block_svd (Tensor const &tensor, linalg::SvdOptions options, Measurements &measurements, Event batch_event)
 Factorize an immediate BlockTensorView with performance measurements.
 
template<ImmediateBlockTensorView Tensor, class Measurements , class Event , class Factorizer >
requires uni20::LapackScalar<block_tensor_value_t<Tensor>> && performance::BatchMeasurementPolicy<Measurements, Event>
auto block_svd (Tensor const &tensor, linalg::SvdOptions options, Measurements &measurements, Event batch_event, Factorizer &&factorizer)
 Factorize an immediate BlockTensorView independently by conserved charge with performance measurements.
 
template<ImmediateBlockTensorView Tensor>
requires uni20::LapackScalar<block_tensor_value_t<Tensor>>
auto block_svd (Tensor const &tensor, linalg::SvdOptions options={})
 Factorize an immediate BlockTensorView independently by conserved charge.
 
mpreal cbrt (mpreal const &x)
 Real cube root, including negative arguments; retain input precision or a supported exact result.
 
mpreal cbrt (mpreal const &x, Precision p)
 Evaluate cbrt(x.at(p)), returning an approximation at finite precision p.
 
mpreal ceil (mpreal const &x)
 Round toward positive infinity; exact inputs produce exact integers.
 
mpreal ceil (mpreal const &x, Precision p)
 Round toward positive infinity, then round the result to finite precision p.
 
template<class... Spaces>
 Codomain (Spaces &&...) -> Codomain< std::remove_cvref_t< Spaces >... >
 Deduce a codomain's concrete value types.
 
auto coerce (QNum const &q, Symmetry target) -> QNum
 Coerce a quantum number into a related symmetry by named components.
 
template<TensorView A, TensorView B>
constexpr Precision common_default_precision (A const &a, B const &b)
 Select a binary operation's default without inspecting element precisions.
 
constexpr Precision common_precision (Precision a, Precision b)
 Combine precisions, treating exact values as neutral and rejecting unequal finite precisions.
 
template<uni20::Real Real>
auto complement_svd_selection (std::span< BlockSvdState< Real > const > spectrum, BlockSvdSelection< Real > const &selection) -> BlockSvdSelection< Real >
 Select every paired state not present in an existing selection.
 
template<detail::MathInteger I>
mpreal compound (mpreal const &x, I n)
 Compute (1+x)^n without rounding the sum first, for x >= -1.
 
template<detail::MathInteger I>
mpreal compound (mpreal const &x, I n, Precision p)
 Round the compound result from the original input to finite precision p.
 
double compute_heavy_operation (double a, double b)
 
template<typename T , std::size_t N>
UNI20_HOST_DEVICE constexpr std::array< T, N+1 > concat (const std::array< T, N > &a, const T &x)
 Append a single element to the end of an array.
 
template<typename T , std::size_t N1, std::size_t N2>
UNI20_HOST_DEVICE constexpr std::array< T, N1+N2 > concat (const std::array< T, N1 > &a1, const std::array< T, N2 > &a2)
 Concatenate two std::array instances into one (constexpr helper).
 
template<typename T , std::size_t N>
UNI20_HOST_DEVICE constexpr std::array< T, N+1 > concat (const T &x, const std::array< T, N > &a)
 Prepend a single element in front of an array.
 
constexpr std::string_view configured_scalar_precision_choices ()
 Return a compact choice list suitable for command-line help.
 
constexpr std::span< ScalarPrecision const > configured_scalar_precisions ()
 Return the real scalar precisions configured in this build.
 
template<TensorView Tensor>
constexpr auto conj (ConjugatedTensorView< Tensor > &&view) noexcept
 Cancel a temporary tensor conjugation view and return its durable base tensor.
 
template<TensorView Tensor>
constexpr auto conj (ConjugatedTensorView< Tensor > &view) noexcept
 Cancel a tensor conjugation view and return the read-only base tensor.
 
template<TensorView Tensor>
constexpr auto conj (ConjugatedTensorView< Tensor > const &view) noexcept
 Cancel a const tensor conjugation view and return the read-only base tensor.
 
template<TensorView Tensor>
requires Complex<tensor_element_t<Tensor>>
constexpr auto conj (ConstTensorView< Tensor > &&view) noexcept
 Reapply conjugation to a temporary read-only complex tensor view.
 
template<TensorView Tensor>
requires Complex<tensor_element_t<Tensor>>
constexpr auto conj (ConstTensorView< Tensor > &view) noexcept
 Reapply conjugation to a read-only complex tensor view.
 
template<TensorView Tensor>
requires Complex<tensor_element_t<Tensor>>
constexpr auto conj (ConstTensorView< Tensor > const &view) noexcept
 Reapply conjugation to a const read-only complex tensor view.
 
template<typename T >
uni20::complex< T > conj (detail::standard_complex< T > x)
 Returns the complex conjugate for complex-valued scalars.
 
template<Integer I>
constexpr I conj (I const &x)
 Returns the conjugate of an integer scalar.
 
mpcomplex conj (mpcomplex const &z)
 
mpreal conj (mpreal const &x)
 
template<Real R>
constexpr R conj (R const &x)
 Returns the conjugate of a real-valued scalar.
 
template<MdspanLike Span>
requires (uni20::Complex<std::remove_cv_t<typename Span::element_type>> && !accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto conj (Span const &span)
 Return a read-only mdspan view that presents conjugated complex values.
 
template<MdspecLike Span>
requires (!MdspanLike<Span> && uni20::Complex<std::remove_cv_t<typename Span::element_type>> && !accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto conj (Span const &span)
 Return a read-only deferred view that presents conjugated complex values.
 
template<MdspanLike Span>
requires (uni20::Complex<std::remove_cv_t<typename Span::element_type>> && accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto conj (Span const &span)
 Cancel a conjugating mdspan accessor and return the underlying view.
 
template<MdspecLike Span>
requires (!MdspanLike<Span> && uni20::Complex<std::remove_cv_t<typename Span::element_type>> && accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto conj (Span const &span)
 Cancel conjugation on a deferred multidimensional view.
 
template<MdspanLike Span>
requires (!uni20::Complex<std::remove_cv_t<typename Span::element_type>>)
constexpr auto conj (Span const &span)
 Return a read-only identity view for non-complex mdspan-like views.
 
template<MdspecLike Span>
requires (!MdspanLike<Span> && !uni20::Complex<std::remove_cv_t<typename Span::element_type>>)
constexpr auto conj (Span const &span)
 Return a read-only identity view for a non-complex deferred view.
 
template<TensorView Tensor>
requires (std::is_lvalue_reference_v<Tensor &&> && Complex<tensor_element_t<Tensor>>)
constexpr auto conj (Tensor &&tensor)
 Return a lazy read-only conjugating view of a complex tensor lvalue.
 
template<TensorView Tensor>
requires (std::is_lvalue_reference_v<Tensor &&> && !Complex<tensor_element_t<Tensor>>)
constexpr auto conj (Tensor &&tensor) noexcept -> std::remove_reference_t< Tensor > const &
 Return a read-only identity view of a non-complex tensor lvalue.
 
template<AsyncTensorOutput Tensor>
void conjugate_inplace (async::Async< Tensor > &tensor)
 Schedule eager in-place conjugation using static Tensor policy.
 
template<class BackendSelector , MutableMdspecLike Mdspec>
void conjugate_inplace (BackendSelector &&selector, Mdspec &&span)
 Conjugate a mutable mdspec-like object through an explicit backend selector.
 
template<class BackendSelector , MutableTensorView Tensor>
void conjugate_inplace (BackendSelector &&selector, Tensor &&tensor)
 Conjugate a mutable tensor view through an explicit backend selector.
 
template<class BackendSelector , AsyncTensorOutput Tensor>
void conjugate_inplace (BackendSelector selector, async::Async< Tensor > &tensor)
 Schedule eager in-place conjugation through an explicit selector.
 
template<MutableTensorView Tensor>
void conjugate_inplace (Tensor &&tensor)
 Conjugate a mutable tensor view using its storage policy's backend selector.
 
template<MdspanLike Span, class... Index>
requires detail::MdspanIndexPack<Span, Index...>
constexpr decltype(auto) const_access (Span const &span, Index... indices)
 Access one mdspan element through a read-only adaptation of its stored accessor.
 
template<AccessorPolicy Acc>
requires (!std::is_const_v<typename Acc::element_type> && std::is_same_v<typename Acc::reference, typename Acc::element_type&>)
constexpr auto const_accessor (Acc const &acc)
 Wrap any accessor whose reference is T& into a const adaptor.
 
template<AccessorPolicy Acc>
requires (std::is_const_v<typename Acc::element_type> && !is_default_accessor_v<Acc>)
constexpr Acc const_accessor (Acc const &acc)
 Return an accessor unchanged when its element type is already const.
 
template<class ElementType , class Extents >
requires (!std::is_const_v<ElementType>)
UNI20_HOST_DEVICE constexpr auto const_accessor (diagonal_accessor< ElementType, Extents > const &accessor)
 Convert a writable diagonal accessor to its read-only form.
 
template<class ElementType , class Extents >
requires std::is_const_v<ElementType>
UNI20_HOST_DEVICE constexpr auto const_accessor (diagonal_accessor< ElementType, Extents > const &accessor)
 Return an already read-only diagonal accessor unchanged.
 
template<typename T >
constexpr stdex::default_accessor< T const > const_accessor (stdex::default_accessor< T > const &accessor_policy)
 Wrap a default_accessor<T> into a const_default_accessor<T>.
 
template<std::size_t LeftAxis, std::size_t RightAxis, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, detail::default_pairwise_storage_t<LeftTensor>>, LeftTensor, RightTensor> && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
auto contract (LeftTensor const &left, RightTensor const &right)
 Contract one adjacent BlockTensor factor pair into an owning result.
 
template<std::size_t LeftAxis, std::size_t RightAxis, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::AsyncMatrixContractionSource<LeftTensor> && detail::AsyncMatrixContractionSource<RightTensor> && detail::AsyncMatrixContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, typename std::remove_cvref_t<LeftTensor>::storage_policy>, LeftTensor, RightTensor> && (detail::is_async_matrix_product_geometry<detail::PairwiseContractionTraits<LeftTensor, RightTensor>>()) && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
auto contract (LeftTensor const &left, RightTensor const &right)
 Schedule independent dense-block matrix products for an adjacent contraction.
 
template<std::size_t LeftAxis, std::size_t RightAxis, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor> && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
void contract (OutputTensor &output, LeftTensor const &left, RightTensor const &right)
 Overwrite a fixed BlockTensor with one adjacent pairwise contraction.
 
template<std::size_t LeftAxis, std::size_t RightAxis, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::AsyncMatrixContractionSource<LeftTensor> && detail::AsyncMatrixContractionSource<RightTensor> && detail::AsyncMatrixFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor> && (detail::is_async_matrix_product_geometry<detail::PairwiseContractionTraits<LeftTensor, RightTensor>>()) && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
void contract (OutputTensor &output, LeftTensor const &left, RightTensor const &right)
 Schedule an adjacent pairwise contraction into fixed async BlockTensor storage.
 
template<std::size_t ContractedCount, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && (ContractedCount > 0) && (ContractedCount <= std::remove_cvref_t<LeftTensor>::codomain_type::size()) && (ContractedCount <= std::remove_cvref_t<RightTensor>::domain_type::size()) && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, detail::default_pairwise_storage_t<LeftTensor>>, LeftTensor, RightTensor, ContractedCount>
auto contract_adjacent (LeftTensor const &left, RightTensor const &right)
 Contract an adjacent group of BlockTensor boundary factors.
 
template<std::size_t ContractedCount, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && (ContractedCount > 0) && (ContractedCount <= std::remove_cvref_t<LeftTensor>::codomain_type::size()) && (ContractedCount <= std::remove_cvref_t<RightTensor>::domain_type::size()) && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor, ContractedCount>
void contract_adjacent (OutputTensor &output, LeftTensor const &left, RightTensor const &right)
 Overwrite a fixed BlockTensor with an adjacent group contraction.
 
template<class TargetExtents , TensorExtentsLike SourceExtents>
TargetExtents convert_tensor_extents (SourceExtents const &source)
 Convert tensor extents while validating the target's static extents.
 
template<class OutputTensor , class InputTensor >
requires detail::AsyncCopyTensors<OutputTensor, InputTensor>
void copy (async::Async< OutputTensor > &output, async::Async< InputTensor > const &input)
 Schedule a Tensor copy using the storage backend list.
 
template<class BackendSelector , class OutputMdspan , class InputMdspan >
requires detail::CopySpans<OutputMdspan, InputMdspan>
void copy (BackendSelector &&selector, OutputMdspan &&output, InputMdspan &&input)
 Copy between fixed-shape mdspan-like operands through an explicit selector.
 
template<class BackendSelector , class OutputTensor , class InputTensor >
requires detail::CopyTensors<OutputTensor, InputTensor>
void copy (BackendSelector &&selector, OutputTensor &&output, InputTensor const &input)
 Copy into a resizable or already-compatible tensor through an explicit selector.
 
template<class BackendSelector , class OutputTensor , class InputTensor >
requires detail::AsyncCopyTensors<OutputTensor, InputTensor>
void copy (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< InputTensor > const &input)
 Schedule a Tensor copy through an explicit backend selector.
 
template<MutableBlockTensorView Output, BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void copy (Output &output, Input const &input)
 Copy a BlockTensor value into an existing fixed output structure.
 
template<class OutputTensor , class InputTensor >
requires detail::CopyTensors<OutputTensor, InputTensor>
void copy (OutputTensor &&output, InputTensor const &input)
 Copy into a tensor using the operands' default backend selector.
 
mpreal copysign (mpreal const &magnitude, mpreal const &sign)
 Transfer the sign while preserving the magnitude's precision and exactness.
 
mpreal copysign (mpreal const &magnitude, mpreal const &sign, Precision p)
 Round the magnitude to p and transfer the sign; sign precision is immaterial.
 
mpcomplex cos (mpcomplex const &z)
 
mpcomplex cos (mpcomplex const &z, Precision p)
 Evaluate cos(z.at(p)), returning an approximation at finite precision p.
 
mpreal cos (mpreal const &x)
 
mpreal cos (mpreal const &x, Precision p)
 Evaluate cos(x.at(p)), returning an approximation at finite precision p.
 
mpcomplex cosh (mpcomplex const &z)
 Hyperbolic cosine at the input precision; exact zero returns exact one.
 
mpcomplex cosh (mpcomplex const &z, Precision p)
 Evaluate cosh(z.at(p)), returning an approximation at finite precision p.
 
mpreal cosh (mpreal const &x)
 Hyperbolic cosine; retain input precision or a supported exact result.
 
mpreal cosh (mpreal const &x, Precision p)
 Evaluate cosh(x.at(p)), returning an approximation at finite precision p.
 
mpreal cospi (mpreal const &x)
 Cosine of pi times x, with provider argument reduction.
 
mpreal cospi (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate cospi at p.
 
mpreal cot (mpreal const &x)
 Reciprocal tangent, evaluated directly by MPFR.
 
mpreal cot (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate cot at p.
 
mpreal coth (mpreal const &x)
 Reciprocal hyperbolic tangent, evaluated directly by MPFR.
 
mpreal coth (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate coth at p.
 
mpreal csc (mpreal const &x)
 Reciprocal sine, evaluated directly by MPFR.
 
mpreal csc (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate csc at p.
 
mpreal csch (mpreal const &x)
 Reciprocal hyperbolic sine, evaluated directly by MPFR.
 
mpreal csch (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate csch at p.
 
auto degree (QNum const &q) -> int
 Return the integral degree of a quantum number.
 
constexpr auto degree (U1 value) -> int
 Return the integral degree of a U(1) irrep.
 
template<class ElementType , class Extents , class LayoutPolicy , class AccessorExtents >
requires (Extents::rank() == AccessorExtents::rank())
constexpr auto diagonal_components (stdex::mdspan< ElementType, Extents, LayoutPolicy, diagonal_accessor< ElementType, AccessorExtents > > const &span)
 Expose the physically stored values of a generalized-diagonal mdspan.
 
mpreal digamma (mpreal const &x)
 Logarithmic derivative of Gamma; finite working precision is required.
 
mpreal digamma (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate digamma at p.
 
mpreal dilog_real (mpreal const &x)
 Real part of the dilogarithm; this is not a complex branch-valued API.
 
mpreal dilog_real (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate dilog_real at p.
 
template<class... Spaces>
 Domain (Spaces &&...) -> Domain< std::remove_cvref_t< Spaces >... >
 Deduce a domain's concrete value types.
 
template<class SpaceType >
auto dual (Dual< SpaceType > &&space) -> SpaceType
 Remove explicit duality while moving a dual-space value.
 
template<class SpaceType >
auto dual (Dual< SpaceType > const &space) -> SpaceType
 Remove explicit duality from a dual-space value.
 
auto dual (QNum const &q) -> QNum
 Return the dual irrep of a quantum number.
 
template<class SpaceType >
 Dual (SpaceType &&) -> Dual< std::remove_cvref_t< SpaceType > >
 
template<Space SpaceType>
requires (!DualSpace<SpaceType>)
auto dual (SpaceType &&space) -> Dual< std::remove_cvref_t< SpaceType > >
 Construct an explicitly dual basis by moving a space value.
 
template<Space SpaceType>
requires (!DualSpace<SpaceType>)
auto dual (SpaceType const &space) -> Dual< std::remove_cvref_t< SpaceType > >
 Construct an explicitly dual basis without changing occurrence order.
 
constexpr auto dual (U1 value) -> U1
 Return the dual U(1) irrep.
 
template<detail::ThetaReal R>
theta_constant_result< R > elliptic_theta_constant (unsigned kind, R const &t, Precision p, std::size_t max_terms=4096)
 Convert t to explicit precision p, then evaluate its scaled theta constant.
 
template<detail::ThetaReal R>
theta_constant_result< R > elliptic_theta_constant (unsigned kind, R const &t, std::size_t max_terms=4096)
 Evaluate theta_kind(0 | i*t), kind=2,3,4 and finite t>0, in scaled form.
 
template<Complex C>
requires detail::ThetaReal<make_real_t<C>>
theta_jet_result< C > elliptic_theta_jet (unsigned kind, C const &u, make_real_t< C > const &t, Precision p, std::size_t max_terms=4096)
 Convert both arguments to p before evaluating the scaled theta jet.
 
template<Complex C>
requires detail::ThetaReal<make_real_t<C>>
theta_jet_result< C > elliptic_theta_jet (unsigned kind, C const &u, make_real_t< C > const &t, std::size_t max_terms=4096)
 Evaluate theta_kind(pi*u | i*t) and its first two u derivatives.
 
template<Complex C>
requires detail::ThetaReal<make_real_t<C>>
C elliptic_theta_ratio (theta_jet_result< C > const &a, unsigned da, theta_jet_result< C > const &b, unsigned db)
 Ratio of two scaled theta derivatives without reconstructing either jet.
 
mpreal epsilon (Precision precision)
 Spacing above one for a specified binary working precision.
 
mpreal erf (mpreal const &x)
 Error function, retaining exact zero or the input precision.
 
mpreal erf (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate erf at p.
 
mpreal erfc (mpreal const &x)
 Complementary error function, evaluated without subtracting erf from one.
 
mpreal erfc (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate erfc at p.
 
mpcomplex exp (mpcomplex const &z)
 
mpcomplex exp (mpcomplex const &z, Precision p)
 Evaluate exp(z.at(p)), returning an approximation at finite precision p.
 
mpreal exp (mpreal const &x)
 
mpreal exp (mpreal const &x, Precision p)
 Evaluate exp(x.at(p)), returning an approximation at finite precision p.
 
mpreal exp10 (mpreal const &x)
 Base-ten exponential.
 
mpreal exp10 (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate exp10 at p.
 
mpreal exp10m1 (mpreal const &x)
 Ten to the power x minus one, using the cancellation-safe provider.
 
mpreal exp10m1 (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate exp10m1 at p.
 
mpreal exp2 (mpreal const &x)
 Base-two exponential; retain input precision or a supported exact result.
 
mpreal exp2 (mpreal const &x, Precision p)
 Evaluate exp2(x.at(p)), returning an approximation at finite precision p.
 
mpreal exp2m1 (mpreal const &x)
 Two to the power x minus one, using the cancellation-safe provider.
 
mpreal exp2m1 (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate exp2m1 at p.
 
mpreal expint (mpreal const &x)
 Real exponential integral Ei, with its real principal-value meaning.
 
mpreal expint (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate expint at p.
 
mpreal expm1 (mpreal const &x)
 Exponential minus one without cancellation; retain input precision or exact zero.
 
mpreal expm1 (mpreal const &x, Precision p)
 Evaluate expm1(x.at(p)), returning an approximation at finite precision p.
 
template<StridedMdspanLike AType, StridedMdspanLike BType, StridedMdspanLike CType, std::size_t N>
auto extract_strides (AType const &A, BType const &B, std::array< std::pair< std::size_t, std::size_t >, N > const &contractDims, CType const &C)
 Extract merged stride groups for a tensor contraction.
 
template<Scalar ElementType, std::integral... Extents>
auto eye (Extents... extents)
 Return a generated tensor equal to one exactly when all indices agree.
 
template<detail::native_math::NativeReal R, detail::MathInteger I>
R factorial (I n)
 Factorial of a checked nonnegative integer, with an explicit native result type.
 
template<detail::native_math::NativeReal R, detail::MathInteger I>
R factorial (I n, Precision p)
 Typed factorial factory with a checked native precision argument.
 
template<detail::MathInteger I>
mpreal factorial (I n, Precision p)
 Factorial of a nonnegative integer, at an explicitly chosen arithmetic state.
 
mpreal fdim (mpreal const &a, mpreal const &b)
 Positive difference max(a-b,0), propagating NaNs.
 
mpreal fdim (mpreal const &a, mpreal const &b, Precision p)
 Positive difference with one rounding at p, without input conversion.
 
template<AsyncTensorOutput OutputTensor, class Value >
void fill (async::Async< OutputTensor > &output, Value &&value)
 Fill an existing async Tensor without reading its old values.
 
template<class BackendSelector , class Output , class Value >
requires (detail::OverwriteTransformSpans<Output> || MutableTensorView<Output>)
void fill (BackendSelector &&selector, Output &&output, Value &&value)
 Fill a fixed-shape mdspan or Tensor without reading its old values.
 
template<class BackendSelector , AsyncTensorOutput OutputTensor, class Value >
void fill (BackendSelector selector, async::Async< OutputTensor > &output, Value &&value)
 Fill an existing async Tensor without reading its old values.
 
template<MutableTensorView Output, class Value >
void fill (Output &&output, Value &&value)
 Fill a fixed-shape Tensor without reading its old values.
 
mpreal floor (mpreal const &x)
 Round toward negative infinity; exact inputs produce exact integers.
 
mpreal floor (mpreal const &x, Precision p)
 Round toward negative infinity, then round the result to finite precision p.
 
mpreal fma (mpreal const &a, mpreal const &b, mpreal const &c)
 Compute a*b+c with one rounding, including mixed exact rational operands.
 
mpreal fma (mpreal const &a, mpreal const &b, mpreal const &c, Precision p)
 Round a*b+c once at p, without converting operands first.
 
mpreal fmax (mpreal const &a, mpreal const &b)
 Maximum with NaN suppression and positive-zero preference.
 
mpreal fmax (mpreal const &a, mpreal const &b, Precision p)
 Select the maximum before rounding it to result precision p.
 
mpreal fmin (mpreal const &a, mpreal const &b)
 Minimum with NaN suppression and negative-zero preference.
 
mpreal fmin (mpreal const &a, mpreal const &b, Precision p)
 Select the minimum before rounding it to result precision p.
 
mpreal fmod (mpreal const &a, mpreal const &b)
 Truncating-quotient remainder; exact operands retain exact rational results.
 
mpreal fmod (mpreal const &a, mpreal const &b, Precision p)
 Truncating-quotient remainder, rounding only the result at p.
 
template<Complex T>
std::string format_complex (T const &value, scalar_format_options const &options={})
 Format a Uni20 complex scalar as real+imagi.
 
template<Real T>
std::string format_real (T value, scalar_format_options const &options={})
 Format a Uni20 real scalar.
 
template<RealOrComplex T>
std::string format_scalar (T const &value, scalar_format_options const &options={})
 Format any Uni20 real or complex scalar.
 
frexp_result< mpreal > frexp (mpreal const &x)
 Decompose into a binary fraction and signed 64-bit exponent.
 
frexp_result< mpreal > frexp (mpreal const &x, Precision p)
 Decompose and round the fraction at p, normalizing any rounding carry.
 
template<std::signed_integral T>
constexpr auto from_twice (T twice_value) -> basic_half_int< T >
 Construct a half-integer from its doubled representation.
 
template<Scalar ElementType, std::integral... Extents>
auto full (ElementType value, Extents... extents)
 Return a generated tensor filled with one scalar value.
 
template<Scalar S>
constexpr auto herm (S x)
 Computes the Hermitian adjoint of a scalar value.
 
mpreal hypot (mpreal const &x, mpreal const &y)
 
mpreal hypot (mpreal const &x, mpreal const &y, Precision p)
 Evaluate hypot(x.at(p), y.at(p)), overriding both operands' precisions.
 
std::int64_t ilogb (mpreal const &x)
 Base-two exponent of a finite nonzero value.
 
template<typename T >
constexpr T & imag (detail::standard_complex< T > &z) noexcept
 Provides mutable access to the imaginary component of a uni20::complex value.
 
mpreal imag (mpcomplex const &z)
 
template<TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto inner_product (async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs)
 Return an async storage-preserving Tensor inner product using static Tensor policy.
 
template<AsyncTensorOutput OutputTensor, TensorView LhsTensor, TensorView RhsTensor>
requires MutableScalarTensorView<OutputTensor> && detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void inner_product (async::Async< OutputTensor > &output, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs)
 Schedule an inner product into an explicit async scalar Tensor using storage policy.
 
template<class BackendSelector , class LhsTensor , class RhsTensor >
requires (!TensorView<BackendSelector>) && detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto inner_product (BackendSelector &&selector, LhsTensor const &lhs, RhsTensor const &rhs)
 Return a storage-preserving rank-zero Tensor inner product.
 
template<class BackendSelector , MutableRankedMdspanLike< 0 > OutputSpan, class LhsSpan , class RhsSpan >
requires detail::CompatibleInnerProductSpans<LhsSpan, RhsSpan> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, typename std::remove_cvref_t<LhsSpan>::value_type>
void inner_product (BackendSelector &&selector, OutputSpan &&output, LhsSpan &&lhs, RhsSpan &&rhs)
 Compute an mdspan inner product into a rank-zero output.
 
template<class BackendSelector , MutableScalarTensorView OutputTensor, class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void inner_product (BackendSelector &&selector, OutputTensor &&output, LhsTensor const &lhs, RhsTensor const &rhs)
 Compute a tensor view inner product into an existing scalar tensor.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto inner_product (BackendSelector selector, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs)
 Return an async storage-preserving Tensor inner product through an explicit selector.
 
template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView LhsTensor, TensorView RhsTensor>
requires MutableScalarTensorView<OutputTensor> && detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void inner_product (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs)
 Schedule an inner product into an explicit async scalar Tensor.
 
template<BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Lhs, Rhs> && RealOrComplex<block_tensor_value_t<Lhs>> && ((!AsyncBlockTensorView<Lhs> && !AsyncBlockTensorView<Rhs>) || (AsyncBlockTensorView<Lhs> && AsyncBlockTensorView<Rhs>))
auto inner_product (Lhs const &lhs, Rhs const &rhs)
 Return the BlockTensor inner product in a host rank-zero Tensor.
 
template<class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto inner_product (LhsTensor const &lhs, RhsTensor const &rhs)
 Return a storage-preserving rank-zero Tensor inner product using storage policy.
 
template<MutableScalarTensorView OutputTensor, class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void inner_product (OutputTensor &&output, LhsTensor const &lhs, RhsTensor const &rhs)
 Compute a tensor view inner product into an existing scalar tensor using storage policy.
 
template<TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto inner_product_host (async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs)
 Return a nonblocking async host C++ scalar inner product using static Tensor policy.
 
template<class BackendSelector , class LhsSpan , class RhsSpan >
requires detail::CompatibleInnerProductSpans<LhsSpan, RhsSpan>
auto inner_product_host (BackendSelector &&selector, LhsSpan &&lhs, RhsSpan &&rhs) -> typename std::remove_cvref_t< LhsSpan >::value_type
 Return an mdspan inner product as a host C++ scalar.
 
template<class BackendSelector , class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto inner_product_host (BackendSelector &&selector, LhsTensor const &lhs, RhsTensor const &rhs) -> tensor_element_t< LhsTensor >
 Return a Tensor inner product as a host C++ scalar through an explicit selector.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto inner_product_host (BackendSelector selector, async::Async< LhsTensor > const &lhs, async::Async< RhsTensor > const &rhs)
 Return a nonblocking async host C++ scalar inner product through an explicit selector.
 
template<BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Lhs, Rhs> && RealOrComplex<block_tensor_value_t<Lhs>> && ((!AsyncBlockTensorView<Lhs> && !AsyncBlockTensorView<Rhs>) || (AsyncBlockTensorView<Lhs> && AsyncBlockTensorView<Rhs>))
auto inner_product_host (Lhs const &lhs, Rhs const &rhs) -> block_tensor_value_t< Lhs >
 Return the conjugate-linear BlockTensor inner product as a host scalar.
 
template<class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto inner_product_host (LhsTensor const &lhs, RhsTensor const &rhs) -> tensor_element_t< LhsTensor >
 Return a Tensor inner product as a host C++ scalar using storage policy.
 
template<class T >
constexpr bool is_exact (detail::standard_complex< T > const &x)
 A standard complex value is exact only when both components are exact.
 
template<class T >
requires (requires(T const& x) { x.is_exact(); } || has_numeric_limits_v<T>)
constexpr bool is_exact (T const &x)
 Query a value's exact-arithmetic state, or its type's static exactness.
 
auto is_identity (QNum const &q) -> bool
 Return whether a quantum number is the identity irrep.
 
template<std::signed_integral T>
constexpr auto is_integral (basic_half_int< T > value) -> bool
 Return whether a half-integer value is integral.
 
template<std::signed_integral T>
constexpr auto is_triangle (basic_half_int< T > a, basic_half_int< T > b, basic_half_int< T > c) -> bool
 Return whether three nonnegative half-integers satisfy the triangle condition.
 
template<Complex C>
constexpr bool isfinite (C const &z)
 Returns whether both components of a complex scalar are finite.
 
template<Integer I>
constexpr bool isfinite (I const &x) noexcept
 Returns whether an integer scalar is finite.
 
bool isfinite (mpcomplex const &z)
 
bool isfinite (mpreal const &x)
 
template<Real R>
constexpr bool isfinite (R const &x)
 Returns whether a real scalar is neither NaN nor positive/negative infinity.
 
bool isinf (mpcomplex const &z)
 
bool isinf (mpreal const &x)
 
bool isnan (mpcomplex const &z)
 
bool isnan (mpreal const &x)
 
template<detail::MathInteger I>
mpreal ldexp (mpreal const &x, I exponent)
 Multiply by 2^exponent, preserving exact rational state or input precision.
 
template<detail::MathInteger I>
mpreal ldexp (mpreal const &x, I exponent, Precision p)
 Multiply the original value by 2^exponent and round the result at p.
 
mpreal lgamma (mpreal const &x)
 Natural logarithm of abs(Gamma(x)), including negative Gamma values.
 
mpreal lgamma (mpreal const &x, Precision p)
 Convert x to p, then evaluate log(abs(Gamma(x))) at p.
 
lgamma_result< mpreal > lgamma_sign (mpreal const &x)
 Log(abs(Gamma(x))) and the sign of Gamma, as owning values.
 
lgamma_result< mpreal > lgamma_sign (mpreal const &x, Precision p)
 Convert x to p, then evaluate log-absolute-Gamma and its sign.
 
mpcomplex log (mpcomplex const &z)
 Principal logarithm, with the sign of imaginary zero selecting the cut side.
 
mpcomplex log (mpcomplex const &z, Precision p)
 Evaluate log(z.at(p)), returning an approximation at finite precision p.
 
mpreal log (mpreal const &x)
 
mpreal log (mpreal const &x, Precision p)
 Evaluate log(x.at(p)), returning an approximation at finite precision p.
 
mpreal log10 (mpreal const &x)
 Base-ten logarithm; retain input precision or a supported exact result.
 
mpreal log10 (mpreal const &x, Precision p)
 Evaluate log10(x.at(p)), returning an approximation at finite precision p.
 
mpreal log10p1 (mpreal const &x)
 Base-ten logarithm of one plus x, without rounding the sum first.
 
mpreal log10p1 (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate log10p1 at p.
 
mpreal log1p (mpreal const &x)
 Logarithm of one plus x without cancellation; retain input precision or exact zero.
 
mpreal log1p (mpreal const &x, Precision p)
 Evaluate log1p(x.at(p)), returning an approximation at finite precision p.
 
mpreal log2 (mpreal const &x)
 Base-two logarithm; retain input precision or a supported exact result.
 
mpreal log2 (mpreal const &x, Precision p)
 Evaluate log2(x.at(p)), returning an approximation at finite precision p.
 
mpreal log2p1 (mpreal const &x)
 Base-two logarithm of one plus x, without rounding the sum first.
 
mpreal log2p1 (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate log2p1 at p.
 
template<typename... Spans>
auto make_common_extents (Spans... spans)
 Build an extents object representing the common shape of the given spans.
 
template<MdspanLike Span>
constexpr auto make_const_mdspan (Span const &span)
 Build a read-only mdspan descriptor over the same storage and mapping.
 
template<class Extents , class Components >
requires RankedStridedMdspanLike<Components, 1> && DefaultAccessorMdspanLike<Components>
constexpr auto make_diagonal_mdspan (Extents logical_extents, Components const &components)
 Present rank-one strided components as a full generalized-diagonal mdspan.
 
template<typename Mapping >
auto make_iteration_plan_with_offset (Mapping const &mapping)
 Construct a merged iteration plan and offset for a single mapping.
 
template<typename... Mappings>
auto make_multi_iteration_plan (std::tuple< Mappings... > const &mappings)
 Build a merged iteration plan for multiple tensors sharing the same extents.
 
auto make_qnum (Symmetry sym, std::initializer_list< std::pair< std::string_view, U1 > > values) -> QNum
 Construct a packed QNum from named U(1) component values.
 
template<uni20::Real Real>
auto make_svd_selection (std::span< BlockSvdState< Real > const > spectrum, std::span< BlockSvdStateId const > requested) -> BlockSvdSelection< Real >
 Build an arbitrary paired-state selection and its exact statistics.
 
template<TensorView InputTensor>
auto make_tensor (async::Async< InputTensor > const &input)
 Materialize an async Tensor view as an independent owning host Tensor.
 
template<class RequestedLayout = void, class BackendSelector , MdspanLike InputMdspan>
auto make_tensor (BackendSelector &&selector, InputMdspan &&input)
 Materialize a bare mdspan-like view as an inferred owning host tensor.
 
template<class RequestedLayout = void, TensorView InputTensor>
auto make_tensor (InputTensor const &input)
 Materialize a tensor view as an inferred owning host tensor.
 
template<class Decomposition , detail::BlockSvdStateSelection Selection>
auto materialize_left_singular_vectors (Decomposition const &decomposition, Selection const &selection, BlockSvdMaterializationOptions options={})
 Materialize selected left singular vectors, including full null-space vectors.
 
template<class Decomposition , detail::BlockSvdStateSelection Selection>
auto materialize_right_singular_vectors_adjoint (Decomposition const &decomposition, Selection const &selection, BlockSvdMaterializationOptions options={})
 Materialize selected right singular vectors adjoint, including full null-space vectors.
 
template<class Decomposition >
auto materialize_svd (Decomposition const &decomposition, BlockSvdSelection< typename Decomposition::real_type > const &selection, BlockSvdMaterializationOptions options={})
 Materialize paired left, singular-value, and right-adjoint factors.
 
template<class Tensor >
requires ( !requires(Tensor& tensor) { tensor.mdspec(); } && requires(Tensor& tensor) { tensor.mdspan(); })
constexpr decltype(auto) mdspec_of (Tensor &tensor) noexcept(noexcept(tensor.mdspan()))
 Return an immediate tensor's mdspan as its mdspec representation.
 
template<class Tensor >
requires requires(Tensor& tensor) { tensor.mdspec(); }
constexpr decltype(auto) mdspec_of (Tensor &tensor) noexcept(noexcept(tensor.mdspec()))
 Return a tensor's immediate or descriptor-backed multidimensional metadata.
 
template<typename Extents , std::size_t R>
requires (Extents::rank() == R)
static_vector< extent_strides< 2 >, R > merge_strides_left (Extents const &ext, std::array< std::ptrdiff_t, R > const &Stride1, std::array< std::ptrdiff_t, R > const &Stride2)
 Build and merge stride metadata from two stride arrays favouring column-major (left) order.
 
template<std::size_t N, std::size_t R>
void merge_strides_left (static_vector< extent_strides< N >, R > &out)
 Merge adjacent stride descriptors in place using column-major (left) ordering.
 
template<typename Extents , std::size_t R>
requires (Extents::rank() == R)
static_vector< extent_strides< 2 >, R > merge_strides_right (Extents const &ext, std::array< std::ptrdiff_t, R > const &Stride1, std::array< std::ptrdiff_t, R > const &Stride2)
 Build and merge stride metadata from two stride arrays favouring row-major (right) order.
 
template<std::size_t N, std::size_t R>
void merge_strides_right (static_vector< extent_strides< N >, R > &out)
 Merge adjacent stride descriptors in place using row-major (right) ordering.
 
std::string metadata_line (std::string_view text)
 Escape control bytes for a single human-readable metadata line.
 
presentation::report_builder metadata_report (metadata_document const &document, std::string title={}, bool detail=false)
 Render ordered groups without using display strings as the machine metadata source.
 
template<std::integral T>
constexpr auto minus1pow (T value) -> int
 Return (-1)^x for an integral exponent.
 
modf_result< mpreal > modf (mpreal const &x)
 Signed fractional and integral parts, using truncation toward zero.
 
modf_result< mpreal > modf (mpreal const &x, Precision p)
 Decompose the original value and round each result component at p.
 
double multiply (double a, double b)
 
template<class T >
requires (!has_runtime_precision_v<std::remove_cvref_t<T>>) && requires { numeric_limits<detail::precision_component_t<T>>::digits(); numeric_limits<detail::precision_component_t<T>>::is_exact; }
constexpr Precision native_precision ()
 Concrete precision of a fixed scalar family, including complex components.
 
mpreal next_down (mpreal const &x)
 Next value toward negative infinity on the input's finite grid.
 
mpreal next_down (mpreal const &x, Precision p)
 Select grid p by rounding x, then move toward negative infinity.
 
mpreal next_up (mpreal const &x)
 Next value toward positive infinity on the input's finite grid.
 
mpreal next_up (mpreal const &x, Precision p)
 Select grid p by rounding x, then move toward positive infinity.
 
mpreal nextafter (mpreal const &x, mpreal const &direction)
 Adjacent value on x's grid toward direction, whose precision may differ.
 
mpreal nextafter (mpreal const &x, mpreal const &direction, Precision p)
 Round x onto grid p, then step toward the unrounded direction.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto norm (async::Async< InputTensor > const &input)
 Return an async storage-preserving real Tensor norm using static Tensor policy.
 
template<AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void norm (async::Async< OutputTensor > &output, async::Async< InputTensor > const &input)
 Schedule a Euclidean norm into an explicit async scalar Tensor using storage policy.
 
template<class BackendSelector , TensorView InputTensor>
requires (!TensorView<BackendSelector>) && RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto norm (BackendSelector &&selector, InputTensor const &input)
 Return a storage-preserving real rank-zero Tensor Euclidean norm.
 
template<class BackendSelector , MutableRankedMdspanLike< 0 > OutputSpan, MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, make_real_t<typename std::remove_cvref_t<InputSpan>::value_type>>
void norm (BackendSelector &&selector, OutputSpan &&output, InputSpan &&input)
 Compute an mdspan Euclidean norm into a real rank-zero output.
 
template<class BackendSelector , MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void norm (BackendSelector &&selector, OutputTensor &&output, InputTensor const &input)
 Compute a tensor view Euclidean norm into an existing real scalar tensor.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto norm (BackendSelector selector, async::Async< InputTensor > const &input)
 Return an async storage-preserving real Tensor norm through an explicit selector.
 
template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void norm (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< InputTensor > const &input)
 Schedule a Euclidean norm into an explicit async scalar Tensor.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto norm (InputTensor const &input)
 Return a storage-preserving real rank-zero Tensor Euclidean norm using storage policy.
 
mpreal norm (mpcomplex const &z)
 
mpreal norm (mpcomplex const &z, Precision p)
 Evaluate norm(z.at(p)), returning an approximation at finite precision p.
 
template<MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void norm (OutputTensor &&output, InputTensor const &input)
 Compute a tensor view Euclidean norm into an existing real scalar tensor using storage policy.
 
template<BlockTensorView Tensor>
requires RealOrComplex<block_tensor_value_t<Tensor>>
auto norm (Tensor const &tensor)
 Return the Euclidean BlockTensor norm in a host rank-zero Tensor.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto norm_host (async::Async< InputTensor > const &input)
 Return a nonblocking async host C++ scalar norm using static Tensor policy.
 
template<class BackendSelector , MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type>
auto norm_host (BackendSelector &&selector, InputSpan &&input) -> make_real_t< typename std::remove_cvref_t< InputSpan >::value_type >
 Return an mdspan Euclidean norm as a host C++ scalar.
 
template<class BackendSelector , TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto norm_host (BackendSelector &&selector, InputTensor const &input) -> make_real_t< tensor_element_t< InputTensor > >
 Return a Tensor Euclidean norm as a host C++ scalar through an explicit selector.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto norm_host (BackendSelector selector, async::Async< InputTensor > const &input)
 Return a nonblocking async host C++ scalar norm through an explicit selector.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto norm_host (InputTensor const &input) -> make_real_t< tensor_element_t< InputTensor > >
 Return a Tensor Euclidean norm as a host C++ scalar using storage policy.
 
template<BlockTensorView Tensor>
requires RealOrComplex<block_tensor_value_t<Tensor>>
auto norm_host (Tensor const &tensor) -> make_real_t< block_tensor_value_t< Tensor > >
 Return the Euclidean BlockTensor norm as a host scalar.
 
template<Scalar ElementType, std::integral... Extents>
auto ones (Extents... extents)
 Return a generated tensor filled with scalar ones.
 
template<std::signed_integral T>
constexpr auto operator* (basic_half_int< T > lhs, basic_half_int< T > rhs) -> double
 Multiply two half-integer values as floating-point numbers.
 
template<std::signed_integral T, std::integral U>
constexpr auto operator* (basic_half_int< T > lhs, U rhs) -> basic_half_int< T >
 Multiply a half-integer value by an integral scalar.
 
exact_rational operator* (exact_rational const &a, exact_rational const &b)
 
mpcomplex operator* (exact_rational const &a, mpcomplex const &b)
 
mpreal operator* (exact_rational const &a, mpreal const &b)
 
mpcomplex operator* (mpcomplex const &a, exact_rational const &b)
 
mpcomplex operator* (mpcomplex const &a, mpcomplex const &b)
 
mpreal operator* (mpreal const &a, exact_rational const &b)
 
mpreal operator* (mpreal const &a, mpreal const &b)
 
template<std::integral U, std::signed_integral T>
constexpr auto operator* (U lhs, basic_half_int< T > rhs) -> basic_half_int< T >
 Multiply an integral scalar by a half-integer value.
 
template<std::signed_integral T>
constexpr auto operator+ (basic_half_int< T > lhs, basic_half_int< T > rhs) -> basic_half_int< T >
 Add two half-integer values.
 
exact_rational operator+ (exact_rational const &a)
 
exact_rational operator+ (exact_rational const &a, exact_rational const &b)
 
mpcomplex operator+ (exact_rational const &a, mpcomplex const &b)
 
mpreal operator+ (exact_rational const &a, mpreal const &b)
 
mpcomplex operator+ (mpcomplex const &a, exact_rational const &b)
 
mpcomplex operator+ (mpcomplex const &a, mpcomplex const &b)
 
mpcomplex operator+ (mpcomplex const &x)
 
mpreal operator+ (mpreal const &a)
 
mpreal operator+ (mpreal const &a, exact_rational const &b)
 
mpreal operator+ (mpreal const &a, mpreal const &b)
 
auto operator+ (QNum const &lhs, QNum const &rhs) -> QNum
 Add two quantum numbers when the fusion result is uniquely defined.
 
constexpr auto operator+ (U1 lhs, U1 rhs) -> U1
 Add two U(1) irreps using charge addition.
 
template<std::signed_integral T>
constexpr auto operator- (basic_half_int< T > lhs, basic_half_int< T > rhs) -> basic_half_int< T >
 Subtract two half-integer values.
 
template<std::signed_integral T>
constexpr auto operator- (basic_half_int< T > value) -> basic_half_int< T >
 Negate a half-integer value.
 
exact_rational operator- (exact_rational const &a)
 
exact_rational operator- (exact_rational const &a, exact_rational const &b)
 
mpcomplex operator- (exact_rational const &a, mpcomplex const &b)
 
mpreal operator- (exact_rational const &a, mpreal const &b)
 
mpcomplex operator- (mpcomplex const &a, exact_rational const &b)
 
mpcomplex operator- (mpcomplex const &a, mpcomplex const &b)
 
mpcomplex operator- (mpcomplex const &x)
 
mpreal operator- (mpreal const &a)
 
mpreal operator- (mpreal const &a, exact_rational const &b)
 
mpreal operator- (mpreal const &a, mpreal const &b)
 
constexpr auto operator- (U1 lhs, U1 rhs) -> U1
 Subtract two U(1) irreps using charge subtraction.
 
template<std::signed_integral T, std::floating_point U>
constexpr auto operator/ (basic_half_int< T > lhs, U rhs) -> U
 Divide a half-integer value by a floating-point scalar.
 
exact_rational operator/ (exact_rational const &a, exact_rational const &b)
 
mpcomplex operator/ (exact_rational const &a, mpcomplex const &b)
 
mpreal operator/ (exact_rational const &a, mpreal const &b)
 
mpcomplex operator/ (mpcomplex const &a, exact_rational const &b)
 
mpcomplex operator/ (mpcomplex const &a, mpcomplex const &b)
 
mpreal operator/ (mpreal const &a, exact_rational const &b)
 
mpreal operator/ (mpreal const &a, mpreal const &b)
 
std::ostream & operator<< (std::ostream &os, exact_rational const &value)
 
std::ostream & operator<< (std::ostream &os, mpreal const &value)
 Stream the round-trip decimal representation, independent of stream precision.
 
template<std::signed_integral T>
auto operator<< (std::ostream &out, basic_half_int< T > value) -> std::ostream &
 Stream a half-integer in integer or .5 decimal form.
 
std::ostream & operator<< (std::ostream &out, mpcomplex const &z)
 
auto operator<< (std::ostream &out, U1 value) -> std::ostream &
 Stream a U(1) irrep in decimal half-integer form.
 
std::strong_ordering operator<=> (exact_rational const &a, exact_rational const &b)
 
std::partial_ordering operator<=> (mpreal const &a, exact_rational const &b)
 
template<std::integral I>
requires (!std::same_as<I, bool>)
std::partial_ordering operator<=> (mpreal const &a, I b)
 
std::partial_ordering operator<=> (mpreal const &a, mpreal const &b)
 Compare exact or stored approximate values without rounding either operand.
 
bool operator== (exact_rational const &a, exact_rational const &b)
 
bool operator== (mpcomplex const &a, exact_rational const &b)
 
bool operator== (mpcomplex const &a, mpcomplex const &b)
 
bool operator== (mpreal const &a, exact_rational const &b)
 
template<std::integral I>
requires (!std::same_as<I, bool>)
bool operator== (mpreal const &a, I b)
 
bool operator== (mpreal const &a, mpreal const &b)
 
template<std::signed_integral T>
auto operator>> (std::istream &in, basic_half_int< T > &value) -> std::istream &
 Parse a half-integer from integer, .0, .5, or n/2 form.
 
template<Real T>
T parse_real (std::string_view text)
 Parse a Uni20 real scalar from text.
 
constexpr std::optional< ScalarPrecision > parse_scalar_precision (std::string_view name)
 Parse a canonical scalar precision name independently of build availability.
 
template<std::size_t... Axis, class Tensor >
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::SidePreservingPermutation<Tensor, Axis...> && !BorrowedBlockTensorView<Tensor>)
auto permute (Tensor &&)=delete
 Permute a temporary borrowed BlockTensor view without retaining the intermediate view.
 
template<std::size_t... Axis, BorrowedBlockTensorView Tensor>
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::SidePreservingPermutation<Tensor, Axis...>)
auto permute (Tensor &&tensor)
 Permute a temporary borrowed BlockTensor view without retaining the intermediate view.
 
template<std::size_t... Axis, class Tensor >
requires detail::SidePreservingPermutation<Tensor, Axis...>
auto permute (Tensor &tensor) -> BlockTensorPermutationView< Tensor, Axis... >
 Permute bosonic BlockTensor factors without moving numerical payload.
 
mpcomplex pow (mpcomplex const &a, mpcomplex const &b)
 
mpcomplex pow (mpcomplex const &a, mpcomplex const &b, Precision p)
 Evaluate the principal power pow(a.at(p), b.at(p)) at finite precision p.
 
mpreal pow (mpreal const &x, mpreal const &y)
 
mpreal pow (mpreal const &x, mpreal const &y, Precision p)
 Evaluate pow(x.at(p), y.at(p)), overriding both operands' precisions.
 
template<class X , class Y >
requires ((std::same_as<X, exact_rational> || std::same_as<X, decimal_literal>) && (std::same_as<Y, exact_rational> || std::same_as<Y, decimal_literal>))
exact_rational pow (X const &base, Y const &power)
 Evaluate a rational power exactly when its real result is rational.
 
template<detail::MathInteger I>
mpreal pown (mpreal const &x, I exponent)
 Integer power, preserving exact rational results or the input's finite precision.
 
template<detail::MathInteger I>
mpreal pown (mpreal const &x, I exponent, Precision p)
 Integer power with one final rounding at p, without input conversion.
 
template<TensorView Input>
constexpr Precision precision_of (Input const &input)
 Resolve a tensor's default without reading elements; fixed types use native precision.
 
template<class T >
requires requires(T const& value) { value.precision(); } || requires { native_precision<T>(); }
constexpr Precision precision_of (T const &value)
 Read scalar precision without changing any scalar or provider state.
 
template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
Output & prepare_output (async::shared_storage< Output > &storage, RequiredExtents const &required)
 Construct or resize a deferred Tensor output to the required shape.
 
template<MutableTensorView Output, TensorExtentsLike RequiredExtents, class Placement >
requires std::constructible_from<Output, Placement const&, tensor_extents_t<Output> const&> && requires(Output& output, tensor_extents_t<Output> const& extents, Placement const& placement) { prepare_output(output, extents, placement); }
Output & prepare_output (async::shared_storage< Output > &storage, RequiredExtents const &required, Placement const &placement)
 Construct or replace a deferred Tensor output with compatible shape and storage.
 
template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
requires (!has_runtime_precision_v<tensor_element_t<Output>> || std::constructible_from<Output, uninitialized_t, tensor_extents_t<Output> const&, Precision>)
Output & prepare_output (async::shared_storage< Output > &storage, RequiredExtents const &required, Precision p)
 Construct or resize a deferred output at an explicit working precision.
 
template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
Output & prepare_output (Output &output, RequiredExtents const &required)
 Prepare a mutable tensor output with the specified shape.
 
template<MutableTensorView Output, TensorExtentsLike RequiredExtents, class Placement >
requires requires(Output& output, tensor_extents_t<Output> const& extents, Placement const& placement) { { output.storage_is_compatible(placement) } -> std::convertible_to<bool>; output.reset_shape(extents); output.replace(extents, placement); }
Output & prepare_output (Output &output, RequiredExtents const &required, Placement const &placement)
 Prepare a mutable Tensor output with compatible shape and storage.
 
template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
Output & prepare_output (Output &output, RequiredExtents const &required, Precision p)
 Prepare an output at compatible precision, recording runtime defaults on owning outputs.
 
auto qdim (QNum const &q) -> double
 Return the quantum dimension of a quantum number.
 
constexpr auto qdim (U1 value) -> double
 Return the quantum dimension of a U(1) irrep.
 
std::optional< exact_rational > rational_root (exact_rational const &x, unsigned long degree)
 Return a rational nth root when it exists, without choosing a precision.
 
template<Real T>
std::istream & read_real (std::istream &stream, T &value)
 Read a Uni20 real scalar from a stream token.
 
template<typename T >
constexpr T & real (detail::standard_complex< T > &z) noexcept
 Provides mutable access to the real component of a uni20::complex value.
 
mpreal real (mpcomplex const &z)
 
auto regularize (IrregularSpace const &space) -> IrregularSpaceRegularization
 Regularize an ordered segmented space into one block per quantum number.
 
auto regularize (LocalSpace const &space) -> LocalSpaceRegularization
 Regularize a LocalSpace into one block per quantum number.
 
auto regularize (QNumList const &list) -> QNumListRegularization
 Regularize a sparse QNumList into one block per quantum number.
 
mpreal remainder (mpreal const &a, mpreal const &b)
 Nearest-even-quotient remainder; exact operands retain exact rational results.
 
mpreal remainder (mpreal const &a, mpreal const &b, Precision p)
 Nearest-even-quotient remainder, rounding only the result at p.
 
remquo_result< mpreal > remquo (mpreal const &a, mpreal const &b)
 Nearest-even remainder with the signed low three quotient bits.
 
remquo_result< mpreal > remquo (mpreal const &a, mpreal const &b, Precision p)
 Remainder and quotient bits computed before rounding the remainder at p.
 
template<MorphismSide Side, BoundaryEnd End, class Tensor >
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::RepartitionSourceHasLeg<Tensor, Side> && !BorrowedBlockTensorView<Tensor>)
auto repartition (Tensor &&)=delete
 Repartition a temporary borrowed BlockTensor view without retaining the intermediate view.
 
template<MorphismSide Side, BoundaryEnd End, BorrowedBlockTensorView Tensor>
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::RepartitionSourceHasLeg<Tensor, Side>)
auto repartition (Tensor &&tensor)
 Repartition a temporary borrowed BlockTensor view without retaining the intermediate view.
 
template<MorphismSide Side, BoundaryEnd End, class Tensor >
requires detail::RepartitionSourceHasLeg<Tensor, Side>
auto repartition (Tensor &tensor) -> BlockTensorRepartitionView< Tensor, Side, End >
 Bend one planar edge leg across a BlockTensor morphism boundary.
 
template<TensorView Output, TensorExtentsLike RequiredExtents>
void require_output (Output const &output, RequiredExtents const &required)
 Require an existing tensor output to have the specified shape.
 
template<class T >
requires (has_runtime_precision_v<std::remove_cvref_t<T>> || requires { native_precision<T>(); })
constexpr void require_precision (Precision p)
 Reject an operation precision incompatible with a fixed scalar result.
 
template<class InputTensor , std::integral... Extents>
requires OwningTensor<InputTensor> && MutableTensorView<InputTensor> && requires(InputTensor&& input, Extents... extents) { uni20::reshape(std::move(input), extents...); }
auto reshape (async::Async< InputTensor > &&input, Extents... requested_extents)
 Schedule an owning reshape that consumes an async Tensor value.
 
template<TensorView InputTensor, std::integral... Extents>
requires requires(InputTensor const& input, Extents... extents) { uni20::reshape(input, extents...); }
auto reshape (async::Async< InputTensor > const &input, Extents... requested_extents)
 Schedule a preserving owning reshape of an async Tensor.
 
template<class RequestedLayout = void, TensorView InputTensor, std::integral... Extents>
requires (!OwningTensor<InputTensor> && (std::is_void_v<RequestedLayout> || detail::CanonicalReshapeLayout<RequestedLayout>) && (!std::is_void_v<RequestedLayout> || !StridedTensorView<InputTensor> || detail::CanonicalReshapeLayout<typename tensor_mdspec_t<InputTensor>::layout_type>))
auto reshape (InputTensor const &input, Extents... requested_extents)
 Materialize an owning reshape of a non-owning or generated tensor view.
 
template<class TensorType , std::integral... Extents>
requires detail::StorageTransferReshapableTensor<TensorType, stdex::dextents<index_type, sizeof...(Extents)>>
auto reshape (TensorType tensor, Extents... requested_extents)
 Return an owning reshape of a canonical dense tensor.
 
template<class Tensor , std::integral... Extents>
requires requires(Tensor& tensor, Extents... extents) { uni20::reshape_inplace(tensor, extents...); }
void reshape_inplace (async::Async< Tensor > &input, Extents... requested_extents)
 Schedule an in-place mapping change on an async owning Tensor.
 
template<detail::CanonicallyLaidOutOwningTensor TensorType, std::integral... Extents>
requires (sizeof...(Extents) == tensor_extents_t<TensorType>::rank() && requires(TensorType& tensor, typename TensorType::mapping_type mapping) { tensor.replace_mapping(std::move(mapping)); })
void reshape_inplace (TensorType &tensor, Extents... requested_extents)
 Change a canonical owning tensor's shape without reallocating storage.
 
template<detail::CanonicallyLaidOutMdspan Span, std::integral... Extents>
auto reshape_view (Span &&source, Extents... requested_extents)
 Return a no-copy mdspan reshape preserving a canonical source layout.
 
template<ImmediateTensorView Tensor, std::integral... Extents>
requires (std::is_lvalue_reference_v<Tensor &&> && StridedImmediateTensorView<Tensor> && detail::CanonicalReshapeLayout<typename immediate_tensor_mdspan_t<Tensor>::layout_type>)
auto reshape_view (Tensor &&tensor, Extents... requested_extents)
 Return a tensor-level no-copy reshape preserving a canonical source layout.
 
template<StridedMdspanLike Span, std::integral... Extents>
auto reshape_view_left (Span &&source, Extents... requested_extents)
 Return a no-copy column-major reshape of a compatible strided mdspan.
 
template<ImmediateTensorView Tensor, std::integral... Extents>
requires (std::is_lvalue_reference_v<Tensor &&> && StridedImmediateTensorView<Tensor>)
auto reshape_view_left (Tensor &&tensor, Extents... requested_extents)
 Return a tensor-level no-copy column-major reshape of a strided source.
 
template<StridedMdspanLike Span, std::integral... Extents>
auto reshape_view_right (Span &&source, Extents... requested_extents)
 Return a no-copy row-major reshape of a compatible strided mdspan.
 
template<ImmediateTensorView Tensor, std::integral... Extents>
requires (std::is_lvalue_reference_v<Tensor &&> && StridedImmediateTensorView<Tensor>)
auto reshape_view_right (Tensor &&tensor, Extents... requested_extents)
 Return a tensor-level no-copy row-major reshape of a strided source.
 
template<detail::MathInteger I>
mpreal rootn (mpreal const &x, I degree)
 Real integer-order root; negative orders give reciprocal roots.
 
template<detail::MathInteger I>
mpreal rootn (mpreal const &x, I degree, Precision p)
 Integer-order root with one final rounding at p, without input conversion.
 
mpreal round (mpreal const &x)
 Round to nearest integer, with ties away from zero; exact inputs produce exact integers.
 
mpreal round (mpreal const &x, Precision p)
 Round to nearest integer, with ties away from zero, then round the result to finite precision p.
 
mpreal round_even (mpreal const &x)
 Round to nearest integer, with ties to even; exact inputs produce exact integers.
 
mpreal round_even (mpreal const &x, Precision p)
 Round to nearest integer, with ties to even, then round the result to finite precision p.
 
template<class S , class V >
requires ((requires { native_precision<S>(); } && std::constructible_from<S, V const&>) || (has_runtime_precision_v<S> && std::constructible_from<S, V const&, Precision>))
constexpr S scalar_at_precision (V const &value, Precision p)
 Construct or convert a scalar at one explicit precision.
 
template<Scalar S, class Value >
requires (std::constructible_from<S, Value const&> || requires(S const& exemplar, Value const& value) { S(value, exemplar.precision()); })
constexpr auto scalar_like (S const &exemplar, Value const &value) -> S
 Construct a scalar using an exemplar's type and numerical precision.
 
constexpr bool scalar_precision_is_available (ScalarPrecision precision)
 Report whether a runtime precision has a concrete scalar type in this build.
 
constexpr std::string_view scalar_precision_name (ScalarPrecision precision)
 Return the canonical command-line and diagnostic spelling of a precision.
 
template<detail::MathInteger I>
mpreal scalbn (mpreal const &x, I exponent)
 Binary scaling, identical to ldexp for Uni20's binary scalar formats.
 
template<detail::MathInteger I>
mpreal scalbn (mpreal const &x, I exponent, Precision p)
 Binary scaling with one rounding to finite result precision p.
 
template<MutableBlockTensorView Tensor, class Scalar >
void scale (Tensor &tensor, Scalar factor)
 Multiply every stored numerical block by a scalar in place.
 
mpreal sec (mpreal const &x)
 Reciprocal cosine, evaluated directly by MPFR.
 
mpreal sec (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate sec at p.
 
mpreal sech (mpreal const &x)
 Reciprocal hyperbolic cosine, evaluated directly by MPFR.
 
mpreal sech (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate sech at p.
 
template<uni20::Real Real>
auto select_svd_states (std::span< BlockSvdState< Real > const > spectrum, linalg::SvdTruncationPolicy< Real > const &policy) -> BlockSvdSelection< Real >
 Apply the standard truncation policy to a globally sorted block-SVD spectrum.
 
template<MutableBlockTensorView Tensor>
void set_zero (Tensor &tensor)
 Set every stored numerical block to zero without changing structure.
 
bool signbit (mpreal const &x)
 
mpcomplex sin (mpcomplex const &z)
 
mpcomplex sin (mpcomplex const &z, Precision p)
 Evaluate sin(z.at(p)), returning an approximation at finite precision p.
 
mpreal sin (mpreal const &x)
 
mpreal sin (mpreal const &x, Precision p)
 Evaluate sin(x.at(p)), returning an approximation at finite precision p.
 
sincos_result< mpreal > sincos (mpreal const &x)
 Evaluate sine and cosine using the paired provider routine.
 
sincos_result< mpreal > sincos (mpreal const &x, Precision p)
 Paired elementary evaluation at p, matching sin(x,p) and cos(x,p).
 
mpcomplex sinh (mpcomplex const &z)
 Hyperbolic sine at the input precision; exact zero remains exact.
 
mpcomplex sinh (mpcomplex const &z, Precision p)
 Evaluate sinh(z.at(p)), returning an approximation at finite precision p.
 
mpreal sinh (mpreal const &x)
 Hyperbolic sine; retain input precision or a supported exact result.
 
mpreal sinh (mpreal const &x, Precision p)
 Evaluate sinh(x.at(p)), returning an approximation at finite precision p.
 
sinhcosh_result< mpreal > sinhcosh (mpreal const &x)
 Evaluate hyperbolic sine and cosine using the paired provider routine.
 
sinhcosh_result< mpreal > sinhcosh (mpreal const &x, Precision p)
 Paired elementary evaluation at p, matching sinh(x,p) and cosh(x,p).
 
mpreal sinpi (mpreal const &x)
 Sine of pi times x, with provider argument reduction.
 
mpreal sinpi (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate sinpi at p.
 
mpcomplex sqrt (mpcomplex const &z)
 Principal square root, with the sign of imaginary zero selecting the cut side.
 
mpcomplex sqrt (mpcomplex const &z, Precision p)
 Evaluate sqrt(z.at(p)), returning an approximation at finite precision p.
 
mpreal sqrt (mpreal const &x)
 
mpreal sqrt (mpreal const &x, Precision p)
 Evaluate sqrt(x.at(p)), returning an approximation at finite precision p.
 
template<class X >
requires (std::same_as<X, exact_rational> || std::same_as<X, decimal_literal>)
exact_rational sqrt (X const &value)
 Return the nonnegative rational square root, or require finite precision.
 
template<StridedMdspecLike S>
auto strides (S const &s)
 Retrieve the strides associated with a strided mdspec-like type.
 
template<StridedTensorView T>
auto strides (T const &tensor)
 Retrieve the normalized multidimensional strides of a tensor-level object.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (async::Async< InputTensor > const &input)
 Return an async storage-preserving full Tensor sum using storage policy.
 
template<TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (async::Async< InputTensor > const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Return an async storage-preserving sum over selected axes using storage policy.
 
template<AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void sum (async::Async< OutputTensor > &output, async::Async< InputTensor > const &input)
 Schedule a full sum into an explicit async scalar tensor using storage policy.
 
template<AsyncTensorOutput OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (mutable_tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void sum (async::Async< OutputTensor > &output, async::Async< InputTensor > const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Schedule an axis-selective sum into an explicit async output using storage policy.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (BackendSelector &&selector, InputTensor const &input)
 Return a storage-preserving full Tensor sum.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (BackendSelector &&selector, InputTensor const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Return a storage-preserving Tensor sum over selected axes.
 
template<linalg::KernelBackendSelector BackendSelector, MutableRankedMdspanLike< 0 > OutputSpan, MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, typename std::remove_cvref_t<InputSpan>::value_type>
void sum (BackendSelector &&selector, OutputSpan &&output, InputSpan &&input)
 Sum every element of an mdspan into a rank-zero output.
 
template<linalg::KernelBackendSelector BackendSelector, MutableMdspanLike OutputSpan, MdspanLike InputSpan, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, typename std::remove_cvref_t<InputSpan>::value_type> && (1 + sizeof...(RestAxes) <= std::remove_cvref_t<InputSpan>::rank()) && (std::remove_cvref_t<OutputSpan>::rank() + 1 + sizeof...(RestAxes) == std::remove_cvref_t<InputSpan>::rank())
void sum (BackendSelector &&selector, OutputSpan &&output, InputSpan &&input, FirstAxis first_axis, RestAxes... rest_axes)
 Sum selected mdspan axes into an existing lower-rank output.
 
template<linalg::KernelBackendSelector BackendSelector, MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void sum (BackendSelector &&selector, OutputTensor &&output, InputTensor const &input)
 Sum every element of a tensor view into an existing scalar tensor.
 
template<linalg::KernelBackendSelector BackendSelector, MutableTensorView OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void sum (BackendSelector &&selector, OutputTensor &&output, InputTensor const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Sum selected device tensor axes into an existing lower-rank tensor.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (BackendSelector selector, async::Async< InputTensor > const &input)
 Return an async storage-preserving full Tensor sum through an explicit selector.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (BackendSelector selector, async::Async< InputTensor > const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Return an async storage-preserving sum over selected axes.
 
template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void sum (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< InputTensor > const &input)
 Schedule a full sum into an explicit async scalar tensor.
 
template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (mutable_tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void sum (BackendSelector selector, async::Async< OutputTensor > &output, async::Async< InputTensor > const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Schedule an axis-selective sum into an explicit async output.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (InputTensor const &input)
 Return a storage-preserving full Tensor sum using storage policy.
 
template<TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto sum (InputTensor const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Return a storage-preserving Tensor sum over selected axes using storage policy.
 
template<MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void sum (OutputTensor &&output, InputTensor const &input)
 Sum every tensor view element into an existing scalar tensor using storage policy.
 
template<MutableTensorView OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void sum (OutputTensor &&output, InputTensor const &input, FirstAxis first_axis, RestAxes... rest_axes)
 Sum selected device tensor axes into an existing output using storage policy.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto sum_host (async::Async< InputTensor > const &input)
 Return a nonblocking async host C++ scalar sum using storage policy.
 
template<linalg::KernelBackendSelector BackendSelector, MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type>
auto sum_host (BackendSelector &&selector, InputSpan &&input) -> typename std::remove_cvref_t< InputSpan >::value_type
 Return the full mdspan sum as a host C++ scalar.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto sum_host (BackendSelector &&selector, InputTensor const &input) -> tensor_element_t< InputTensor >
 Return a full Tensor sum as a host C++ scalar through an explicit selector.
 
template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto sum_host (BackendSelector selector, async::Async< InputTensor > const &input)
 Return a nonblocking async host C++ scalar sum through an explicit selector.
 
template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto sum_host (InputTensor const &input) -> tensor_element_t< InputTensor >
 Return a full Tensor sum as a host C++ scalar using storage policy.
 
template<typename ElementType >
void swap (HostBuffer< ElementType > &lhs, HostBuffer< ElementType > &rhs) noexcept
 
run_clock_sample system_run_clock ()
 
mpreal tan (mpreal const &x)
 
mpreal tan (mpreal const &x, Precision p)
 Evaluate tan(x.at(p)), returning an approximation at finite precision p.
 
mpreal tanh (mpreal const &x)
 Hyperbolic tangent; retain input precision or a supported exact result.
 
mpreal tanh (mpreal const &x, Precision p)
 Evaluate tanh(x.at(p)), returning an approximation at finite precision p.
 
template<Real R, std::size_t N, class F >
quadrature_result< R, N > tanh_sinh_integrate (F const &f, R const &lo, R const &hi, tanh_sinh_options< R, N > const &options)
 Integrate N real components over lo<=hi using successive tanh-sinh meshes.
 
mpreal tanpi (mpreal const &x)
 Tangent of pi times x, with provider argument reduction.
 
mpreal tanpi (mpreal const &x, Precision p)
 Convert x to finite precision p, then evaluate tanpi at p.
 
presentation::report_builder task_registry_report (TaskRegistryGraphSnapshot const &snapshot, TaskRegistryGraphDiagnostics const &diagnostics, TaskRegistryReportOptions const &options={})
 Build a presentation-native summary of one async task-registry snapshot.
 
template<TensorView InputTensor>
 Tensor (InputTensor const &) -> Tensor< tensor_element_t< InputTensor >, tensor_mdspec_t< InputTensor >::rank(), HostStorage, detail::materialized_layout_t< void, tensor_mdspec_t< InputTensor > >, DefaultAccessorFactory >
 Deduce a runtime-extents host tensor that materializes a tensor view.
 
template<TensorExtentsLike LhsExtents, TensorExtentsLike RhsExtents>
constexpr bool tensor_extents_equal (LhsExtents const &lhs, RhsExtents const &rhs) noexcept
 Compare two tensor extent objects by rank and per-axis extent.
 
mpreal tgamma (mpreal const &x)
 Real Gamma function; exact positive integers produce exact factorials.
 
mpreal tgamma (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate tgamma at p.
 
auto to_block_space (IrregularSpace const &space) -> BlockSpace
 Return the canonical block-space representation of an IrregularSpace.
 
auto to_block_space (LocalSpace const &space) -> BlockSpace
 Return the coalesced block-space representation of a LocalSpace.
 
auto to_block_space (QNumList const &list) -> BlockSpace
 Return the coalesced block-space representation of a sparse QNumList.
 
template<std::signed_integral T>
constexpr auto to_int (basic_half_int< T > value) -> T
 Convert a half-integer to its integral value.
 
template<std::signed_integral T>
constexpr auto to_int_assert (basic_half_int< T > value) -> T
 Convert a half-integer to its integral value assuming exact integrality.
 
template<std::signed_integral T>
auto to_string (basic_half_int< T > value) -> std::string
 Format a half-integer as an integer or decimal .5.
 
std::string_view to_string (configuration_source source)
 
auto to_string (QNum const &q) -> std::string
 Format a quantum number as comma-separated named components.
 
std::string_view to_string (run_outcome value)
 
auto to_string (Symmetry const &symmetry) -> std::string
 Format a symmetry handle as its canonical string form.
 
auto to_string (U1 value) -> std::string
 Format a U(1) irrep in decimal half-integer form.
 
template<std::signed_integral T>
auto to_string_fraction (basic_half_int< T > value) -> std::string
 Format a half-integer as an integer or n/2.
 
auto to_string_fraction (U1 value) -> std::string
 Format a U(1) irrep in fractional n/2 form.
 
template<AsyncTensorOutput OutputTensor, class Function , TensorView... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void transform_inplace (async::Async< OutputTensor > &output, Function &&function, async::Async< InputTensors > const &... inputs)
 Schedule a variadic elementwise update using the static Tensor selector.
 
template<class BackendSelector , class OutputMdspan , class Function , class... InputMdspans>
requires detail::UpdateTransformSpans<OutputMdspan, InputMdspans...>
void transform_inplace (BackendSelector &&selector, OutputMdspan &&output, Function &&function, InputMdspans &&... inputs)
 Update a fixed-shape mdspan through an explicit backend selector.
 
template<class BackendSelector , class OutputTensor , class Function , class... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void transform_inplace (BackendSelector &&selector, OutputTensor &&output, Function &&function, InputTensors const &... inputs)
 Update a Tensor output through an explicit backend selector.
 
template<class BackendSelector , AsyncTensorOutput OutputTensor, class Function , TensorView... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void transform_inplace (BackendSelector selector, async::Async< OutputTensor > &output, Function &&function, async::Async< InputTensors > const &... inputs)
 Schedule a variadic elementwise update with an explicit backend selector.
 
template<class OutputTensor , class Function , class... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void transform_inplace (OutputTensor &&output, Function &&function, InputTensors const &... inputs)
 Update a Tensor output using its operands' default backend selector.
 
template<class Function , MdspanLike First, MdspanLike Second, MdspanLike... Rest>
requires detail::ConstDirectlyCallable<std::decay_t<Function>, typename First::reference, typename Second::reference, typename Rest::reference...>
constexpr auto transform_view (Function &&function, First const &first, Second const &second, Rest const &... rest)
 Create a lazy read-only elementwise transform view over two or more inputs.
 
template<class Function , MdspanLike Span>
requires detail::ConstDirectlyCallable<std::decay_t<Function>, typename Span::reference>
constexpr auto transform_view (Function &&function, Span const &span)
 Create a lazy read-only unary transform view while preserving the input mapping.
 
mpreal trunc (mpreal const &x)
 Round toward zero; exact inputs produce exact integers.
 
mpreal trunc (mpreal const &x, Precision p)
 Round toward zero, then round the result to finite precision p.
 
auto u1_component (QNum const &q, std::string_view name) -> U1
 Read one named U(1) component from a quantum number.
 
void uni20_library_anchor ()
 
mpreal upper_gamma (mpreal const &a, mpreal const &x)
 Upper incomplete Gamma, with shape a and lower integration endpoint x.
 
mpreal upper_gamma (mpreal const &a, mpreal const &x, Precision p)
 Convert both inputs to finite precision p, then evaluate upper_gamma at p.
 
std::string utc_now ()
 
template<class Function >
decltype(auto) visit_scalar_precision (ScalarPrecision precision, Function &&function)
 Invoke a templated callable with the concrete real scalar for a runtime precision.
 
template<Scalar ElementType, std::integral... Extents>
auto zeros (Extents... extents)
 Return a generated tensor filled with scalar zeros.
 
mpreal zeta (mpreal const &x)
 Riemann zeta; nonpositive integer arguments retain exact rational results.
 
mpreal zeta (mpreal const &x, Precision p)
 Convert the input to finite precision p, then evaluate zeta at p.
 

Variables

template<class Accessor >
constexpr bool accessor_applies_conjugation_v
 True when an accessor presents conjugated values.
 
template<class Real >
constexpr auto catalan = detail::math_constants<Real>::catalan
 Catalan constant as a native value or a precision-aware MPFR descriptor.
 
template<class Accessor , class Domain >
constexpr bool enable_accessor_in_domain = false
 Opt-in customization for the execution domains supported by an accessor.
 
template<AccessorPolicy Accessor, class Domain >
constexpr bool enable_accessor_in_domain< conjugated_accessor< Accessor >, Domain >
 Conjugation preserves the execution domains of the wrapped accessor.
 
template<class Accessor , class Domain >
constexpr bool enable_accessor_in_domain< const_accessor_adaptor< Accessor >, Domain >
 A const accessor adaptor preserves its wrapped accessor's execution domains.
 
template<class ElementType , class Extents >
constexpr bool enable_accessor_in_domain< diagonal_accessor< ElementType, Extents >, host_access_domain > = true
 Diagonal accessors may be evaluated by ordinary host code.
 
template<class ElementType , class Extents , class Generator >
constexpr bool enable_accessor_in_domain< generated_accessor< ElementType, Extents, Generator >, cuda_access_domain > = true
 
template<class ElementType , class Extents , class Generator >
constexpr bool enable_accessor_in_domain< generated_accessor< ElementType, Extents, Generator >, host_access_domain > = true
 Generated accessors are semantically valid in either execution domain.
 
template<class T >
constexpr bool enable_owning_tensor = false
 Opt-in marker for tensor types that own their storage and lifetime.
 
template<typename ElementType , std::size_t Rank, typename StoragePolicy , typename LayoutPolicy , typename AccessorFactory , typename Extents >
constexpr bool enable_owning_tensor< Tensor< ElementType, Rank, StoragePolicy, LayoutPolicy, AccessorFactory, Extents > > = true
 
template<typename T >
constexpr bool enable_uninitialized_storage
 Opt a type into allocation without construction or destruction.
 
template<class Real >
constexpr auto euler_gamma = detail::math_constants<Real>::euler_gamma
 Euler-Mascheroni constant, with the same type and precision rules as pi.
 
constexpr bool has_float128 = UNI20_HAS_FLOAT128 != 0
 Whether this build provides a concrete uni20::float128 type.
 
constexpr bool has_float80 = UNI20_HAS_FLOAT80 != 0
 Whether this build provides native x87 extended precision as uni20::float80.
 
template<typename T >
constexpr bool has_numeric_limits_v
 True when Uni20 has numeric limits for T.
 
template<typename T >
constexpr bool has_runtime_precision_v = false
 Whether numerical values of this scalar family carry runtime precision.
 
template<typename T >
constexpr bool has_trivial_conj = Real<T> || Integer<T>
 Indicates whether the Uni20 conjugation helper is a no-op for the provided scalar type.
 
template<typename T >
constexpr bool is_complex_scalar_valued_v = is_scalar_valued_v<T> && is_complex_v<scalar_t<T>>
 Trait to detect whether T is scalar-valued with a complex scalar.
 
template<typename T >
constexpr bool is_complex_v = is_complex_t<std::remove_cvref_t<T>>::value
 Convenience alias that exposes the value of is_complex_t.
 
template<class Accessor >
constexpr bool is_default_accessor_v = is_default_accessor<std::remove_cvref_t<Accessor>>::value
 True when an accessor is stdex::default_accessor<T>.
 
template<typename T >
constexpr bool is_integer_scalar_valued_v = is_scalar_valued_v<T> && is_integer_v<scalar_t<T>>
 Trait to detect whether T is scalar-valued with an integer scalar.
 
template<typename T >
constexpr bool is_integer_v = is_integer_t<std::remove_cvref_t<T>>::value
 Convenience alias that exposes the value of is_integer_t.
 
template<typename R >
constexpr bool is_proxy_reference_v
 Detects whether a type is considered a proxy reference.
 
template<typename T >
constexpr bool is_real_or_complex_scalar_valued_v = is_scalar_valued_v<T> && is_real_or_complex_v<scalar_t<T>>
 Trait to detect whether T is scalar-valued with a real or complex scalar.
 
template<typename T >
constexpr bool is_real_or_complex_v = is_real_v<T> || is_complex_v<T>
 Trait to detect whether a type is a real or complex scalar.
 
template<typename T >
constexpr bool is_real_scalar_valued_v = is_scalar_valued_v<T> && is_real_v<scalar_t<T>>
 Trait to detect whether T is scalar-valued with a real scalar.
 
template<typename T >
constexpr bool is_real_v = is_real_t<std::remove_cvref_t<T>>::value
 Convenience alias that exposes the value of is_real_t.
 
template<typename T >
constexpr bool is_scalar_v = is_real_v<T> || is_complex_v<T> || is_integer_v<T>
 Trait to detect whether a type is a numeric scalar (real, complex, or integer).
 
template<typename T >
constexpr bool is_scalar_valued_v = !std::same_as<scalar_t<T>, void>
 Trait to detect whether T is scalar-valued.
 
template<class Real >
constexpr auto log_two = detail::math_constants<Real>::log_two
 Natural logarithm of two, with the same type and precision rules as pi.
 
template<class Mdspan >
constexpr bool mdspan_needs_conjugation_v
 True when an mdspan-like type's accessor presents conjugated values.
 
template<class Real >
constexpr auto pi = detail::math_constants<Real>::pi
 Pi as a native constant or a precision-aware MPFR descriptor.
 
constexpr uninitialized_t uninitialized {}
 Explicit allocation tag for overwrite outputs and scratch space.
 

Typedef Documentation

◆ attribute_map

using uni20::attribute_map = typedef std::map<std::string, metadata_value>

◆ BasicTensor

template<typename ElementType , typename Extents , typename StoragePolicy = HostStorage, typename LayoutPolicy = stdex::layout_left, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using uni20::BasicTensor = typedef Tensor<ElementType, Extents::rank(), StoragePolicy, LayoutPolicy, AccessorFactory, Extents>

Configurable owning tensor with an explicit mdspan extents type.

Template Parameters
ElementTypeValue type stored by the tensor.
ExtentsExtents type describing the tensor shape.
StoragePolicyPolicy controlling ownership and allocation of the buffer.
LayoutPolicyLayout policy that determines index ordering and stride computation.
AccessorFactoryFactory that produces accessors for the storage handle.

◆ block_tensor_codomain_t

template<class Tensor >
using uni20::block_tensor_codomain_t = typedef typename block_tensor_type_t<Tensor>::codomain_type

Ordered codomain type exposed by a BlockTensor-level object.

◆ block_tensor_const_block_t

template<class Tensor >
using uni20::block_tensor_const_block_t = typedef decltype(std::declval<block_tensor_type_t<Tensor> const&>().block_by_ordinal(std::size_t{}))

Read-only dense-block TensorView exposed by stable block ordinal.

◆ block_tensor_domain_t

template<class Tensor >
using uni20::block_tensor_domain_t = typedef typename block_tensor_type_t<Tensor>::domain_type

Ordered domain type exposed by a BlockTensor-level object.

◆ block_tensor_key_t

template<class Tensor >
using uni20::block_tensor_key_t = typedef typename block_tensor_type_t<Tensor>::key_type

Logical block-key type exposed by a BlockTensor-level object.

◆ block_tensor_mutable_block_t

template<class Tensor >
using uni20::block_tensor_mutable_block_t = typedef decltype(std::declval<std::remove_reference_t<Tensor>&>().block_by_ordinal(std::size_t{}))

Writable dense-block TensorView exposed by stable block ordinal.

◆ block_tensor_type_t

template<class Tensor >
using uni20::block_tensor_type_t = typedef std::remove_cvref_t<Tensor>

Cvref-stripped BlockTensor-level object type.

◆ block_tensor_value_t

template<class Tensor >
using uni20::block_tensor_value_t = typedef typename block_tensor_type_t<Tensor>::value_type

Scalar value type exposed by a BlockTensor-level object.

◆ BlockTensorPermutationView

template<class SourceTensor , std::size_t... Axis>
using uni20::BlockTensorPermutationView = typedef typename detail::PermutationViewTraits<SourceTensor, Axis...>::type

Zero-copy bosonic permutation of factors within each morphism side.

Axis positions are flattened domain-then-codomain positions. The permutation must retain domain factors in domain and codomain factors in codomain; use repartition to bend a factor between sides. Labels and space values move with their factors.

Template Parameters
SourceTensorSource BlockTensor-like value, optionally const.
AxisSource axis at each output position.

◆ BlockTensorRepartitionView

template<class SourceTensor , MorphismSide Side, BoundaryEnd End>
using uni20::BlockTensorRepartitionView = typedef typename detail::RepartitionViewTraits<SourceTensor, Side, End>::type

Zero-copy view of one bosonic edge leg bent across a morphism boundary.

The view owns transformed boundary and logical-key metadata while retaining a reference to the source tensor's numerical storage. Dense axes are exposed through strided mdspans in transformed order. Replacing or structurally modifying the source invalidates the view; writes to existing payload elements do not.

Template Parameters
SourceTensorSource BlockTensor-like value, optionally const.
SideMorphism side from which the edge factor moves.
EndPlanar boundary end at which the factor bends.

◆ cdouble

using uni20::cdouble = typedef complex<double>

◆ cfloat

using uni20::cfloat = typedef complex<float>

◆ ColumnMajor

using uni20::ColumnMajor = typedef stdex::layout_left

Conventional column-major contiguous mdspan layout.

◆ ColumnMajorTensor

template<typename ElementType , std::size_t Rank, typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using uni20::ColumnMajorTensor = typedef Tensor<ElementType, Rank, StoragePolicy, ColumnMajor, AccessorFactory>

Owning runtime-extents tensor with canonical column-major storage.

◆ complex128

using uni20::complex128 = typedef complex<double>

◆ complex64

using uni20::complex64 = typedef complex<float>

◆ DenseMatrix

template<typename ElementType , typename LayoutPolicy = ColumnMajor>
using uni20::DenseMatrix = typedef Tensor<ElementType, 2, HostStorage, LayoutPolicy>

Owning dense host matrix with a compile-time contiguous layout.

Template Parameters
ElementTypeValue type stored by the matrix.
LayoutPolicyContiguous matrix layout; column-major by default for direct LAPACK interoperability.

◆ float32

using uni20::float32 = typedef float

◆ float64

using uni20::float64 = typedef double

◆ half_int

using uni20::half_int = typedef basic_half_int<std::int64_t>

Default half-integer type used by Uni20.

◆ host_read_mdspan_t

template<class Mdspec >
using uni20::host_read_mdspan_t = typedef std::remove_cvref_t<decltype(std::declval<detail::host_read_mdspan_lease_t<Mdspec>&>().mdspan())>

Read-only mdspan type resolved by host descriptor acquisition.

◆ host_read_tensor_mdspan_t

template<class Tensor >
using uni20::host_read_tensor_mdspan_t = typedef std::remove_cvref_t<decltype(std::declval<detail::host_read_tensor_lease_t<Tensor>&>().mdspan())>

Read-only mdspan type resolved by host tensor acquisition.

◆ host_write_mdspan_t

template<class Mdspec >
using uni20::host_write_mdspan_t = typedef std::remove_cvref_t<decltype(std::declval<detail::host_write_mdspan_lease_t<Mdspec>&>().mdspan())>

Writable mdspan type resolved by host descriptor acquisition.

◆ host_write_tensor_mdspan_t

template<class Tensor >
using uni20::host_write_tensor_mdspan_t = typedef std::remove_cvref_t<decltype(std::declval<detail::host_write_tensor_lease_t<Tensor>&>().mdspan())>

Writable mdspan type resolved by host tensor acquisition.

◆ immediate_tensor_mdspan_t

template<ImmediateTensorView T>
using uni20::immediate_tensor_mdspan_t = typedef std::remove_cvref_t<detail::tensor_const_mdspan_t<T> >

Resolved readable mdspan type exposed by a tensor-level object.

◆ index_type

using uni20::index_type = typedef std::ptrdiff_t

◆ logical_value_t

template<typename Value >
using uni20::logical_value_t = typedef typename logical_value<std::remove_cvref_t<Value> >::type

Backend-neutral logical value represented by an execution expression.

◆ mutable_immediate_tensor_mdspan_t

template<MutableImmediateTensorView T>
using uni20::mutable_immediate_tensor_mdspan_t = typedef std::remove_cvref_t<detail::tensor_mutable_mdspan_t<T> >

Resolved writable mdspan type exposed by a mutable tensor-level object.

◆ mutable_tensor_mdspec_t

template<MutableTensorView T>
using uni20::mutable_tensor_mdspec_t = typedef std::remove_cvref_t<detail::normalized_mutable_mdspec_t<T> >

Normalized writable MdspecLike type exposed by a mutable tensor-level object.

◆ primal_space_t

template<class T >
using uni20::primal_space_t = typedef typename detail::PrimalSpaceType<std::remove_cvref_t<T> >::type

Remove one explicit dual-space adaptor from a space type.

Template Parameters
TSpace or dual-space type.

◆ remove_proxy_reference_t

template<typename R >
using uni20::remove_proxy_reference_t = typedef std::conditional_t<is_proxy_reference_v<R>, typename remove_proxy_reference<std::remove_cvref_t<R> >::type, std::remove_reference_t<R> >

Extracts the underlying value type of a proxy (or normal) reference.

If the type is detected as a proxy reference via is_proxy_reference_v, removes the proxy wrapper and CV qualifiers. Otherwise, removes only the reference qualifier.

◆ RowMajor

using uni20::RowMajor = typedef stdex::layout_right

Conventional row-major contiguous mdspan layout.

◆ RowMajorTensor

template<typename ElementType , std::size_t Rank, typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using uni20::RowMajorTensor = typedef Tensor<ElementType, Rank, StoragePolicy, RowMajor, AccessorFactory>

Owning runtime-extents tensor with canonical row-major storage.

◆ scalar_t

template<typename T >
using uni20::scalar_t = typedef typename scalar_type<std::remove_cvref_t<T> >::type

◆ ScalarTensor

template<typename ElementType , typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using uni20::ScalarTensor = typedef Tensor<ElementType, 0, StoragePolicy, ColumnMajor, AccessorFactory>

Owning rank-zero tensor that retains storage and backend semantics.

◆ size_type

using uni20::size_type = typedef std::ptrdiff_t

Signed size and index type, used for tensor extents and indexing.

Note
Using signed values avoids unnecessary conversions in loop logic.

◆ StridedTensor

template<typename ElementType , std::size_t Rank, typename StoragePolicy = HostStorage, typename AccessorFactory = detail::tensor_accessor_factory_t<StoragePolicy>>
using uni20::StridedTensor = typedef Tensor<ElementType, Rank, StoragePolicy, stdex::layout_stride, AccessorFactory>

Owning runtime-extents tensor with an explicitly strided mapping.

◆ TaskRegistry

Alias selecting the active task registry implementation.

◆ tensor_element_t

template<TensorView T>
using uni20::tensor_element_t = typedef std::remove_cv_t<typename tensor_mdspec_t<T>::element_type>

Scalar value type exposed by a tensor-level object.

◆ tensor_extents_t

template<TensorView T>
using uni20::tensor_extents_t = typedef typename tensor_mdspec_t<T>::extents_type

Extents type exposed by a tensor-level object.

◆ tensor_mdspec_t

template<TensorView T>
using uni20::tensor_mdspec_t = typedef std::remove_cvref_t<detail::normalized_const_mdspec_t<T> >

Normalized readable MdspecLike type exposed by a tensor-level object.

◆ tensor_storage_policy_t

template<class Tensor >
using uni20::tensor_storage_policy_t = typedef typename detail::TensorStoragePolicy<std::remove_cvref_t<Tensor> >::type

Storage-policy type exposed by a tensor-level object, or void.

Enumeration Type Documentation

◆ BoundaryEnd

enum class uni20::BoundaryEnd
strong

Planar boundary end at which repartition bends one leg.

Enumerator
Left 
Right 

◆ configuration_source

enum class uni20::configuration_source
strong
Enumerator
explicit_input 
command_line 
option_file 
attribute 
environment 
application_default 

◆ MorphismSide

enum class uni20::MorphismSide
strong

Morphism side from which repartition bends one edge leg.

Enumerator
Domain 
Codomain 

◆ output_format

enum class uni20::output_format
strong
Enumerator
terminal 
csv 
tsv 
commented_csv 
commented_tsv 
json 
named_json 

◆ output_operation

enum class uni20::output_operation
strong
Enumerator
open 
begin 
row 
table_finish 
flush 
finish 
close 

◆ quadrature_status

enum class uni20::quadrature_status
strong

Termination of finite-interval tanh-sinh integration.

Enumerator
converged 
evaluation_limit 
refinement_limit 
endpoint_limit 
nonfinite_integrand 
arithmetic_range 

◆ run_outcome

enum class uni20::run_outcome
strong
Enumerator
success 
partial 
failed 
cancelled 

◆ ScalarPrecision

enum class uni20::ScalarPrecision
strong

Runtime identifier for the real precision underlying a scalar type.

Enumerator
fp32 
fp64 
fp80 
fp128 

◆ StorageInitialization

enum class uni20::StorageInitialization
strong

Numerical initialization requested from a storage implementation.

Enumerator
Zero 
Uninitialized 

◆ TaskRegistryGraphRole

enum class uni20::TaskRegistryGraphRole
strong

Reader/writer role for a task-registry graph dependency.

Enumerator
Reader 
Writer 

Function Documentation

◆ abs() [1/5]

template<std::signed_integral T>
constexpr auto uni20::abs ( basic_half_int< T >  value) -> basic_half_int<T>
constexpr

Return the absolute value of a half-integer.

Template Parameters
TSigned storage type.
Parameters
valueInput value.
Returns
Absolute value.

◆ abs() [2/5]

mpreal uni20::abs ( mpcomplex const &  z)
inline

◆ abs() [3/5]

mpreal uni20::abs ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate abs(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ abs() [4/5]

mpreal uni20::abs ( mpreal const &  x)
inline

◆ abs() [5/5]

mpreal uni20::abs ( mpreal const &  x,
Precision  p 
)
inline

Evaluate abs(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ acos() [1/2]

mpreal uni20::acos ( mpreal const &  x)
inline

Inverse cosine in radians; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ acos() [2/2]

mpreal uni20::acos ( mpreal const &  x,
Precision  p 
)
inline

Evaluate acos(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ acosh() [1/4]

mpcomplex uni20::acosh ( mpcomplex const &  z)
inline

Principal inverse hyperbolic cosine, with imaginary signed zero selecting the cut side.

Exact one returns exact zero; other exact arguments require an explicit finite precision.

◆ acosh() [2/4]

mpcomplex uni20::acosh ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate acosh(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ acosh() [3/4]

mpreal uni20::acosh ( mpreal const &  x)
inline

Inverse hyperbolic cosine; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ acosh() [4/4]

mpreal uni20::acosh ( mpreal const &  x,
Precision  p 
)
inline

Evaluate acosh(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ acospi() [1/2]

mpreal uni20::acospi ( mpreal const &  x)
inline

Principal arccosine divided by pi.

◆ acospi() [2/2]

mpreal uni20::acospi ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate acospi at p.

◆ acquire_cuda_read_access_async() [1/3]

template<cuda::BufferMdspec Mdspec>
requires std::is_const_v<typename std::remove_cvref_t<Mdspec>::element_type>
auto uni20::acquire_cuda_read_access_async ( Mdspec const &  mdspec,
cuda::Stream const &  stream 
)

Resolve borrowed CUDA read access synchronized with an operation stream.

◆ acquire_cuda_read_access_async() [2/3]

template<class Tensor >
requires (!std::is_lvalue_reference_v<Tensor>) && TensorView<std::remove_cvref_t<Tensor>> && (!ImmediateTensorView<std::remove_cvref_t<Tensor>>) && OwningTensor<std::remove_cvref_t<Tensor>> && cuda::BufferMdspec<tensor_mdspec_t<std::remove_cvref_t<Tensor>>> && requires(Tensor&& tensor) { { std::move(tensor).release_storage() } -> std::same_as<typename std::remove_cvref_t<Tensor>::storage_type>; }
auto uni20::acquire_cuda_read_access_async ( Tensor &&  tensor,
cuda::Stream const &  stream 
)

Move an owning CUDA tensor into a stream-ordered read lease.

◆ acquire_cuda_read_access_async() [3/3]

template<class Tensor >
requires TensorView<Tensor> && (!ImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>>
auto uni20::acquire_cuda_read_access_async ( Tensor &  tensor,
cuda::Stream const &  stream 
)

Acquire stream-ordered read access as an immediately-ready awaitable.

Resource admission remains operation-local. Once a stream is available, CudaBuffer installs predecessor waits synchronously and the returned awaitable is ready without suspending.

◆ acquire_cuda_read_access_sync() [1/3]

template<cuda::BufferMdspec Mdspec>
requires std::is_const_v<typename std::remove_cvref_t<Mdspec>::element_type>
auto uni20::acquire_cuda_read_access_sync ( Mdspec const &  mdspec)

Host-wait for prior CUDA work and resolve a borrowed read descriptor.

The returned policy-free lease retains synchronized access but does not own the buffer identified by mdspec.

◆ acquire_cuda_read_access_sync() [2/3]

template<class Tensor >
requires (!std::is_lvalue_reference_v<Tensor>) && TensorView<std::remove_cvref_t<Tensor>> && (!ImmediateTensorView<std::remove_cvref_t<Tensor>>) && OwningTensor<std::remove_cvref_t<Tensor>> && cuda::BufferMdspec<tensor_mdspec_t<std::remove_cvref_t<Tensor>>> && requires(Tensor&& tensor) { { std::move(tensor).release_storage() } -> std::same_as<typename std::remove_cvref_t<Tensor>::storage_type>; }
auto uni20::acquire_cuda_read_access_sync ( Tensor &&  tensor)

Move an owning CUDA tensor into a synchronized CUDA read lease.

◆ acquire_cuda_read_access_sync() [3/3]

template<class Tensor >
requires TensorView<Tensor> && (!ImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>>
auto uni20::acquire_cuda_read_access_sync ( Tensor &  tensor)

Host-wait for prior CUDA work and acquire a CUDA-accessible read lease.

Synchronization does not copy or otherwise make the data host-accessible.

◆ acquire_cuda_write_access_async() [1/2]

template<class Mdspec >
requires cuda::BufferMdspec<Mdspec> && MutableMdspecLike<Mdspec>
auto uni20::acquire_cuda_write_access_async ( Mdspec &  mdspec,
cuda::Stream const &  stream 
)

Resolve borrowed CUDA write access synchronized with an operation stream.

◆ acquire_cuda_write_access_async() [2/2]

template<class Tensor >
requires MutableTensorView<Tensor> && (!MutableImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>> && cuda::BufferMdspec<mutable_tensor_mdspec_t<Tensor>>
auto uni20::acquire_cuda_write_access_async ( Tensor &  tensor,
cuda::Stream const &  stream 
)

Acquire stream-ordered write access as an immediately-ready awaitable.

◆ acquire_cuda_write_access_sync() [1/2]

template<class Mdspec >
requires cuda::BufferMdspec<Mdspec> && MutableMdspecLike<Mdspec>
auto uni20::acquire_cuda_write_access_sync ( Mdspec &  mdspec)

Host-wait for prior CUDA work and resolve a borrowed write descriptor.

The returned policy-free lease retains synchronized access but does not own the buffer identified by mdspec.

◆ acquire_cuda_write_access_sync() [2/2]

template<class Tensor >
requires MutableTensorView<Tensor> && (!MutableImmediateTensorView<Tensor>) && cuda::BufferMdspec<tensor_mdspec_t<Tensor>> && cuda::BufferMdspec<mutable_tensor_mdspec_t<Tensor>>
auto uni20::acquire_cuda_write_access_sync ( Tensor &  tensor)

Host-wait for prior CUDA work and acquire a CUDA-accessible write lease.

Synchronization does not copy or otherwise make the data host-accessible.

◆ acquire_host_read_access_async()

template<ImmediateTensorView Tensor>
requires HostAccessibleMdspan<immediate_tensor_mdspan_t<Tensor>>
auto uni20::acquire_host_read_access_async ( Tensor &  tensor)

Return an immediately-ready host read acquisition.

◆ acquire_host_read_access_sync() [1/2]

template<HostAccessibleMdspan Mdspan>
requires std::is_const_v<typename std::remove_cvref_t<Mdspan>::element_type>
auto uni20::acquire_host_read_access_sync ( Mdspan const &  mdspan)

Acquire a directly host-accessible read-only mdspan.

◆ acquire_host_read_access_sync() [2/2]

template<ImmediateTensorView Tensor>
requires HostAccessibleMdspan<immediate_tensor_mdspan_t<Tensor>>
auto uni20::acquire_host_read_access_sync ( Tensor &  tensor)

Acquire an immediately host-accessible tensor view for read-only use.

◆ acquire_host_write_access_async()

template<MutableImmediateTensorView Tensor>
requires HostAccessibleMdspan<mutable_immediate_tensor_mdspan_t<Tensor>>
auto uni20::acquire_host_write_access_async ( Tensor &  tensor)

Return an immediately-ready host write acquisition.

◆ acquire_host_write_access_sync() [1/2]

template<MutableMdspanLike Mdspan>
requires HostAccessibleMdspan<Mdspan>
auto uni20::acquire_host_write_access_sync ( Mdspan &  mdspan)

Acquire a directly host-accessible writable mdspan.

◆ acquire_host_write_access_sync() [2/2]

template<MutableImmediateTensorView Tensor>
requires HostAccessibleMdspan<mutable_immediate_tensor_mdspan_t<Tensor>>
auto uni20::acquire_host_write_access_sync ( Tensor &  tensor)

Acquire an immediately host-accessible mutable tensor view.

◆ add() [1/3]

int uni20::add ( int  a,
int  b 
)

◆ add() [2/3]

template<class OutputStorage = void, BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Lhs, Rhs> && SparseBlockStorage<detail::selected_linear_storage_t<OutputStorage, Lhs>> && detail::CompatibleLinearOutputStorage<detail::selected_linear_storage_t<OutputStorage, Lhs>, Lhs, Rhs>
auto uni20::add ( Lhs const &  lhs,
Rhs const &  rhs 
)

Return the sum of two BlockTensor values using the union of stored keys.

A selected generalized-diagonal output policy requires both inputs to have generalized-diagonal block representations. The selected storage must use the same immediate or async execution mode as both inputs.

Exceptions
std::invalid_argumentIf the symmetry or boundary values differ.
Template Parameters
OutputStorageSparse output policy, or void to preserve the left policy.

◆ add() [3/3]

template<MutableBlockTensorView Output, BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Output, Lhs> && detail::CompatibleBlockTensorValues<Output, Rhs> && detail::CompatibleLinearOutputRepresentation<Output, Lhs, Rhs> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Lhs> && !AsyncBlockTensorView<Rhs>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Lhs> && AsyncBlockTensorView<Rhs>))
void uni20::add ( Output &  output,
Lhs const &  lhs,
Rhs const &  rhs 
)

Overwrite a fixed BlockTensor output with the sum of two values.

Missing input blocks are exact zero. The output must already store the union of both input key sets; additional output blocks become zero. A generalized-diagonal output requires generalized-diagonal inputs.

Precondition
Distinct output and input values do not have overlapping numerical storage.
Exceptions
std::invalid_argumentIf symmetry or boundary values differ, or the output omits an input key.

◆ add_inplace()

template<MutableBlockTensorView Output, BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void uni20::add_inplace ( Output &  output,
Input const &  input 
)

Add one BlockTensor value to an existing output in place.

Input blocks missing from the output cannot be inserted and are rejected before any numerical block is modified. A generalized-diagonal output requires a generalized-diagonal input.

Precondition
Distinct output and input values do not have overlapping numerical storage.
Exceptions
std::invalid_argumentIf the symmetry or boundary values differ, or the output omits an input key.

◆ agm() [1/2]

mpreal uni20::agm ( mpreal const &  a,
mpreal const &  x 
)
inline

Nonnegative real arithmetic-geometric mean.

◆ agm() [2/2]

mpreal uni20::agm ( mpreal const &  a,
mpreal const &  x,
Precision  p 
)
inline

Convert both inputs to finite precision p, then evaluate agm at p.

◆ airy_ai() [1/2]

mpreal uni20::airy_ai ( mpreal const &  x)
inline

Real Airy Ai; MPFR recommends arguments with magnitude below about 500.

◆ airy_ai() [2/2]

mpreal uni20::airy_ai ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate airy_ai at p.

◆ arg() [1/2]

mpreal uni20::arg ( mpcomplex const &  z)
inline

◆ arg() [2/2]

mpreal uni20::arg ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate arg(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ as_block_tensor_view()

template<class Tensor >
requires BlockTensorView<Tensor> && requires(Tensor& tensor) { detail::as_block_tensor_view_impl(tensor, std::make_index_sequence<block_tensor_type_t<Tensor>::order()>{}); }
auto uni20::as_block_tensor_view ( Tensor &  tensor)

Materialize a borrowed identity view over an existing BlockTensor view.

The returned value owns its copied keys, boundaries, and dense-block descriptors but not their numerical payload. Constness follows the source. Replacing or structurally modifying the ultimate payload owner invalidates the view.

Template Parameters
TensorBlockTensor-level source type, optionally const-qualified.
Parameters
tensorLvalue source whose payload lifetime must cover the returned view.
Returns
Zero-copy view with unchanged boundaries, keys, and dense-axis order.

◆ asin() [1/2]

mpreal uni20::asin ( mpreal const &  x)
inline

Inverse sine in radians; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ asin() [2/2]

mpreal uni20::asin ( mpreal const &  x,
Precision  p 
)
inline

Evaluate asin(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ asinh() [1/2]

mpreal uni20::asinh ( mpreal const &  x)
inline

Inverse hyperbolic sine; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ asinh() [2/2]

mpreal uni20::asinh ( mpreal const &  x,
Precision  p 
)
inline

Evaluate asinh(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ asinpi() [1/2]

mpreal uni20::asinpi ( mpreal const &  x)
inline

Principal arcsine divided by pi.

◆ asinpi() [2/2]

mpreal uni20::asinpi ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate asinpi at p.

◆ assign_scale()

template<MutableBlockTensorView Output, class Scalar , BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void uni20::assign_scale ( Output &  output,
Scalar  factor,
Input const &  input 
)

Overwrite a fixed BlockTensor output with a scaled input value.

The output may store additional blocks; they are set to zero. It must already store every input key because BlockTensor structure is immutable after construction. A generalized-diagonal output requires a generalized-diagonal input.

Precondition
Distinct output and input values do not have overlapping numerical storage.
Exceptions
std::invalid_argumentIf the symmetry or boundary values differ, or the output omits an input key.

◆ assign_through()

template<MutableTensorView Output, TensorView Input>
requires (tensor_mdspec_t<Output>::rank() == tensor_mdspec_t<Input>::rank())
void uni20::assign_through ( Output &  output,
Input const &  input 
)

Assign tensor values through a mutable tensor alias descriptor.

This declaration is the tensor customization used by capability-aware async write proxies. Its definition delegates to uni20::copy.

Async alias assignment discovers this function through ADL. The descriptor itself remains unchanged while copy writes its values.

◆ assign_transform() [1/9]

template<AsyncTensorOutput OutputTensor, class Function >
void uni20::assign_transform ( async::Async< OutputTensor > &  output,
Function &&  function 
)

Schedule a nullary overwrite using the static Tensor selector.

◆ assign_transform() [2/9]

template<AsyncTensorOutput OutputTensor, class Function , TensorView FirstInputTensor, TensorView... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void uni20::assign_transform ( async::Async< OutputTensor > &  output,
Function &&  function,
async::Async< FirstInputTensor > const &  first_input,
async::Async< RestInputTensors > const &...  rest_inputs 
)

Schedule a variadic elementwise overwrite using the static Tensor selector.

Selector resolution depends only on Tensor and callable types and occurs before scheduling. Unhandled failures propagate to the output epoch.

Precondition
The output must not share an epoch queue with any input.

◆ assign_transform() [3/9]

template<class BackendSelector , class OutputMdspan , class Function , class... InputMdspans>
requires detail::OverwriteTransformSpans<OutputMdspan, InputMdspans...>
void uni20::assign_transform ( BackendSelector &&  selector,
OutputMdspan &&  output,
Function &&  function,
InputMdspans &&...  inputs 
)

Overwrite a fixed-shape mdspan through an explicit backend selector.

Computes output[i...] = function(inputs[i...]...). Input elements are passed as values even when an input mdspan is mutable.

Precondition
All operands have equal extents and output does not overlap an input.

◆ assign_transform() [4/9]

template<class BackendSelector , MutableTensorView OutputTensor, class Function >
void uni20::assign_transform ( BackendSelector &&  selector,
OutputTensor &&  output,
Function &&  function 
)

Overwrite a fixed-shape Tensor from a nullary element generator.

Computes output[i...] = function() without reading the old output.

◆ assign_transform() [5/9]

template<class BackendSelector , class OutputTensor , class Function , class FirstInputTensor , class... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void uni20::assign_transform ( BackendSelector &&  selector,
OutputTensor &&  output,
Function &&  function,
FirstInputTensor const &  first_input,
RestInputTensors const &...  rest_inputs 
)

Overwrite a Tensor output through an explicit backend selector.

A resizable output adopts the first input's extents before mdspans are resolved. Fixed outputs validate the same shape. Input elements are passed to the callable as values.

Precondition
Input operands have equal extents and output does not overlap an input.

◆ assign_transform() [6/9]

template<class BackendSelector , AsyncTensorOutput OutputTensor, class Function >
void uni20::assign_transform ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Function &&  function 
)

Schedule a nullary overwrite of an existing async Tensor.

The output must already contain a Tensor. The old element values are not read or passed to the callable.

◆ assign_transform() [7/9]

template<class BackendSelector , AsyncTensorOutput OutputTensor, class Function , TensorView FirstInputTensor, TensorView... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void uni20::assign_transform ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Function &&  function,
async::Async< FirstInputTensor > const &  first_input,
async::Async< RestInputTensors > const &...  rest_inputs 
)

Schedule a variadic elementwise overwrite with an explicit backend selector.

Every Tensor operand is asynchronous. The callable is owned by the coroutine and invoked as const by the selected synchronous backend. An unconstructed output is initialized when its Tensor type can be constructed from the first input's extents.

Precondition
The output must not share an epoch queue with any input.

◆ assign_transform() [8/9]

template<MutableTensorView OutputTensor, class Function >
void uni20::assign_transform ( OutputTensor &&  output,
Function &&  function 
)

Overwrite a fixed-shape Tensor from a nullary element generator.

◆ assign_transform() [9/9]

template<class OutputTensor , class Function , class FirstInputTensor , class... RestInputTensors>
requires detail::OverwriteTransformTensors<OutputTensor, FirstInputTensor, RestInputTensors...>
void uni20::assign_transform ( OutputTensor &&  output,
Function &&  function,
FirstInputTensor const &  first_input,
RestInputTensors const &...  rest_inputs 
)

Overwrite a Tensor output using its operands' default backend selector.

◆ at_precision()

template<TensorView Input>
auto uni20::at_precision ( Input const &  input,
Precision  p 
)

Materialize an owning tensor with every element converted to p.

The source is unchanged; the result's construction default is p. Unset source elements are not numerical values and conversion throws.

◆ atan() [1/2]

mpreal uni20::atan ( mpreal const &  x)
inline

◆ atan() [2/2]

mpreal uni20::atan ( mpreal const &  x,
Precision  p 
)
inline

Evaluate atan(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ atan2() [1/2]

mpreal uni20::atan2 ( mpreal const &  y,
mpreal const &  x 
)
inline

◆ atan2() [2/2]

mpreal uni20::atan2 ( mpreal const &  y,
mpreal const &  x,
Precision  p 
)
inline

Evaluate atan2(y.at(p), x.at(p)), overriding both operands' precisions.

Exceptions
std::logic_errorIf p is exact or either operand is unset.

◆ atan2pi() [1/2]

mpreal uni20::atan2pi ( mpreal const &  y,
mpreal const &  x 
)
inline

Quadrant-aware arctangent of y/x, divided by pi.

Exact axes and diagonals retain rational results; two exact zeros have no direction and throw. Finite inputs follow MPFR signed-zero rules.

◆ atan2pi() [2/2]

mpreal uni20::atan2pi ( mpreal const &  y,
mpreal const &  x,
Precision  p 
)
inline

Convert y and x to p, then evaluate atan2pi(y,x) at p.

◆ atanh() [1/2]

mpreal uni20::atanh ( mpreal const &  x)
inline

Inverse hyperbolic tangent; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ atanh() [2/2]

mpreal uni20::atanh ( mpreal const &  x,
Precision  p 
)
inline

Evaluate atanh(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ atanpi() [1/2]

mpreal uni20::atanpi ( mpreal const &  x)
inline

Principal arctangent divided by pi.

◆ atanpi() [2/2]

mpreal uni20::atanpi ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate atanpi at p.

◆ axpy()

template<MutableBlockTensorView Output, class Scalar , BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void uni20::axpy ( Output &  output,
Scalar  factor,
Input const &  input 
)

Compute output += factor * input without changing either key pattern.

A generalized-diagonal output requires a generalized-diagonal input.

Precondition
Distinct output and input values do not have overlapping numerical storage.
Exceptions
std::invalid_argumentIf the symmetry or boundary values differ, or the output omits an input key.

◆ bessel_j() [1/2]

template<detail::MathInteger I>
mpreal uni20::bessel_j ( I  n,
mpreal const &  x 
)
inline

Bessel function of the first kind, with a checked signed integer order.

◆ bessel_j() [2/2]

template<detail::MathInteger I>
mpreal uni20::bessel_j ( I  n,
mpreal const &  x,
Precision  p 
)
inline

Convert x to p, then evaluate bessel_j(n,x) at p.

◆ bessel_y() [1/2]

template<detail::MathInteger I>
mpreal uni20::bessel_y ( I  n,
mpreal const &  x 
)
inline

Bessel function of the second kind, with a checked signed integer order.

◆ bessel_y() [2/2]

template<detail::MathInteger I>
mpreal uni20::bessel_y ( I  n,
mpreal const &  x,
Precision  p 
)
inline

Convert x to p, then evaluate bessel_y(n,x) at p.

◆ beta() [1/2]

mpreal uni20::beta ( mpreal const &  a,
mpreal const &  x 
)
inline

Real Beta function; positive rational/integer pairs retain exact values.

◆ beta() [2/2]

mpreal uni20::beta ( mpreal const &  a,
mpreal const &  x,
Precision  p 
)
inline

Convert both inputs to finite precision p, then evaluate beta at p.

◆ block_svd() [1/3]

template<ImmediateBlockTensorView Tensor, class Measurements , class Event >
requires uni20::LapackScalar<block_tensor_value_t<Tensor>> && performance::BatchMeasurementPolicy<Measurements, Event>
auto uni20::block_svd ( Tensor const &  tensor,
linalg::SvdOptions  options,
Measurements &  measurements,
Event  batch_event 
)

Factorize an immediate BlockTensorView with performance measurements.

◆ block_svd() [2/3]

template<ImmediateBlockTensorView Tensor, class Measurements , class Event , class Factorizer >
requires uni20::LapackScalar<block_tensor_value_t<Tensor>> && performance::BatchMeasurementPolicy<Measurements, Event>
auto uni20::block_svd ( Tensor const &  tensor,
linalg::SvdOptions  options,
Measurements &  measurements,
Event  batch_event,
Factorizer &&  factorizer 
)

Factorize an immediate BlockTensorView independently by conserved charge with performance measurements.

Missing stored blocks are assembled as zero submatrices inside their symmetry sector. The returned intermediate retains provider factors, logical fragment maps, and the source block execution policy for repeatable materialization. Scheduler-batch storage assembles and factorizes independent sectors concurrently, with estimated-expensive sectors submitted first. LAPACK execution within one sector remains an ordinary synchronous provider call.

Template Parameters
TensorImmediate BlockTensor-level input view.
MeasurementsCompile-time-selected performance measurement policy.
EventEvent identifier used for the sector batch.
Parameters
tensorImmediate tensor to factorize.
optionsDense provider vector-extent options.
measurementsExplicit measurement policy or collector.
batch_eventEvent identifying the sector-factorization batch.
Returns
Reusable per-charge decomposition and globally ordered spectrum.

◆ block_svd() [3/3]

template<ImmediateBlockTensorView Tensor>
requires uni20::LapackScalar<block_tensor_value_t<Tensor>>
auto uni20::block_svd ( Tensor const &  tensor,
linalg::SvdOptions  options = {} 
)

Factorize an immediate BlockTensorView independently by conserved charge.

This ordinary overload instantiates no performance measurements.

Template Parameters
TensorImmediate BlockTensor-level input view.
Parameters
tensorImmediate tensor to factorize.
optionsDense provider vector-extent options.
Returns
Reusable per-charge decomposition and globally ordered spectrum.

◆ cbrt() [1/2]

mpreal uni20::cbrt ( mpreal const &  x)
inline

Real cube root, including negative arguments; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ cbrt() [2/2]

mpreal uni20::cbrt ( mpreal const &  x,
Precision  p 
)
inline

Evaluate cbrt(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ ceil() [1/2]

mpreal uni20::ceil ( mpreal const &  x)
inline

Round toward positive infinity; exact inputs produce exact integers.

◆ ceil() [2/2]

mpreal uni20::ceil ( mpreal const &  x,
Precision  p 
)
inline

Round toward positive infinity, then round the result to finite precision p.

The input is not rounded first. Approximate signed zero is retained.

◆ Codomain()

template<class... Spaces>
uni20::Codomain ( Spaces &&  ...) -> Codomain< std::remove_cvref_t< Spaces >... >

Deduce a codomain's concrete value types.

◆ coerce()

auto uni20::coerce ( QNum const &  q,
Symmetry  target 
) -> QNum
inline

Coerce a quantum number into a related symmetry by named components.

Parameters
qSource quantum number.
targetTarget symmetry.
Returns
Coerced quantum number in the target symmetry.

◆ common_default_precision()

template<TensorView A, TensorView B>
constexpr Precision uni20::common_default_precision ( A const &  a,
B const &  b 
)
constexpr

Select a binary operation's default without inspecting element precisions.

Exact defaults are neutral. Missing or differing finite defaults require explicit operation precision. Two exact defaults remain exact; approximation-only kernels require a finite override.

◆ common_precision()

constexpr Precision uni20::common_precision ( Precision  a,
Precision  b 
)
constexpr

Combine precisions, treating exact values as neutral and rejecting unequal finite precisions.

◆ complement_svd_selection()

template<uni20::Real Real>
auto uni20::complement_svd_selection ( std::span< BlockSvdState< Real > const >  spectrum,
BlockSvdSelection< Real > const &  selection 
) -> BlockSvdSelection<Real>

Select every paired state not present in an existing selection.

◆ compound() [1/2]

template<detail::MathInteger I>
mpreal uni20::compound ( mpreal const &  x,
I  n 
)
inline

Compute (1+x)^n without rounding the sum first, for x >= -1.

The integer exponent is checked against the signed 64-bit domain. Exact inputs retain rational results. Approximate inputs use MPFR.

◆ compound() [2/2]

template<detail::MathInteger I>
mpreal uni20::compound ( mpreal const &  x,
I  n,
Precision  p 
)
inline

Round the compound result from the original input to finite precision p.

◆ compute_heavy_operation()

double uni20::compute_heavy_operation ( double  a,
double  b 
)

◆ configured_scalar_precision_choices()

constexpr std::string_view uni20::configured_scalar_precision_choices ( )
constexpr

Return a compact choice list suitable for command-line help.

Returns
Pipe-separated configured precision names.

◆ configured_scalar_precisions()

constexpr std::span< ScalarPrecision const > uni20::configured_scalar_precisions ( )
constexpr

Return the real scalar precisions configured in this build.

Returns
Stable, ascending sequence of available precisions.

◆ conj() [1/16]

template<TensorView Tensor>
constexpr auto uni20::conj ( ConjugatedTensorView< Tensor > &&  view)
constexprnoexcept

Cancel a temporary tensor conjugation view and return its durable base tensor.

◆ conj() [2/16]

template<TensorView Tensor>
constexpr auto uni20::conj ( ConjugatedTensorView< Tensor > &  view)
constexprnoexcept

Cancel a tensor conjugation view and return the read-only base tensor.

◆ conj() [3/16]

template<TensorView Tensor>
constexpr auto uni20::conj ( ConjugatedTensorView< Tensor > const &  view)
constexprnoexcept

Cancel a const tensor conjugation view and return the read-only base tensor.

◆ conj() [4/16]

template<TensorView Tensor>
requires Complex<tensor_element_t<Tensor>>
constexpr auto uni20::conj ( ConstTensorView< Tensor > &&  view)
constexprnoexcept

Reapply conjugation to a temporary read-only complex tensor view.

◆ conj() [5/16]

template<TensorView Tensor>
requires Complex<tensor_element_t<Tensor>>
constexpr auto uni20::conj ( ConstTensorView< Tensor > &  view)
constexprnoexcept

Reapply conjugation to a read-only complex tensor view.

◆ conj() [6/16]

template<TensorView Tensor>
requires Complex<tensor_element_t<Tensor>>
constexpr auto uni20::conj ( ConstTensorView< Tensor > const &  view)
constexprnoexcept

Reapply conjugation to a const read-only complex tensor view.

◆ conj() [7/16]

mpcomplex uni20::conj ( mpcomplex const &  z)
inline

◆ conj() [8/16]

mpreal uni20::conj ( mpreal const &  x)
inline

◆ conj() [9/16]

template<MdspanLike Span>
requires (uni20::Complex<std::remove_cv_t<typename Span::element_type>> && !accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto uni20::conj ( Span const &  span)
constexpr

Return a read-only mdspan view that presents conjugated complex values.

◆ conj() [10/16]

template<MdspecLike Span>
requires (!MdspanLike<Span> && uni20::Complex<std::remove_cv_t<typename Span::element_type>> && !accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto uni20::conj ( Span const &  span)
constexpr

Return a read-only deferred view that presents conjugated complex values.

◆ conj() [11/16]

template<MdspanLike Span>
requires (uni20::Complex<std::remove_cv_t<typename Span::element_type>> && accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto uni20::conj ( Span const &  span)
constexpr

Cancel a conjugating mdspan accessor and return the underlying view.

◆ conj() [12/16]

template<MdspecLike Span>
requires (!MdspanLike<Span> && uni20::Complex<std::remove_cv_t<typename Span::element_type>> && accessor_applies_conjugation_v<typename std::remove_cvref_t<Span>::accessor_type>)
constexpr auto uni20::conj ( Span const &  span)
constexpr

Cancel conjugation on a deferred multidimensional view.

◆ conj() [13/16]

template<MdspanLike Span>
requires (!uni20::Complex<std::remove_cv_t<typename Span::element_type>>)
constexpr auto uni20::conj ( Span const &  span)
constexpr

Return a read-only identity view for non-complex mdspan-like views.

◆ conj() [14/16]

template<MdspecLike Span>
requires (!MdspanLike<Span> && !uni20::Complex<std::remove_cv_t<typename Span::element_type>>)
constexpr auto uni20::conj ( Span const &  span)
constexpr

Return a read-only identity view for a non-complex deferred view.

◆ conj() [15/16]

template<TensorView Tensor>
requires (std::is_lvalue_reference_v<Tensor &&> && Complex<tensor_element_t<Tensor>>)
constexpr auto uni20::conj ( Tensor &&  tensor)
constexpr

Return a lazy read-only conjugating view of a complex tensor lvalue.

◆ conj() [16/16]

template<TensorView Tensor>
requires (std::is_lvalue_reference_v<Tensor &&> && !Complex<tensor_element_t<Tensor>>)
constexpr auto uni20::conj ( Tensor &&  tensor) -> std::remove_reference_t<Tensor> const&
constexprnoexcept

Return a read-only identity view of a non-complex tensor lvalue.

◆ conjugate_inplace() [1/5]

template<AsyncTensorOutput Tensor>
void uni20::conjugate_inplace ( async::Async< Tensor > &  tensor)

Schedule eager in-place conjugation using static Tensor policy.

◆ conjugate_inplace() [2/5]

template<class BackendSelector , MutableMdspecLike Mdspec>
void uni20::conjugate_inplace ( BackendSelector &&  selector,
Mdspec &&  span 
)

Conjugate a mutable mdspec-like object through an explicit backend selector.

◆ conjugate_inplace() [3/5]

template<class BackendSelector , MutableTensorView Tensor>
void uni20::conjugate_inplace ( BackendSelector &&  selector,
Tensor &&  tensor 
)

Conjugate a mutable tensor view through an explicit backend selector.

◆ conjugate_inplace() [4/5]

template<class BackendSelector , AsyncTensorOutput Tensor>
void uni20::conjugate_inplace ( BackendSelector  selector,
async::Async< Tensor > &  tensor 
)

Schedule eager in-place conjugation through an explicit selector.

◆ conjugate_inplace() [5/5]

template<MutableTensorView Tensor>
void uni20::conjugate_inplace ( Tensor &&  tensor)

Conjugate a mutable tensor view using its storage policy's backend selector.

◆ const_accessor() [1/3]

template<AccessorPolicy Acc>
requires (std::is_const_v<typename Acc::element_type> && !is_default_accessor_v<Acc>)
constexpr Acc uni20::const_accessor ( Acc const &  acc)
constexpr

Return an accessor unchanged when its element type is already const.

Read-only calculated accessors commonly return an unqualified value while declaring const element_type; no additional adaptor is needed.

Template Parameters
AccA read-only accessor policy with const element_type.
Parameters
accThe accessor (returned by value).
Returns
The original accessor policy.

◆ const_accessor() [2/3]

template<class ElementType , class Extents >
requires (!std::is_const_v<ElementType>)
UNI20_HOST_DEVICE constexpr auto uni20::const_accessor ( diagonal_accessor< ElementType, Extents > const &  accessor)
constexpr

Convert a writable diagonal accessor to its read-only form.

◆ const_accessor() [3/3]

template<class ElementType , class Extents >
requires std::is_const_v<ElementType>
UNI20_HOST_DEVICE constexpr auto uni20::const_accessor ( diagonal_accessor< ElementType, Extents > const &  accessor)
constexpr

Return an already read-only diagonal accessor unchanged.

◆ contract() [1/4]

template<std::size_t LeftAxis, std::size_t RightAxis, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, detail::default_pairwise_storage_t<LeftTensor>>, LeftTensor, RightTensor> && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
auto uni20::contract ( LeftTensor const &  left,
RightTensor const &  right 
)

Contract one adjacent BlockTensor factor pair into an owning result.

This first host path contracts the rightmost codomain factor of left with the leftmost domain factor of right. The explicit axis positions must name those factors. Contracted spaces must be exactly equal, including labels and explicit duality. Only stored block pairs with the same contracted basis occurrence contribute; no dense symmetry-erasing materialization is permitted.

Template Parameters
LeftAxisFlattened domain-then-codomain axis of left.
RightAxisFlattened domain-then-codomain axis of right.
OutputStorageLocal storage policy for the owning result.
LeftTensorLeft BlockTensor-like operand.
RightTensorRight BlockTensor-like operand.
Parameters
leftLeft operand, whose contracted factor must be its rightmost codomain factor.
rightRight operand, whose contracted factor must be its leftmost domain factor.
Returns
Tensor over the uncontracted boundary factors.
Exceptions
std::invalid_argumentIf symmetries or contracted space values differ.

◆ contract() [2/4]

template<std::size_t LeftAxis, std::size_t RightAxis, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::AsyncMatrixContractionSource<LeftTensor> && detail::AsyncMatrixContractionSource<RightTensor> && detail::AsyncMatrixContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, typename std::remove_cvref_t<LeftTensor>::storage_policy>, LeftTensor, RightTensor> && (detail::is_async_matrix_product_geometry<detail::PairwiseContractionTraits<LeftTensor, RightTensor>>()) && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
auto uni20::contract ( LeftTensor const &  left,
RightTensor const &  right 
)

Schedule independent dense-block matrix products for an adjacent contraction.

Structure and the sparse logical worklist are constructed synchronously. Each result block has its own Async<Tensor> timeline, so distinct blocks may execute concurrently while contributions to one output block are causally serialized. The returned BlockTensor is immediate; only its numerical blocks may still be pending. This first lowering supports rank-two dense blocks with the natural matrix-product output axis order.

Template Parameters
LeftAxisFlattened domain-then-codomain axis of left.
RightAxisFlattened domain-then-codomain axis of right.
OutputStorageAsync sparse output policy, or the storage-selected default.
LeftTensorLeft async-block BlockTensor operand.
RightTensorRight async-block BlockTensor operand.
Parameters
leftLeft operand, whose contracted factor must be its rightmost codomain factor.
rightRight operand, whose contracted factor must be its leftmost domain factor.
Returns
Sparse tensor with scheduled per-block numerical values.
Precondition
An async scheduler is active on the submitting application thread.
Exceptions
std::invalid_argumentIf symmetries or contracted space values differ.

◆ contract() [3/4]

template<std::size_t LeftAxis, std::size_t RightAxis, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor> && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
void uni20::contract ( OutputTensor &  output,
LeftTensor const &  left,
RightTensor const &  right 
)

Overwrite a fixed BlockTensor with one adjacent pairwise contraction.

The output structure is immutable: it must have the exact result symmetry and boundaries and store every block produced by the sparse worklist. Additional stored output blocks are set to zero. Immediate storage completes before return.

Template Parameters
LeftAxisFlattened domain-then-codomain axis of left.
RightAxisFlattened domain-then-codomain axis of right.
Parameters
outputExisting output whose numerical value is replaced.
leftLeft operand, whose contracted factor must be its rightmost codomain factor.
rightRight operand, whose contracted factor must be its leftmost domain factor.
Precondition
Output numerical storage does not overlap either input.
Exceptions
std::invalid_argumentIf input spaces are incompatible, the output is an input object, or its fixed structure cannot represent the result.

◆ contract() [4/4]

template<std::size_t LeftAxis, std::size_t RightAxis, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && detail::AsyncMatrixContractionSource<LeftTensor> && detail::AsyncMatrixContractionSource<RightTensor> && detail::AsyncMatrixFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor> && (detail::is_async_matrix_product_geometry<detail::PairwiseContractionTraits<LeftTensor, RightTensor>>()) && (LeftAxis == std::remove_cvref_t<LeftTensor>::order() - 1) && (RightAxis == 0)
void uni20::contract ( OutputTensor &  output,
LeftTensor const &  left,
RightTensor const &  right 
)

Schedule an adjacent pairwise contraction into fixed async BlockTensor storage.

Validation completes synchronously before output epochs are modified. Output-only blocks are scheduled to become zero; contributing blocks are initialized by their first product and subsequent products accumulate in that block's epoch order.

Precondition
An async scheduler is active on the submitting application thread.
Output numerical storage does not overlap either input.
Exceptions
std::invalid_argumentIf input spaces are incompatible, the output is an input object, or its fixed structure cannot represent the result.

◆ contract_adjacent() [1/2]

template<std::size_t ContractedCount, class OutputStorage = detail::DefaultPairwiseContractionStorage, class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && (ContractedCount > 0) && (ContractedCount <= std::remove_cvref_t<LeftTensor>::codomain_type::size()) && (ContractedCount <= std::remove_cvref_t<RightTensor>::domain_type::size()) && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalContractionOutput< detail::selected_pairwise_storage_t<OutputStorage, detail::default_pairwise_storage_t<LeftTensor>>, LeftTensor, RightTensor, ContractedCount>
auto uni20::contract_adjacent ( LeftTensor const &  left,
RightTensor const &  right 
)

Contract an adjacent group of BlockTensor boundary factors.

Contracts the last ContractedCount codomain factors of left with the first ContractedCount domain factors of right in planar order. Every paired space must be exactly equal. Sparse worklist generation matches all contracted block coordinates, and the dense leaf contraction lowers every contracted degeneracy axis together through the ordinary tensor contraction dispatcher.

Template Parameters
ContractedCountNumber of adjacent factor pairs to contract.
OutputStorageLocal storage for the owning result. A complete policy also stores legal zero result blocks.
LeftTensorLeft BlockTensor-like operand.
RightTensorRight BlockTensor-like operand.
Parameters
leftOperand contributing the contracted codomain suffix.
rightOperand contributing the contracted domain prefix.
Returns
Tensor over all uncontracted factors.
Exceptions
std::invalid_argumentIf symmetries or any paired space values differ.

◆ contract_adjacent() [2/2]

template<std::size_t ContractedCount, class OutputTensor , class LeftTensor , class RightTensor >
requires detail::PairwiseContractionSources<LeftTensor, RightTensor> && (ContractedCount > 0) && (ContractedCount <= std::remove_cvref_t<LeftTensor>::codomain_type::size()) && (ContractedCount <= std::remove_cvref_t<RightTensor>::domain_type::size()) && detail::LocalContractionSource<LeftTensor> && detail::LocalContractionSource<RightTensor> && detail::LocalFixedPairwiseContractionOutput<OutputTensor, LeftTensor, RightTensor, ContractedCount>
void uni20::contract_adjacent ( OutputTensor &  output,
LeftTensor const &  left,
RightTensor const &  right 
)

Overwrite a fixed BlockTensor with an adjacent group contraction.

The output must have the exact result boundary and contain every worklist-produced key. Additional stored blocks become zero.

Template Parameters
ContractedCountNumber of adjacent factor pairs to contract.
Parameters
outputExisting fixed-structure result tensor.
leftOperand contributing the contracted codomain suffix.
rightOperand contributing the contracted domain prefix.
Precondition
Output numerical storage does not overlap either input.
Exceptions
std::invalid_argumentIf inputs or fixed output are incompatible.

◆ convert_tensor_extents()

template<class TargetExtents , TensorExtentsLike SourceExtents>
TargetExtents uni20::convert_tensor_extents ( SourceExtents const &  source)

Convert tensor extents while validating the target's static extents.

◆ copy() [1/6]

template<class OutputTensor , class InputTensor >
requires detail::AsyncCopyTensors<OutputTensor, InputTensor>
void uni20::copy ( async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input 
)

Schedule a Tensor copy using the storage backend list.

◆ copy() [2/6]

template<class BackendSelector , class OutputMdspan , class InputMdspan >
requires detail::CopySpans<OutputMdspan, InputMdspan>
void uni20::copy ( BackendSelector &&  selector,
OutputMdspan &&  output,
InputMdspan &&  input 
)

Copy between fixed-shape mdspan-like operands through an explicit selector.

Accessor semantics are observed by the selected backend, so a conjugating input remains a lazy view until this explicit copy. The operands enter operation-tag dispatch as normalized device mdspans.

Precondition
Input and output do not destructively overlap.

◆ copy() [3/6]

template<class BackendSelector , class OutputTensor , class InputTensor >
requires detail::CopyTensors<OutputTensor, InputTensor>
void uni20::copy ( BackendSelector &&  selector,
OutputTensor &&  output,
InputTensor const &  input 
)

Copy into a resizable or already-compatible tensor through an explicit selector.

Shape preparation occurs before either resolved mdspan is acquired.

Precondition
Input and output do not destructively overlap.

◆ copy() [4/6]

template<class BackendSelector , class OutputTensor , class InputTensor >
requires detail::AsyncCopyTensors<OutputTensor, InputTensor>
void uni20::copy ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input 
)

Schedule a Tensor copy through an explicit backend selector.

CUDA-to-CUDA copies may complete their outer epoch after submission; the destination buffer ledger then carries device completion. A pageable host transfer runs its necessarily blocking CUDA call on the scheduler task.

Precondition
The output has a distinct epoch queue from the input. An unconstructed context-bound output can be prepared only when placement is available from the input descriptor.

◆ copy() [5/6]

template<MutableBlockTensorView Output, BlockTensorView Input>
requires detail::CompatibleBlockTensorValues<Output, Input> && detail::CompatibleLinearOutputRepresentation<Output, Input> && ((!MutableAsyncBlockTensorView<Output> && !AsyncBlockTensorView<Input>) || (MutableAsyncBlockTensorView<Output> && AsyncBlockTensorView<Input>))
void uni20::copy ( Output &  output,
Input const &  input 
)

Copy a BlockTensor value into an existing fixed output structure.

A generalized-diagonal output requires a generalized-diagonal input.

Precondition
Distinct output and input values do not have overlapping numerical storage.
Exceptions
std::invalid_argumentIf the symmetry or boundary values differ, or the output omits an input key.

◆ copy() [6/6]

template<class OutputTensor , class InputTensor >
requires detail::CopyTensors<OutputTensor, InputTensor>
void uni20::copy ( OutputTensor &&  output,
InputTensor const &  input 
)

Copy into a tensor using the operands' default backend selector.

◆ copysign() [1/2]

mpreal uni20::copysign ( mpreal const &  magnitude,
mpreal const &  sign 
)
inline

Transfer the sign while preserving the magnitude's precision and exactness.

◆ copysign() [2/2]

mpreal uni20::copysign ( mpreal const &  magnitude,
mpreal const &  sign,
Precision  p 
)
inline

Round the magnitude to p and transfer the sign; sign precision is immaterial.

◆ cos() [1/4]

mpcomplex uni20::cos ( mpcomplex const &  z)
inline

◆ cos() [2/4]

mpcomplex uni20::cos ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate cos(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ cos() [3/4]

mpreal uni20::cos ( mpreal const &  x)
inline

◆ cos() [4/4]

mpreal uni20::cos ( mpreal const &  x,
Precision  p 
)
inline

Evaluate cos(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ cosh() [1/4]

mpcomplex uni20::cosh ( mpcomplex const &  z)
inline

Hyperbolic cosine at the input precision; exact zero returns exact one.

◆ cosh() [2/4]

mpcomplex uni20::cosh ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate cosh(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ cosh() [3/4]

mpreal uni20::cosh ( mpreal const &  x)
inline

Hyperbolic cosine; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ cosh() [4/4]

mpreal uni20::cosh ( mpreal const &  x,
Precision  p 
)
inline

Evaluate cosh(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ cospi() [1/2]

mpreal uni20::cospi ( mpreal const &  x)
inline

Cosine of pi times x, with provider argument reduction.

◆ cospi() [2/2]

mpreal uni20::cospi ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate cospi at p.

◆ cot() [1/2]

mpreal uni20::cot ( mpreal const &  x)
inline

Reciprocal tangent, evaluated directly by MPFR.

◆ cot() [2/2]

mpreal uni20::cot ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate cot at p.

◆ coth() [1/2]

mpreal uni20::coth ( mpreal const &  x)
inline

Reciprocal hyperbolic tangent, evaluated directly by MPFR.

◆ coth() [2/2]

mpreal uni20::coth ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate coth at p.

◆ csc() [1/2]

mpreal uni20::csc ( mpreal const &  x)
inline

Reciprocal sine, evaluated directly by MPFR.

◆ csc() [2/2]

mpreal uni20::csc ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate csc at p.

◆ csch() [1/2]

mpreal uni20::csch ( mpreal const &  x)
inline

Reciprocal hyperbolic sine, evaluated directly by MPFR.

◆ csch() [2/2]

mpreal uni20::csch ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate csch at p.

◆ degree() [1/2]

auto uni20::degree ( QNum const &  q) -> int
inline

Return the integral degree of a quantum number.

Parameters
qQuantum number to inspect.
Returns
Product of factor degrees.

◆ degree() [2/2]

constexpr auto uni20::degree ( U1  value) -> int
inlineconstexpr

Return the integral degree of a U(1) irrep.

Parameters
valueU(1) irrep to inspect.
Returns
Integral degree, always 1.

◆ diagonal_components()

template<class ElementType , class Extents , class LayoutPolicy , class AccessorExtents >
requires (Extents::rank() == AccessorExtents::rank())
constexpr auto uni20::diagonal_components ( stdex::mdspan< ElementType, Extents, LayoutPolicy, diagonal_accessor< ElementType, AccessorExtents > > const &  span)
constexpr

Expose the physically stored values of a generalized-diagonal mdspan.

The returned rank-one mdspan preserves the component origin and stride of aligned offset or stepped views. The source remains the full logical rank-N mdspan whose off-diagonal accesses observe zero.

Template Parameters
ElementTypePresented component type, possibly const-qualified.
ExtentsFull logical tensor extents.
LayoutPolicyLogical mdspan layout policy.
AccessorExtentsOriginal extents used by the diagonal accessor to decode offsets.
Parameters
spanFull generalized-diagonal mdspan.
Returns
Rank-one strided mdspan over the stored diagonal components.
Exceptions
std::invalid_argumentIf the logical view does not begin on or advance along the represented diagonal.

◆ digamma() [1/2]

mpreal uni20::digamma ( mpreal const &  x)
inline

Logarithmic derivative of Gamma; finite working precision is required.

◆ digamma() [2/2]

mpreal uni20::digamma ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate digamma at p.

◆ dilog_real() [1/2]

mpreal uni20::dilog_real ( mpreal const &  x)
inline

Real part of the dilogarithm; this is not a complex branch-valued API.

◆ dilog_real() [2/2]

mpreal uni20::dilog_real ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate dilog_real at p.

◆ Domain()

template<class... Spaces>
uni20::Domain ( Spaces &&  ...) -> Domain< std::remove_cvref_t< Spaces >... >

Deduce a domain's concrete value types.

◆ dual() [1/6]

template<class SpaceType >
auto uni20::dual ( Dual< SpaceType > &&  space) -> SpaceType

Remove explicit duality while moving a dual-space value.

Template Parameters
SpaceTypeUnderlying primal-basis space type.
Parameters
spaceDual-basis space value.
Returns
Moved underlying primal-basis value.

◆ dual() [2/6]

template<class SpaceType >
auto uni20::dual ( Dual< SpaceType > const &  space) -> SpaceType

Remove explicit duality from a dual-space value.

Template Parameters
SpaceTypeUnderlying primal-basis space type.
Parameters
spaceDual-basis space value.
Returns
Copy of the underlying primal-basis value.

◆ dual() [3/6]

auto uni20::dual ( QNum const &  q) -> QNum
inline

Return the dual irrep of a quantum number.

Parameters
qQuantum number to dualize.
Returns
Dual quantum number in the same symmetry.

◆ Dual()

template<class SpaceType >
uni20::Dual ( SpaceType &&  ) -> Dual< std::remove_cvref_t< SpaceType > >

◆ dual() [4/6]

template<Space SpaceType>
requires (!DualSpace<SpaceType>)
auto uni20::dual ( SpaceType &&  space) -> Dual<std::remove_cvref_t<SpaceType>>

Construct an explicitly dual basis by moving a space value.

Template Parameters
SpaceTypeConcrete primal-basis space type.
Parameters
spaceSpace value to adapt.
Returns
Dual-basis adaptor owning the moved space value.

◆ dual() [5/6]

template<Space SpaceType>
requires (!DualSpace<SpaceType>)
auto uni20::dual ( SpaceType const &  space) -> Dual<std::remove_cvref_t<SpaceType>>

Construct an explicitly dual basis without changing occurrence order.

Template Parameters
SpaceTypeConcrete primal-basis space type.
Parameters
spaceSpace value to adapt.
Returns
Dual-basis adaptor owning a copy of the space value.

◆ dual() [6/6]

constexpr auto uni20::dual ( U1  value) -> U1
inlineconstexpr

Return the dual U(1) irrep.

Parameters
valueU(1) irrep to dualize.
Returns
U(1) irrep with negated charge.

◆ elliptic_theta_constant() [1/2]

template<detail::ThetaReal R>
theta_constant_result< R > uni20::elliptic_theta_constant ( unsigned  kind,
R const &  t,
Precision  p,
std::size_t  max_terms = 4096 
)

Convert t to explicit precision p, then evaluate its scaled theta constant.

Native types require their own precision; MPFR accepts finite p and can round exact input. This overload does not infer a precision from defaults.

◆ elliptic_theta_constant() [2/2]

template<detail::ThetaReal R>
theta_constant_result< R > uni20::elliptic_theta_constant ( unsigned  kind,
R const &  t,
std::size_t  max_terms = 4096 
)

Evaluate theta_kind(0 | i*t), kind=2,3,4 and finite t>0, in scaled form.

Uses a rapidly convergent Fourier series after a modular transformation. Native arithmetic stays native. MPFR uses 32 guard bits and rounds both result fields to t's precision, without changing ambient precision. max_terms bounds the number of inspected nonconstant terms, including the first omitted term used to bound the tail. The default permits substantially more precision than ordinary numerical applications need.

Exceptions
std::invalid_argumentfor an invalid kind/domain/budget or exact precision; std::overflow_error if the logarithmic scale is unrepresentable; std::runtime_error if the term budget is exhausted.

◆ elliptic_theta_jet() [1/2]

template<Complex C>
requires detail::ThetaReal<make_real_t<C>>
theta_jet_result< C > uni20::elliptic_theta_jet ( unsigned  kind,
C const &  u,
make_real_t< C > const &  t,
Precision  p,
std::size_t  max_terms = 4096 
)

Convert both arguments to p before evaluating the scaled theta jet.

Native types require their own precision; exact MPC inputs can be rounded to finite p. All result fields retain p.

◆ elliptic_theta_jet() [2/2]

template<Complex C>
requires detail::ThetaReal<make_real_t<C>>
theta_jet_result< C > uni20::elliptic_theta_jet ( unsigned  kind,
C const &  u,
make_real_t< C > const &  t,
std::size_t  max_terms = 4096 
)

Evaluate theta_kind(pi*u | i*t) and its first two u derivatives.

Rectangular lattice only: finite t>0, kind 1..4. Inputs share one finite precision. The Fourier/Gaussian series is reduced to a fundamental rectangle and differentiated before restoring periods. Native arithmetic remains native; MPC uses 32 guard bits and rounds every field back to the input precision. No ambient state changes. max_terms bounds each reduced series, including its truncation margin.

Exceptions
std::invalid_argumentfor invalid kind/domain/precision or zero budget; std::runtime_error for insufficient terms; std::overflow_error for unrepresentable argument reduction, scale or scaled derivatives.

◆ elliptic_theta_ratio()

template<Complex C>
requires detail::ThetaReal<make_real_t<C>>
C uni20::elliptic_theta_ratio ( theta_jet_result< C > const &  a,
unsigned  da,
theta_jet_result< C > const &  b,
unsigned  db 
)

Ratio of two scaled theta derivatives without reconstructing either jet.

Derivative orders are 0..2; only the selected components are used. A zero numerator returns zero at the common finite precision. Small denominators and rounded scales can amplify relative error.

Exceptions
std::invalid_argumentfor invalid orders or inconsistent precision; std::domain_error for a zero denominator; std::overflow_error when the ratio magnitude is outside the scalar range.

◆ epsilon()

mpreal uni20::epsilon ( Precision  precision)
inline

Spacing above one for a specified binary working precision.

◆ erf() [1/2]

mpreal uni20::erf ( mpreal const &  x)
inline

Error function, retaining exact zero or the input precision.

◆ erf() [2/2]

mpreal uni20::erf ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate erf at p.

◆ erfc() [1/2]

mpreal uni20::erfc ( mpreal const &  x)
inline

Complementary error function, evaluated without subtracting erf from one.

◆ erfc() [2/2]

mpreal uni20::erfc ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate erfc at p.

◆ exp() [1/4]

mpcomplex uni20::exp ( mpcomplex const &  z)
inline

◆ exp() [2/4]

mpcomplex uni20::exp ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate exp(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ exp() [3/4]

mpreal uni20::exp ( mpreal const &  x)
inline

◆ exp() [4/4]

mpreal uni20::exp ( mpreal const &  x,
Precision  p 
)
inline

Evaluate exp(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ exp10() [1/2]

mpreal uni20::exp10 ( mpreal const &  x)
inline

Base-ten exponential.

◆ exp10() [2/2]

mpreal uni20::exp10 ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate exp10 at p.

◆ exp10m1() [1/2]

mpreal uni20::exp10m1 ( mpreal const &  x)
inline

Ten to the power x minus one, using the cancellation-safe provider.

◆ exp10m1() [2/2]

mpreal uni20::exp10m1 ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate exp10m1 at p.

◆ exp2() [1/2]

mpreal uni20::exp2 ( mpreal const &  x)
inline

Base-two exponential; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ exp2() [2/2]

mpreal uni20::exp2 ( mpreal const &  x,
Precision  p 
)
inline

Evaluate exp2(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ exp2m1() [1/2]

mpreal uni20::exp2m1 ( mpreal const &  x)
inline

Two to the power x minus one, using the cancellation-safe provider.

◆ exp2m1() [2/2]

mpreal uni20::exp2m1 ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate exp2m1 at p.

◆ expint() [1/2]

mpreal uni20::expint ( mpreal const &  x)
inline

Real exponential integral Ei, with its real principal-value meaning.

◆ expint() [2/2]

mpreal uni20::expint ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate expint at p.

◆ expm1() [1/2]

mpreal uni20::expm1 ( mpreal const &  x)
inline

Exponential minus one without cancellation; retain input precision or exact zero.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ expm1() [2/2]

mpreal uni20::expm1 ( mpreal const &  x,
Precision  p 
)
inline

Evaluate expm1(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ eye()

template<Scalar ElementType, std::integral... Extents>
auto uni20::eye ( Extents...  extents)

Return a generated tensor equal to one exactly when all indices agree.

Rank-zero eye is scalar one and rank-one eye is an all-ones vector. Extents need not be equal; the nonzero diagonal length is the minimum extent.

◆ factorial() [1/3]

template<detail::native_math::NativeReal R, detail::MathInteger I>
R uni20::factorial ( I  n)

Factorial of a checked nonnegative integer, with an explicit native result type.

Returns positive infinity on native overflow. Uses compensated multiplication and work bounded by the native exponent range, even for a huge integer order.

Exceptions
std::domain_errorfor a negative order; std::out_of_range beyond signed64.

◆ factorial() [2/3]

template<detail::native_math::NativeReal R, detail::MathInteger I>
R uni20::factorial ( I  n,
Precision  p 
)

Typed factorial factory with a checked native precision argument.

Exceptions
std::invalid_argumentif p differs from the native result precision.

◆ factorial() [3/3]

template<detail::MathInteger I>
mpreal uni20::factorial ( I  n,
Precision  p 
)
inline

Factorial of a nonnegative integer, at an explicitly chosen arithmetic state.

Precision::exact() constructs the full exact integer; finite precision uses MPFR's factorial routine. Exact values may require large storage.

◆ fdim() [1/2]

mpreal uni20::fdim ( mpreal const &  a,
mpreal const &  b 
)
inline

Positive difference max(a-b,0), propagating NaNs.

◆ fdim() [2/2]

mpreal uni20::fdim ( mpreal const &  a,
mpreal const &  b,
Precision  p 
)
inline

Positive difference with one rounding at p, without input conversion.

◆ fill() [1/4]

template<AsyncTensorOutput OutputTensor, class Value >
void uni20::fill ( async::Async< OutputTensor > &  output,
Value &&  value 
)

Fill an existing async Tensor without reading its old values.

◆ fill() [2/4]

template<class BackendSelector , class Output , class Value >
requires (detail::OverwriteTransformSpans<Output> || MutableTensorView<Output>)
void uni20::fill ( BackendSelector &&  selector,
Output &&  output,
Value &&  value 
)

Fill a fixed-shape mdspan or Tensor without reading its old values.

◆ fill() [3/4]

template<class BackendSelector , AsyncTensorOutput OutputTensor, class Value >
void uni20::fill ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Value &&  value 
)

Fill an existing async Tensor without reading its old values.

◆ fill() [4/4]

template<MutableTensorView Output, class Value >
void uni20::fill ( Output &&  output,
Value &&  value 
)

Fill a fixed-shape Tensor without reading its old values.

◆ floor() [1/2]

mpreal uni20::floor ( mpreal const &  x)
inline

Round toward negative infinity; exact inputs produce exact integers.

◆ floor() [2/2]

mpreal uni20::floor ( mpreal const &  x,
Precision  p 
)
inline

Round toward negative infinity, then round the result to finite precision p.

The input is not rounded first. Approximate signed zero is retained.

◆ fma() [1/2]

mpreal uni20::fma ( mpreal const &  a,
mpreal const &  b,
mpreal const &  c 
)
inline

Compute a*b+c with one rounding, including mixed exact rational operands.

◆ fma() [2/2]

mpreal uni20::fma ( mpreal const &  a,
mpreal const &  b,
mpreal const &  c,
Precision  p 
)
inline

Round a*b+c once at p, without converting operands first.

◆ fmax() [1/2]

mpreal uni20::fmax ( mpreal const &  a,
mpreal const &  b 
)
inline

Maximum with NaN suppression and positive-zero preference.

◆ fmax() [2/2]

mpreal uni20::fmax ( mpreal const &  a,
mpreal const &  b,
Precision  p 
)
inline

Select the maximum before rounding it to result precision p.

◆ fmin() [1/2]

mpreal uni20::fmin ( mpreal const &  a,
mpreal const &  b 
)
inline

Minimum with NaN suppression and negative-zero preference.

◆ fmin() [2/2]

mpreal uni20::fmin ( mpreal const &  a,
mpreal const &  b,
Precision  p 
)
inline

Select the minimum before rounding it to result precision p.

◆ fmod() [1/2]

mpreal uni20::fmod ( mpreal const &  a,
mpreal const &  b 
)
inline

Truncating-quotient remainder; exact operands retain exact rational results.

◆ fmod() [2/2]

mpreal uni20::fmod ( mpreal const &  a,
mpreal const &  b,
Precision  p 
)
inline

Truncating-quotient remainder, rounding only the result at p.

◆ frexp() [1/2]

frexp_result< mpreal > uni20::frexp ( mpreal const &  x)
inline

Decompose into a binary fraction and signed 64-bit exponent.

Zero/nonfinite inputs return exponent zero. Nonzero finite fractions have magnitude in [1/2,1); exact rational inputs remain exact.

◆ frexp() [2/2]

frexp_result< mpreal > uni20::frexp ( mpreal const &  x,
Precision  p 
)
inline

Decompose and round the fraction at p, normalizing any rounding carry.

◆ from_twice()

template<std::signed_integral T>
constexpr auto uni20::from_twice ( T  twice_value) -> basic_half_int<T>
constexpr

Construct a half-integer from its doubled representation.

Template Parameters
TSigned storage type.
Parameters
twice_valueDoubled representation.
Returns
Half-integer value with that doubled representation.

◆ full()

template<Scalar ElementType, std::integral... Extents>
auto uni20::full ( ElementType  value,
Extents...  extents 
)

Return a generated tensor filled with one scalar value.

◆ hypot() [1/2]

mpreal uni20::hypot ( mpreal const &  x,
mpreal const &  y 
)
inline

◆ hypot() [2/2]

mpreal uni20::hypot ( mpreal const &  x,
mpreal const &  y,
Precision  p 
)
inline

Evaluate hypot(x.at(p), y.at(p)), overriding both operands' precisions.

Exceptions
std::logic_errorIf p is exact or either operand is unset.

◆ ilogb()

std::int64_t uni20::ilogb ( mpreal const &  x)
inline

Base-two exponent of a finite nonzero value.

Exceptions
std::domain_errorFor zero, infinity or NaN.

◆ imag()

mpreal uni20::imag ( mpcomplex const &  z)
inline

◆ inner_product() [1/10]

template<TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto uni20::inner_product ( async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs 
)

Return an async storage-preserving Tensor inner product using static Tensor policy.

◆ inner_product() [2/10]

template<AsyncTensorOutput OutputTensor, TensorView LhsTensor, TensorView RhsTensor>
requires MutableScalarTensorView<OutputTensor> && detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void uni20::inner_product ( async::Async< OutputTensor > &  output,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs 
)

Schedule an inner product into an explicit async scalar Tensor using storage policy.

Precondition
The output must not share an epoch queue with either input.

◆ inner_product() [3/10]

template<class BackendSelector , class LhsTensor , class RhsTensor >
requires (!TensorView<BackendSelector>) && detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto uni20::inner_product ( BackendSelector &&  selector,
LhsTensor const &  lhs,
RhsTensor const &  rhs 
)

Return a storage-preserving rank-zero Tensor inner product.

◆ inner_product() [4/10]

template<class BackendSelector , MutableRankedMdspanLike< 0 > OutputSpan, class LhsSpan , class RhsSpan >
requires detail::CompatibleInnerProductSpans<LhsSpan, RhsSpan> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, typename std::remove_cvref_t<LhsSpan>::value_type>
void uni20::inner_product ( BackendSelector &&  selector,
OutputSpan &&  output,
LhsSpan &&  lhs,
RhsSpan &&  rhs 
)

Compute an mdspan inner product into a rank-zero output.

The operation is conjugate-linear in lhs and linear in rhs.

Precondition
All input extents agree and output does not overlap an input.

◆ inner_product() [5/10]

template<class BackendSelector , MutableScalarTensorView OutputTensor, class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void uni20::inner_product ( BackendSelector &&  selector,
OutputTensor &&  output,
LhsTensor const &  lhs,
RhsTensor const &  rhs 
)

Compute a tensor view inner product into an existing scalar tensor.

◆ inner_product() [6/10]

template<linalg::KernelBackendSelector BackendSelector, TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto uni20::inner_product ( BackendSelector  selector,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs 
)

Return an async storage-preserving Tensor inner product through an explicit selector.

◆ inner_product() [7/10]

template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView LhsTensor, TensorView RhsTensor>
requires MutableScalarTensorView<OutputTensor> && detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void uni20::inner_product ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs 
)

Schedule an inner product into an explicit async scalar Tensor.

Precondition
The output must not share an epoch queue with either input.

◆ inner_product() [8/10]

template<BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Lhs, Rhs> && RealOrComplex<block_tensor_value_t<Lhs>> && ((!AsyncBlockTensorView<Lhs> && !AsyncBlockTensorView<Rhs>) || (AsyncBlockTensorView<Lhs> && AsyncBlockTensorView<Rhs>))
auto uni20::inner_product ( Lhs const &  lhs,
Rhs const &  rhs 
)

Return the BlockTensor inner product in a host rank-zero Tensor.

Exceptions
std::invalid_argumentIf the symmetry or boundary values differ.

◆ inner_product() [9/10]

template<class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && detail::ReductionResultAvailable<tensor_element_t<LhsTensor>, LhsTensor, RhsTensor>
auto uni20::inner_product ( LhsTensor const &  lhs,
RhsTensor const &  rhs 
)

Return a storage-preserving rank-zero Tensor inner product using storage policy.

◆ inner_product() [10/10]

template<MutableScalarTensorView OutputTensor, class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<LhsTensor>>
void uni20::inner_product ( OutputTensor &&  output,
LhsTensor const &  lhs,
RhsTensor const &  rhs 
)

Compute a tensor view inner product into an existing scalar tensor using storage policy.

◆ inner_product_host() [1/6]

template<TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto uni20::inner_product_host ( async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs 
)

Return a nonblocking async host C++ scalar inner product using static Tensor policy.

◆ inner_product_host() [2/6]

template<class BackendSelector , class LhsSpan , class RhsSpan >
requires detail::CompatibleInnerProductSpans<LhsSpan, RhsSpan>
auto uni20::inner_product_host ( BackendSelector &&  selector,
LhsSpan &&  lhs,
RhsSpan &&  rhs 
) -> typename std::remove_cvref_t<LhsSpan>::value_type

Return an mdspan inner product as a host C++ scalar.

The explicit selector determines how non-host inputs produce the host-resident result.

◆ inner_product_host() [3/6]

template<class BackendSelector , class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto uni20::inner_product_host ( BackendSelector &&  selector,
LhsTensor const &  lhs,
RhsTensor const &  rhs 
) -> tensor_element_t<LhsTensor>

Return a Tensor inner product as a host C++ scalar through an explicit selector.

◆ inner_product_host() [4/6]

template<linalg::KernelBackendSelector BackendSelector, TensorView LhsTensor, TensorView RhsTensor>
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto uni20::inner_product_host ( BackendSelector  selector,
async::Async< LhsTensor > const &  lhs,
async::Async< RhsTensor > const &  rhs 
)

Return a nonblocking async host C++ scalar inner product through an explicit selector.

◆ inner_product_host() [5/6]

template<BlockTensorView Lhs, BlockTensorView Rhs>
requires detail::CompatibleBlockTensorValues<Lhs, Rhs> && RealOrComplex<block_tensor_value_t<Lhs>> && ((!AsyncBlockTensorView<Lhs> && !AsyncBlockTensorView<Rhs>) || (AsyncBlockTensorView<Lhs> && AsyncBlockTensorView<Rhs>))
auto uni20::inner_product_host ( Lhs const &  lhs,
Rhs const &  rhs 
) -> block_tensor_value_t<Lhs>

Return the conjugate-linear BlockTensor inner product as a host scalar.

Only the intersection of stored key sets contributes. Immediate parallel policies compute block partials concurrently and combine them in canonical key order. Async block inputs are awaited by this explicitly blocking operation.

Exceptions
std::invalid_argumentIf the symmetry or boundary values differ.

◆ inner_product_host() [6/6]

template<class LhsTensor , class RhsTensor >
requires detail::CompatibleInnerProductTensors<LhsTensor, RhsTensor>
auto uni20::inner_product_host ( LhsTensor const &  lhs,
RhsTensor const &  rhs 
) -> tensor_element_t<LhsTensor>

Return a Tensor inner product as a host C++ scalar using storage policy.

◆ is_exact() [1/2]

template<class T >
constexpr bool uni20::is_exact ( detail::standard_complex< T > const &  x)
constexpr

A standard complex value is exact only when both components are exact.

◆ is_exact() [2/2]

template<class T >
requires (requires(T const& x) { x.is_exact(); } || has_numeric_limits_v<T>)
constexpr bool uni20::is_exact ( T const &  x)
constexpr

Query a value's exact-arithmetic state, or its type's static exactness.

Runtime scalar types provide an is_exact() member. For ordinary scalars this returns numeric_limits<T>::is_exact: integers are exact, floating types are approximate even when their value is an integer. Unset runtime scalar values report false.

◆ is_identity()

auto uni20::is_identity ( QNum const &  q) -> bool
inline

Return whether a quantum number is the identity irrep.

Parameters
qQuantum number to test.
Returns
true if every factor is the identity.

◆ is_integral()

template<std::signed_integral T>
constexpr auto uni20::is_integral ( basic_half_int< T >  value) -> bool
constexpr

Return whether a half-integer value is integral.

Template Parameters
TSigned storage type.
Parameters
valueValue to inspect.
Returns
true if the value is integral.

◆ is_triangle()

template<std::signed_integral T>
constexpr auto uni20::is_triangle ( basic_half_int< T >  a,
basic_half_int< T >  b,
basic_half_int< T >  c 
) -> bool
constexpr

Return whether three nonnegative half-integers satisfy the triangle condition.

Template Parameters
TSigned storage type.
Parameters
aFirst side.
bSecond side.
cThird side.
Returns
true if |a-c| <= b <= a+c and a+b+c is integral.

◆ isfinite() [1/2]

bool uni20::isfinite ( mpcomplex const &  z)
inline

◆ isfinite() [2/2]

bool uni20::isfinite ( mpreal const &  x)
inline

◆ isinf() [1/2]

bool uni20::isinf ( mpcomplex const &  z)
inline

◆ isinf() [2/2]

bool uni20::isinf ( mpreal const &  x)
inline

◆ isnan() [1/2]

bool uni20::isnan ( mpcomplex const &  z)
inline

◆ isnan() [2/2]

bool uni20::isnan ( mpreal const &  x)
inline

◆ ldexp() [1/2]

template<detail::MathInteger I>
mpreal uni20::ldexp ( mpreal const &  x,
I  exponent 
)
inline

Multiply by 2^exponent, preserving exact rational state or input precision.

◆ ldexp() [2/2]

template<detail::MathInteger I>
mpreal uni20::ldexp ( mpreal const &  x,
I  exponent,
Precision  p 
)
inline

Multiply the original value by 2^exponent and round the result at p.

◆ lgamma() [1/2]

mpreal uni20::lgamma ( mpreal const &  x)
inline

Natural logarithm of abs(Gamma(x)), including negative Gamma values.

◆ lgamma() [2/2]

mpreal uni20::lgamma ( mpreal const &  x,
Precision  p 
)
inline

Convert x to p, then evaluate log(abs(Gamma(x))) at p.

◆ lgamma_sign() [1/2]

lgamma_result< mpreal > uni20::lgamma_sign ( mpreal const &  x)
inline

Log(abs(Gamma(x))) and the sign of Gamma, as owning values.

Undefined Gamma signs are reported as zero (NaN, negative infinity or negative integer poles). At signed zero the sign follows x.

◆ lgamma_sign() [2/2]

lgamma_result< mpreal > uni20::lgamma_sign ( mpreal const &  x,
Precision  p 
)
inline

Convert x to p, then evaluate log-absolute-Gamma and its sign.

◆ log() [1/4]

mpcomplex uni20::log ( mpcomplex const &  z)
inline

Principal logarithm, with the sign of imaginary zero selecting the cut side.

◆ log() [2/4]

mpcomplex uni20::log ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate log(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ log() [3/4]

mpreal uni20::log ( mpreal const &  x)
inline

◆ log() [4/4]

mpreal uni20::log ( mpreal const &  x,
Precision  p 
)
inline

Evaluate log(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ log10() [1/2]

mpreal uni20::log10 ( mpreal const &  x)
inline

Base-ten logarithm; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ log10() [2/2]

mpreal uni20::log10 ( mpreal const &  x,
Precision  p 
)
inline

Evaluate log10(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ log10p1() [1/2]

mpreal uni20::log10p1 ( mpreal const &  x)
inline

Base-ten logarithm of one plus x, without rounding the sum first.

◆ log10p1() [2/2]

mpreal uni20::log10p1 ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate log10p1 at p.

◆ log1p() [1/2]

mpreal uni20::log1p ( mpreal const &  x)
inline

Logarithm of one plus x without cancellation; retain input precision or exact zero.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ log1p() [2/2]

mpreal uni20::log1p ( mpreal const &  x,
Precision  p 
)
inline

Evaluate log1p(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ log2() [1/2]

mpreal uni20::log2 ( mpreal const &  x)
inline

Base-two logarithm; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ log2() [2/2]

mpreal uni20::log2 ( mpreal const &  x,
Precision  p 
)
inline

Evaluate log2(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ log2p1() [1/2]

mpreal uni20::log2p1 ( mpreal const &  x)
inline

Base-two logarithm of one plus x, without rounding the sum first.

◆ log2p1() [2/2]

mpreal uni20::log2p1 ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate log2p1 at p.

◆ make_const_mdspan()

template<MdspanLike Span>
constexpr auto uni20::make_const_mdspan ( Span const &  span)
constexpr

Build a read-only mdspan descriptor over the same storage and mapping.

The accessor is adapted with const_accessor, preserving its state and execution-domain classifications without copying or transferring the underlying elements.

Template Parameters
SpanImmediate mdspan-like descriptor type.
Parameters
spanDescriptor whose handle, mapping, and accessor are retained.
Returns
A read-only mdspan descriptor over the same elements.

◆ make_diagonal_mdspan()

template<class Extents , class Components >
requires RankedStridedMdspanLike<Components, 1> && DefaultAccessorMdspanLike<Components>
constexpr auto uni20::make_diagonal_mdspan ( Extents  logical_extents,
Components const &  components 
)
constexpr

Present rank-one strided components as a full generalized-diagonal mdspan.

The resulting mdspan has the supplied logical rank-N extents. It reads as zero unless every logical index is equal and delegates diagonal values to the supplied component view.

Template Parameters
ExtentsFull logical extents type.
ComponentsDefault-accessor rank-one strided mdspan type.
Parameters
logical_extentsFull logical tensor extents.
componentsStored component view with min(logical_extents) entries.
Returns
Full logical mdspan modelling DiagonalMdspecLike.
Exceptions
std::invalid_argumentIf the component extent does not match the logical diagonal extent.

◆ make_qnum()

auto uni20::make_qnum ( Symmetry  sym,
std::initializer_list< std::pair< std::string_view, U1 > >  values 
) -> QNum
inline

Construct a packed QNum from named U(1) component values.

Parameters
symTarget symmetry.
valuesNamed component assignments. Missing components default to the identity.
Returns
Packed quantum number in the requested symmetry.

◆ make_svd_selection()

template<uni20::Real Real>
auto uni20::make_svd_selection ( std::span< BlockSvdState< Real > const >  spectrum,
std::span< BlockSvdStateId const >  requested 
) -> BlockSvdSelection<Real>

Build an arbitrary paired-state selection and its exact statistics.

◆ make_tensor() [1/3]

template<TensorView InputTensor>
auto uni20::make_tensor ( async::Async< InputTensor > const &  input)

Materialize an async Tensor view as an independent owning host Tensor.

The result type and canonical layout match synchronous make_tensor.

◆ make_tensor() [2/3]

template<class RequestedLayout = void, class BackendSelector , MdspanLike InputMdspan>
auto uni20::make_tensor ( BackendSelector &&  selector,
InputMdspan &&  input 
)

Materialize a bare mdspan-like view as an inferred owning host tensor.

The caller supplies a backend selector because a bare mdspan does not carry storage-domain policy. By default the output keeps the source's canonical layout type. Inputs without a canonical physical layout use the default column-major Tensor layout. An explicit RequestedLayout overrides either choice. The result has the input's compile-time rank with runtime extents on every axis.

◆ make_tensor() [3/3]

template<class RequestedLayout = void, TensorView InputTensor>
auto uni20::make_tensor ( InputTensor const &  input)

Materialize a tensor view as an inferred owning host tensor.

This is the explicit eager boundary for lazy views such as conj(input). A canonical resolved layout is preserved unless RequestedLayout is supplied. Generated and other noncanonical inputs use the default column-major Tensor layout.

◆ materialize_left_singular_vectors()

template<class Decomposition , detail::BlockSvdStateSelection Selection>
auto uni20::materialize_left_singular_vectors ( Decomposition const &  decomposition,
Selection const &  selection,
BlockSvdMaterializationOptions  options = {} 
)

Materialize selected left singular vectors, including full null-space vectors.

◆ materialize_right_singular_vectors_adjoint()

template<class Decomposition , detail::BlockSvdStateSelection Selection>
auto uni20::materialize_right_singular_vectors_adjoint ( Decomposition const &  decomposition,
Selection const &  selection,
BlockSvdMaterializationOptions  options = {} 
)

Materialize selected right singular vectors adjoint, including full null-space vectors.

◆ materialize_svd()

template<class Decomposition >
auto uni20::materialize_svd ( Decomposition const &  decomposition,
BlockSvdSelection< typename Decomposition::real_type > const &  selection,
BlockSvdMaterializationOptions  options = {} 
)

Materialize paired left, singular-value, and right-adjoint factors.

Selection identities are canonicalized against this decomposition. Returned truncation statistics are derived from this decomposition's spectrum, even when the selection was created from a compatible decomposition with different singular values.

◆ mdspec_of() [1/2]

template<class Tensor >
requires ( !requires(Tensor& tensor) { tensor.mdspec(); } && requires(Tensor& tensor) { tensor.mdspan(); })
constexpr decltype(auto) uni20::mdspec_of ( Tensor &  tensor)
constexprnoexcept

Return an immediate tensor's mdspan as its mdspec representation.

This fallback applies when the tensor does not expose mdspec(). An ordinary MdspanLike is already the immediate case of MdspecLike, so no wrapper is introduced.

Parameters
tensorTensor-level object whose multidimensional metadata is requested.
Returns
The result of tensor.mdspan().

◆ mdspec_of() [2/2]

template<class Tensor >
requires requires(Tensor& tensor) { tensor.mdspec(); }
constexpr decltype(auto) uni20::mdspec_of ( Tensor &  tensor)
constexprnoexcept

Return a tensor's immediate or descriptor-backed multidimensional metadata.

This operation prefers mdspec() when the tensor exposes it and otherwise returns mdspan(). It does not acquire, copy, or transform tensor data.

Parameters
tensorTensor-level object whose multidimensional metadata is requested.
Returns
The result of tensor.mdspec().

◆ metadata_line()

std::string uni20::metadata_line ( std::string_view  text)

Escape control bytes for a single human-readable metadata line.

◆ metadata_report()

presentation::report_builder uni20::metadata_report ( metadata_document const &  document,
std::string  title,
bool  detail 
)

Render ordered groups without using display strings as the machine metadata source.

◆ minus1pow()

template<std::integral T>
constexpr auto uni20::minus1pow ( T  value) -> int
constexpr

Return (-1)^x for an integral exponent.

Template Parameters
TIntegral exponent type.
Parameters
valueIntegral exponent.
Returns
1 for even x, -1 for odd x.

◆ modf() [1/2]

modf_result< mpreal > uni20::modf ( mpreal const &  x)
inline

Signed fractional and integral parts, using truncation toward zero.

◆ modf() [2/2]

modf_result< mpreal > uni20::modf ( mpreal const &  x,
Precision  p 
)
inline

Decompose the original value and round each result component at p.

◆ multiply()

double uni20::multiply ( double  a,
double  b 
)

◆ native_precision()

template<class T >
requires (!has_runtime_precision_v<std::remove_cvref_t<T>>) && requires { numeric_limits<detail::precision_component_t<T>>::digits(); numeric_limits<detail::precision_component_t<T>>::is_exact; }
constexpr Precision uni20::native_precision ( )
constexpr

Concrete precision of a fixed scalar family, including complex components.

Exact scalar families report exact arithmetic. Runtime-precision families need an instance and cannot use this type-only query.

◆ next_down() [1/2]

mpreal uni20::next_down ( mpreal const &  x)
inline

Next value toward negative infinity on the input's finite grid.

◆ next_down() [2/2]

mpreal uni20::next_down ( mpreal const &  x,
Precision  p 
)
inline

Select grid p by rounding x, then move toward negative infinity.

◆ next_up() [1/2]

mpreal uni20::next_up ( mpreal const &  x)
inline

Next value toward positive infinity on the input's finite grid.

◆ next_up() [2/2]

mpreal uni20::next_up ( mpreal const &  x,
Precision  p 
)
inline

Select grid p by rounding x, then move toward positive infinity.

◆ nextafter() [1/2]

mpreal uni20::nextafter ( mpreal const &  x,
mpreal const &  direction 
)
inline

Adjacent value on x's grid toward direction, whose precision may differ.

Equal zeros take the direction's sign. An exact x needs an explicit grid.

◆ nextafter() [2/2]

mpreal uni20::nextafter ( mpreal const &  x,
mpreal const &  direction,
Precision  p 
)
inline

Round x onto grid p, then step toward the unrounded direction.

◆ norm() [1/12]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto uni20::norm ( async::Async< InputTensor > const &  input)

Return an async storage-preserving real Tensor norm using static Tensor policy.

◆ norm() [2/12]

template<AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void uni20::norm ( async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input 
)

Schedule a Euclidean norm into an explicit async scalar Tensor using storage policy.

Precondition
The output must not share an epoch queue with the input.

◆ norm() [3/12]

template<class BackendSelector , TensorView InputTensor>
requires (!TensorView<BackendSelector>) && RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto uni20::norm ( BackendSelector &&  selector,
InputTensor const &  input 
)

Return a storage-preserving real rank-zero Tensor Euclidean norm.

◆ norm() [4/12]

template<class BackendSelector , MutableRankedMdspanLike< 0 > OutputSpan, MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, make_real_t<typename std::remove_cvref_t<InputSpan>::value_type>>
void uni20::norm ( BackendSelector &&  selector,
OutputSpan &&  output,
InputSpan &&  input 
)

Compute an mdspan Euclidean norm into a real rank-zero output.

◆ norm() [5/12]

template<class BackendSelector , MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void uni20::norm ( BackendSelector &&  selector,
OutputTensor &&  output,
InputTensor const &  input 
)

Compute a tensor view Euclidean norm into an existing real scalar tensor.

◆ norm() [6/12]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto uni20::norm ( BackendSelector  selector,
async::Async< InputTensor > const &  input 
)

Return an async storage-preserving real Tensor norm through an explicit selector.

◆ norm() [7/12]

template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void uni20::norm ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input 
)

Schedule a Euclidean norm into an explicit async scalar Tensor.

Precondition
The output must not share an epoch queue with the input.

◆ norm() [8/12]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<make_real_t<tensor_element_t<InputTensor>>, InputTensor>
auto uni20::norm ( InputTensor const &  input)

Return a storage-preserving real rank-zero Tensor Euclidean norm using storage policy.

◆ norm() [9/12]

mpreal uni20::norm ( mpcomplex const &  z)
inline

◆ norm() [10/12]

mpreal uni20::norm ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate norm(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ norm() [11/12]

template<MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, make_real_t<tensor_element_t<InputTensor>>>
void uni20::norm ( OutputTensor &&  output,
InputTensor const &  input 
)

Compute a tensor view Euclidean norm into an existing real scalar tensor using storage policy.

◆ norm() [12/12]

template<BlockTensorView Tensor>
requires RealOrComplex<block_tensor_value_t<Tensor>>
auto uni20::norm ( Tensor const &  tensor)

Return the Euclidean BlockTensor norm in a host rank-zero Tensor.

◆ norm_host() [1/6]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::norm_host ( async::Async< InputTensor > const &  input)

Return a nonblocking async host C++ scalar norm using static Tensor policy.

◆ norm_host() [2/6]

template<class BackendSelector , MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type>
auto uni20::norm_host ( BackendSelector &&  selector,
InputSpan &&  input 
) -> make_real_t<typename std::remove_cvref_t<InputSpan>::value_type>

Return an mdspan Euclidean norm as a host C++ scalar.

◆ norm_host() [3/6]

template<class BackendSelector , TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::norm_host ( BackendSelector &&  selector,
InputTensor const &  input 
) -> make_real_t<tensor_element_t<InputTensor>>

Return a Tensor Euclidean norm as a host C++ scalar through an explicit selector.

◆ norm_host() [4/6]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::norm_host ( BackendSelector  selector,
async::Async< InputTensor > const &  input 
)

Return a nonblocking async host C++ scalar norm through an explicit selector.

◆ norm_host() [5/6]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::norm_host ( InputTensor const &  input) -> make_real_t<tensor_element_t<InputTensor>>

Return a Tensor Euclidean norm as a host C++ scalar using storage policy.

◆ norm_host() [6/6]

template<BlockTensorView Tensor>
requires RealOrComplex<block_tensor_value_t<Tensor>>
auto uni20::norm_host ( Tensor const &  tensor) -> make_real_t<block_tensor_value_t<Tensor>>

Return the Euclidean BlockTensor norm as a host scalar.

Legal but unstored blocks contribute zero. Per-block norms are combined in canonical key order.

◆ ones()

template<Scalar ElementType, std::integral... Extents>
auto uni20::ones ( Extents...  extents)

Return a generated tensor filled with scalar ones.

◆ operator*() [1/10]

template<std::signed_integral T>
constexpr auto uni20::operator* ( basic_half_int< T >  lhs,
basic_half_int< T >  rhs 
) -> double
constexpr

Multiply two half-integer values as floating-point numbers.

Template Parameters
TSigned storage type.
Parameters
lhsLeft operand.
rhsRight operand.
Returns
Product as double.

◆ operator*() [2/10]

template<std::signed_integral T, std::integral U>
constexpr auto uni20::operator* ( basic_half_int< T >  lhs,
U  rhs 
) -> basic_half_int<T>
constexpr

Multiply a half-integer value by an integral scalar.

Multiply a half-integer value by a floating-point scalar.

Template Parameters
TSigned storage type.
UIntegral multiplier type.
Parameters
lhsHalf-integer value.
rhsIntegral multiplier.
Returns
Product as a half-integer value.
Template Parameters
TSigned storage type.
UFloating-point type.
Parameters
lhsHalf-integer value.
rhsFloating-point multiplier.
Returns
Product as a floating-point value.

◆ operator*() [3/10]

exact_rational uni20::operator* ( exact_rational const &  a,
exact_rational const &  b 
)
inline

◆ operator*() [4/10]

mpcomplex uni20::operator* ( exact_rational const &  a,
mpcomplex const &  b 
)
inline

◆ operator*() [5/10]

mpreal uni20::operator* ( exact_rational const &  a,
mpreal const &  b 
)
inline

◆ operator*() [6/10]

mpcomplex uni20::operator* ( mpcomplex const &  a,
exact_rational const &  b 
)
inline

◆ operator*() [7/10]

mpcomplex uni20::operator* ( mpcomplex const &  a,
mpcomplex const &  b 
)
inline

◆ operator*() [8/10]

mpreal uni20::operator* ( mpreal const &  a,
exact_rational const &  b 
)
inline

◆ operator*() [9/10]

mpreal uni20::operator* ( mpreal const &  a,
mpreal const &  b 
)
inline

◆ operator*() [10/10]

template<std::integral U, std::signed_integral T>
constexpr auto uni20::operator* ( U  lhs,
basic_half_int< T >  rhs 
) -> basic_half_int<T>
constexpr

Multiply an integral scalar by a half-integer value.

Multiply a floating-point scalar by a half-integer value.

Template Parameters
TSigned storage type.
UIntegral multiplier type.
Parameters
lhsIntegral multiplier.
rhsHalf-integer value.
Returns
Product as a half-integer value.
Template Parameters
UFloating-point type.
TSigned storage type.
Parameters
lhsFloating-point multiplier.
rhsHalf-integer value.
Returns
Product as a floating-point value.

◆ operator+() [1/13]

template<std::signed_integral T>
constexpr auto uni20::operator+ ( basic_half_int< T >  lhs,
basic_half_int< T >  rhs 
) -> basic_half_int<T>
constexpr

Add two half-integer values.

Template Parameters
TSigned storage type.
Parameters
lhsLeft operand.
rhsRight operand.
Returns
Sum of the operands.

◆ operator+() [2/13]

exact_rational uni20::operator+ ( exact_rational const &  a)
inline

◆ operator+() [3/13]

exact_rational uni20::operator+ ( exact_rational const &  a,
exact_rational const &  b 
)
inline

◆ operator+() [4/13]

mpcomplex uni20::operator+ ( exact_rational const &  a,
mpcomplex const &  b 
)
inline

◆ operator+() [5/13]

mpreal uni20::operator+ ( exact_rational const &  a,
mpreal const &  b 
)
inline

◆ operator+() [6/13]

mpcomplex uni20::operator+ ( mpcomplex const &  a,
exact_rational const &  b 
)
inline

◆ operator+() [7/13]

mpcomplex uni20::operator+ ( mpcomplex const &  a,
mpcomplex const &  b 
)
inline

◆ operator+() [8/13]

mpcomplex uni20::operator+ ( mpcomplex const &  x)
inline

◆ operator+() [9/13]

mpreal uni20::operator+ ( mpreal const &  a)
inline

◆ operator+() [10/13]

mpreal uni20::operator+ ( mpreal const &  a,
exact_rational const &  b 
)
inline

◆ operator+() [11/13]

mpreal uni20::operator+ ( mpreal const &  a,
mpreal const &  b 
)
inline

◆ operator+() [12/13]

auto uni20::operator+ ( QNum const &  lhs,
QNum const &  rhs 
) -> QNum
inline

Add two quantum numbers when the fusion result is uniquely defined.

Parameters
lhsLeft operand.
rhsRight operand.
Returns
Sum in the shared symmetry context.

◆ operator+() [13/13]

constexpr auto uni20::operator+ ( U1  lhs,
U1  rhs 
) -> U1
inlineconstexpr

Add two U(1) irreps using charge addition.

Parameters
lhsLeft U(1) irrep.
rhsRight U(1) irrep.
Returns
U(1) irrep with summed charge.

◆ operator-() [1/13]

template<std::signed_integral T>
constexpr auto uni20::operator- ( basic_half_int< T >  lhs,
basic_half_int< T >  rhs 
) -> basic_half_int<T>
constexpr

Subtract two half-integer values.

Template Parameters
TSigned storage type.
Parameters
lhsLeft operand.
rhsRight operand.
Returns
Difference of the operands.

◆ operator-() [2/13]

template<std::signed_integral T>
constexpr auto uni20::operator- ( basic_half_int< T >  value) -> basic_half_int<T>
constexpr

Negate a half-integer value.

Template Parameters
TSigned storage type.
Parameters
valueOperand to negate.
Returns
Negated value.

◆ operator-() [3/13]

exact_rational uni20::operator- ( exact_rational const &  a)
inline

◆ operator-() [4/13]

exact_rational uni20::operator- ( exact_rational const &  a,
exact_rational const &  b 
)
inline

◆ operator-() [5/13]

mpcomplex uni20::operator- ( exact_rational const &  a,
mpcomplex const &  b 
)
inline

◆ operator-() [6/13]

mpreal uni20::operator- ( exact_rational const &  a,
mpreal const &  b 
)
inline

◆ operator-() [7/13]

mpcomplex uni20::operator- ( mpcomplex const &  a,
exact_rational const &  b 
)
inline

◆ operator-() [8/13]

mpcomplex uni20::operator- ( mpcomplex const &  a,
mpcomplex const &  b 
)
inline

◆ operator-() [9/13]

mpcomplex uni20::operator- ( mpcomplex const &  x)
inline

◆ operator-() [10/13]

mpreal uni20::operator- ( mpreal const &  a)
inline

◆ operator-() [11/13]

mpreal uni20::operator- ( mpreal const &  a,
exact_rational const &  b 
)
inline

◆ operator-() [12/13]

mpreal uni20::operator- ( mpreal const &  a,
mpreal const &  b 
)
inline

◆ operator-() [13/13]

constexpr auto uni20::operator- ( U1  lhs,
U1  rhs 
) -> U1
inlineconstexpr

Subtract two U(1) irreps using charge subtraction.

Parameters
lhsLeft U(1) irrep.
rhsRight U(1) irrep.
Returns
U(1) irrep with subtracted charge.

◆ operator/() [1/8]

template<std::signed_integral T, std::floating_point U>
constexpr auto uni20::operator/ ( basic_half_int< T >  lhs,
U  rhs 
) -> U
constexpr

Divide a half-integer value by a floating-point scalar.

Template Parameters
TSigned storage type.
UFloating-point type.
Parameters
lhsHalf-integer value.
rhsFloating-point divisor.
Returns
Quotient as a floating-point value.

◆ operator/() [2/8]

exact_rational uni20::operator/ ( exact_rational const &  a,
exact_rational const &  b 
)
inline

◆ operator/() [3/8]

mpcomplex uni20::operator/ ( exact_rational const &  a,
mpcomplex const &  b 
)
inline

◆ operator/() [4/8]

mpreal uni20::operator/ ( exact_rational const &  a,
mpreal const &  b 
)
inline

◆ operator/() [5/8]

mpcomplex uni20::operator/ ( mpcomplex const &  a,
exact_rational const &  b 
)
inline

◆ operator/() [6/8]

mpcomplex uni20::operator/ ( mpcomplex const &  a,
mpcomplex const &  b 
)
inline

◆ operator/() [7/8]

mpreal uni20::operator/ ( mpreal const &  a,
exact_rational const &  b 
)
inline

◆ operator/() [8/8]

mpreal uni20::operator/ ( mpreal const &  a,
mpreal const &  b 
)
inline

◆ operator<<() [1/5]

std::ostream & uni20::operator<< ( std::ostream &  os,
exact_rational const &  value 
)
inline

◆ operator<<() [2/5]

std::ostream & uni20::operator<< ( std::ostream &  os,
mpreal const &  value 
)
inline

Stream the round-trip decimal representation, independent of stream precision.

◆ operator<<() [3/5]

template<std::signed_integral T>
auto uni20::operator<< ( std::ostream &  out,
basic_half_int< T >  value 
) -> std::ostream&
inline

Stream a half-integer in integer or .5 decimal form.

Template Parameters
TSigned storage type.
Parameters
outOutput stream.
valueValue to format.
Returns
Output stream.

◆ operator<<() [4/5]

std::ostream & uni20::operator<< ( std::ostream &  out,
mpcomplex const &  z 
)
inline

◆ operator<<() [5/5]

auto uni20::operator<< ( std::ostream &  out,
U1  value 
) -> std::ostream&
inline

Stream a U(1) irrep in decimal half-integer form.

Parameters
outOutput stream.
valueU(1) irrep to stream.
Returns
Output stream.

◆ operator<=>() [1/4]

std::strong_ordering uni20::operator<=> ( exact_rational const &  a,
exact_rational const &  b 
)
inline

◆ operator<=>() [2/4]

std::partial_ordering uni20::operator<=> ( mpreal const &  a,
exact_rational const &  b 
)
inline

◆ operator<=>() [3/4]

template<std::integral I>
requires (!std::same_as<I, bool>)
std::partial_ordering uni20::operator<=> ( mpreal const &  a,
I  b 
)
inline

◆ operator<=>() [4/4]

std::partial_ordering uni20::operator<=> ( mpreal const &  a,
mpreal const &  b 
)
inline

Compare exact or stored approximate values without rounding either operand.

◆ operator==() [1/6]

bool uni20::operator== ( exact_rational const &  a,
exact_rational const &  b 
)
inline

◆ operator==() [2/6]

bool uni20::operator== ( mpcomplex const &  a,
exact_rational const &  b 
)
inline

◆ operator==() [3/6]

bool uni20::operator== ( mpcomplex const &  a,
mpcomplex const &  b 
)
inline

◆ operator==() [4/6]

bool uni20::operator== ( mpreal const &  a,
exact_rational const &  b 
)
inline

◆ operator==() [5/6]

template<std::integral I>
requires (!std::same_as<I, bool>)
bool uni20::operator== ( mpreal const &  a,
I  b 
)
inline

◆ operator==() [6/6]

bool uni20::operator== ( mpreal const &  a,
mpreal const &  b 
)
inline

◆ operator>>()

template<std::signed_integral T>
auto uni20::operator>> ( std::istream &  in,
basic_half_int< T > &  value 
) -> std::istream&
inline

Parse a half-integer from integer, .0, .5, or n/2 form.

Template Parameters
TSigned storage type.
Parameters
inInput stream.
valueParsed result.
Returns
Input stream.

◆ parse_scalar_precision()

constexpr std::optional< ScalarPrecision > uni20::parse_scalar_precision ( std::string_view  name)
constexpr

Parse a canonical scalar precision name independently of build availability.

Parameters
nameName to parse.
Returns
Parsed precision, or std::nullopt for an unknown name.

◆ permute() [1/3]

template<std::size_t... Axis, class Tensor >
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::SidePreservingPermutation<Tensor, Axis...> && !BorrowedBlockTensorView<Tensor>)
auto uni20::permute ( Tensor &&  tensor)
delete

Permute a temporary borrowed BlockTensor view without retaining the intermediate view.

◆ permute() [2/3]

template<std::size_t... Axis, BorrowedBlockTensorView Tensor>
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::SidePreservingPermutation<Tensor, Axis...>)
auto uni20::permute ( Tensor &&  tensor)
delete

Permute a temporary borrowed BlockTensor view without retaining the intermediate view.

◆ permute() [3/3]

template<std::size_t... Axis, class Tensor >
requires detail::SidePreservingPermutation<Tensor, Axis...>
auto uni20::permute ( Tensor &  tensor) -> BlockTensorPermutationView<Tensor, Axis...>

Permute bosonic BlockTensor factors without moving numerical payload.

The compile-time axis list gives the source axis at each output position. A temporary borrowed view may be transformed because the result retains direct descriptors for the same numerical payload. Owning rvalues are rejected because destroying the owner would invalidate that payload. Replacing or structurally modifying the ultimate source owner invalidates the view.

Template Parameters
AxisSource axis at each output position.
TensorBlockTensor-like source value.
Parameters
tensorSource tensor whose lifetime must cover the returned view.
Returns
Zero-copy view with permuted boundaries, keys, and dense axes.

◆ pow() [1/5]

mpcomplex uni20::pow ( mpcomplex const &  a,
mpcomplex const &  b 
)
inline

◆ pow() [2/5]

mpcomplex uni20::pow ( mpcomplex const &  a,
mpcomplex const &  b,
Precision  p 
)
inline

Evaluate the principal power pow(a.at(p), b.at(p)) at finite precision p.

Exceptions
std::logic_errorIf p is exact or either operand is unset.

◆ pow() [3/5]

mpreal uni20::pow ( mpreal const &  x,
mpreal const &  y 
)
inline

◆ pow() [4/5]

mpreal uni20::pow ( mpreal const &  x,
mpreal const &  y,
Precision  p 
)
inline

Evaluate pow(x.at(p), y.at(p)), overriding both operands' precisions.

Exceptions
std::logic_errorIf p is exact or either operand is unset.

◆ pow() [5/5]

template<class X , class Y >
requires ((std::same_as<X, exact_rational> || std::same_as<X, decimal_literal>) && (std::same_as<Y, exact_rational> || std::same_as<Y, decimal_literal>))
exact_rational uni20::pow ( X const &  base,
Y const &  power 
)
inline

Evaluate a rational power exactly when its real result is rational.

Uses the real root for negative bases with odd-denominator powers; zero to the zeroth power is one. No approximate result is inferred.

◆ pown() [1/2]

template<detail::MathInteger I>
mpreal uni20::pown ( mpreal const &  x,
I  exponent 
)
inline

Integer power, preserving exact rational results or the input's finite precision.

◆ pown() [2/2]

template<detail::MathInteger I>
mpreal uni20::pown ( mpreal const &  x,
I  exponent,
Precision  p 
)
inline

Integer power with one final rounding at p, without input conversion.

◆ precision_of() [1/2]

template<TensorView Input>
constexpr Precision uni20::precision_of ( Input const &  input)
constexpr

Resolve a tensor's default without reading elements; fixed types use native precision.

◆ precision_of() [2/2]

template<class T >
requires requires(T const& value) { value.precision(); } || requires { native_precision<T>(); }
constexpr Precision uni20::precision_of ( T const &  value)
constexpr

Read scalar precision without changing any scalar or provider state.

◆ prepare_output() [1/6]

template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
Output & uni20::prepare_output ( async::shared_storage< Output > &  storage,
RequiredExtents const &  required 
)

Construct or resize a deferred Tensor output to the required shape.

A constructed output is prepared through its ordinary tensor-view interface. An unconstructed output is initialized from the required extents when its type supports that construction; otherwise preparation reports an error.

Warning
This operation may construct, resize, or replace the output. For operations whose contract declares the output replaceable, a backend may call this before completing all side-effect-free acceptance checks. If that backend later declines, subsequent backends may reuse or replace the prepared output.
Returns
Reference to the prepared output value.

◆ prepare_output() [2/6]

template<MutableTensorView Output, TensorExtentsLike RequiredExtents, class Placement >
requires std::constructible_from<Output, Placement const&, tensor_extents_t<Output> const&> && requires(Output& output, tensor_extents_t<Output> const& extents, Placement const& placement) { prepare_output(output, extents, placement); }
Output & uni20::prepare_output ( async::shared_storage< Output > &  storage,
RequiredExtents const &  required,
Placement const &  placement 
)

Construct or replace a deferred Tensor output with compatible shape and storage.

Warning
This operation may construct, resize, or replace the output. For operations whose contract declares the output replaceable, a backend may call this before completing all side-effect-free acceptance checks. If that backend later declines, subsequent backends may reuse or replace the prepared output.
Template Parameters
PlacementStorage-policy placement requirement.
Returns
Reference to the prepared output value.

◆ prepare_output() [3/6]

template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
requires (!has_runtime_precision_v<tensor_element_t<Output>> || std::constructible_from<Output, uninitialized_t, tensor_extents_t<Output> const&, Precision>)
Output & uni20::prepare_output ( async::shared_storage< Output > &  storage,
RequiredExtents const &  required,
Precision  p 
)

Construct or resize a deferred output at an explicit working precision.

◆ prepare_output() [4/6]

template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
Output & uni20::prepare_output ( Output &  output,
RequiredExtents const &  required 
)

Prepare a mutable tensor output with the specified shape.

Resizable outputs retain their current storage and values when the shape already matches, and allocate explicitly uninitialized replacement storage when supported. Otherwise they call ordinary reset_shape. Fixed outputs validate through require_output and never rebind storage.

Warning
This operation may construct, resize, or replace the output. For operations whose contract declares the output replaceable, a backend may call this before completing all side-effect-free acceptance checks. If that backend later declines, subsequent backends may reuse or replace the prepared output.
Returns
Reference to the prepared output.

◆ prepare_output() [5/6]

template<MutableTensorView Output, TensorExtentsLike RequiredExtents, class Placement >
requires requires(Output& output, tensor_extents_t<Output> const& extents, Placement const& placement) { { output.storage_is_compatible(placement) } -> std::convertible_to<bool>; output.reset_shape(extents); output.replace(extents, placement); }
Output & uni20::prepare_output ( Output &  output,
RequiredExtents const &  required,
Placement const &  placement 
)

Prepare a mutable Tensor output with compatible shape and storage.

A matching output is retained. Otherwise a replaceable output is reconstructed with the required extents and placement.

Warning
This operation may construct, resize, or replace the output. For operations whose contract declares the output replaceable, a backend may call this before completing all side-effect-free acceptance checks. If that backend later declines, subsequent backends may reuse or replace the prepared output.
Template Parameters
PlacementStorage-policy placement requirement.
Returns
Reference to the prepared output.

◆ prepare_output() [6/6]

template<MutableTensorView Output, TensorExtentsLike RequiredExtents>
Output & uni20::prepare_output ( Output &  output,
RequiredExtents const &  required,
Precision  p 
)

Prepare an output at compatible precision, recording runtime defaults on owning outputs.

Existing elements are not converted. The operation must assign every output element it promises to produce, including when storage is reused. Parent-backed views retain the parent's default; writing through a view does not change that metadata for the rest of the parent tensor.

◆ qdim() [1/2]

auto uni20::qdim ( QNum const &  q) -> double
inline

Return the quantum dimension of a quantum number.

Parameters
qQuantum number to inspect.
Returns
Product of factor quantum dimensions.

◆ qdim() [2/2]

constexpr auto uni20::qdim ( U1  value) -> double
inlineconstexpr

Return the quantum dimension of a U(1) irrep.

Parameters
valueU(1) irrep to inspect.
Returns
Quantum dimension, always 1.0.

◆ rational_root()

std::optional< exact_rational > uni20::rational_root ( exact_rational const &  x,
unsigned long  degree 
)
inline

Return a rational nth root when it exists, without choosing a precision.

Negative inputs have a real root only for odd degrees. A missing result means that the root cannot be represented as a rational.

◆ real()

mpreal uni20::real ( mpcomplex const &  z)
inline

◆ regularize() [1/3]

auto uni20::regularize ( IrregularSpace const &  space) -> IrregularSpaceRegularization
inline

Regularize an ordered segmented space into one block per quantum number.

Parameters
spaceIrregular space whose block order and segmentation must be mapped.
Returns
Canonical space and one destination range for every original block.

◆ regularize() [2/3]

auto uni20::regularize ( LocalSpace const &  space) -> LocalSpaceRegularization
inline

Regularize a LocalSpace into one block per quantum number.

Parameters
spaceOrdered local space.
Returns
Regularization result with per-state block indices and offsets.

◆ regularize() [3/3]

auto uni20::regularize ( QNumList const &  list) -> QNumListRegularization
inline

Regularize a sparse QNumList into one block per quantum number.

Parameters
listSparse-space quantum-number list.
Returns
Regularization result with per-entry block indices and offsets.

◆ remainder() [1/2]

mpreal uni20::remainder ( mpreal const &  a,
mpreal const &  b 
)
inline

Nearest-even-quotient remainder; exact operands retain exact rational results.

◆ remainder() [2/2]

mpreal uni20::remainder ( mpreal const &  a,
mpreal const &  b,
Precision  p 
)
inline

Nearest-even-quotient remainder, rounding only the result at p.

◆ remquo() [1/2]

remquo_result< mpreal > uni20::remquo ( mpreal const &  a,
mpreal const &  b 
)
inline

Nearest-even remainder with the signed low three quotient bits.

◆ remquo() [2/2]

remquo_result< mpreal > uni20::remquo ( mpreal const &  a,
mpreal const &  b,
Precision  p 
)
inline

Remainder and quotient bits computed before rounding the remainder at p.

◆ repartition() [1/3]

template<MorphismSide Side, BoundaryEnd End, class Tensor >
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::RepartitionSourceHasLeg<Tensor, Side> && !BorrowedBlockTensorView<Tensor>)
auto uni20::repartition ( Tensor &&  tensor)
delete

Repartition a temporary borrowed BlockTensor view without retaining the intermediate view.

◆ repartition() [2/3]

template<MorphismSide Side, BoundaryEnd End, BorrowedBlockTensorView Tensor>
requires (!std::is_lvalue_reference_v<Tensor &&> && detail::RepartitionSourceHasLeg<Tensor, Side>)
auto uni20::repartition ( Tensor &&  tensor)
delete

Repartition a temporary borrowed BlockTensor view without retaining the intermediate view.

◆ repartition() [3/3]

template<MorphismSide Side, BoundaryEnd End, class Tensor >
requires detail::RepartitionSourceHasLeg<Tensor, Side>
auto uni20::repartition ( Tensor &  tensor) -> BlockTensorRepartitionView<Tensor, Side, End>

Bend one planar edge leg across a BlockTensor morphism boundary.

The returned lvalue view owns only transformed metadata; numerical payload remains in tensor. A temporary borrowed view may be transformed because the result retains direct descriptors for the same payload. Owning rvalues are rejected because destroying the owner would invalidate the payload. Payload element writes remain valid, but replacing or structurally modifying the ultimate source owner invalidates the view.

Template Parameters
SideSource morphism side.
EndPlanar edge to bend.
TensorBlockTensor-like source value.
Parameters
tensorSource tensor whose lifetime must cover the returned view.
Returns
Zero-copy transformed BlockTensor view.

◆ require_output()

template<TensorView Output, TensorExtentsLike RequiredExtents>
void uni20::require_output ( Output const &  output,
RequiredExtents const &  required 
)

Require an existing tensor output to have the specified shape.

This operation validates only and never modifies the output, including when the output owns replaceable storage.

◆ require_precision()

template<class T >
requires (has_runtime_precision_v<std::remove_cvref_t<T>> || requires { native_precision<T>(); })
constexpr void uni20::require_precision ( Precision  p)
constexpr

Reject an operation precision incompatible with a fixed scalar result.

Runtime scalars accept exact or finite precision; provider-specific limits are checked by the provider before numerical work starts.

◆ reshape() [1/4]

template<class InputTensor , std::integral... Extents>
requires OwningTensor<InputTensor> && MutableTensorView<InputTensor> && requires(InputTensor&& input, Extents... extents) { uni20::reshape(std::move(input), extents...); }
auto uni20::reshape ( async::Async< InputTensor > &&  input,
Extents...  requested_extents 
)

Schedule an owning reshape that consumes an async Tensor value.

Passing the async input as an rvalue grants permission to remove and transfer its stored allocation when the synchronous reshape can do so.

◆ reshape() [2/4]

template<TensorView InputTensor, std::integral... Extents>
requires requires(InputTensor const& input, Extents... extents) { uni20::reshape(input, extents...); }
auto uni20::reshape ( async::Async< InputTensor > const &  input,
Extents...  requested_extents 
)

Schedule a preserving owning reshape of an async Tensor.

The result has an independent epoch and matches synchronous reshape(input, extents...), including materialization when needed.

◆ reshape() [3/4]

template<class RequestedLayout = void, TensorView InputTensor, std::integral... Extents>
requires (!OwningTensor<InputTensor> && (std::is_void_v<RequestedLayout> || detail::CanonicalReshapeLayout<RequestedLayout>) && (!std::is_void_v<RequestedLayout> || !StridedTensorView<InputTensor> || detail::CanonicalReshapeLayout<typename tensor_mdspec_t<InputTensor>::layout_type>))
auto uni20::reshape ( InputTensor const &  input,
Extents...  requested_extents 
)

Materialize an owning reshape of a non-owning or generated tensor view.

Immediately accessible, canonically laid-out strided sources are reshaped before copying, preserving their logical contiguous sequence. Deferred, layout-neutral, and noncanonical sources are first materialized in the requested or inferred canonical layout, then reshaped by transferring that allocation. Compatible owning tensors use the move-aware overload in reshape.hpp.

◆ reshape() [4/4]

template<class TensorType , std::integral... Extents>
requires detail::StorageTransferReshapableTensor<TensorType, stdex::dextents<index_type, sizeof...(Extents)>>
auto uni20::reshape ( TensorType  tensor,
Extents...  requested_extents 
)

Return an owning reshape of a canonical dense tensor.

Passing an lvalue copies its allocation; passing an rvalue transfers it. The source's compile-time canonical layout is preserved.

◆ reshape_inplace() [1/2]

template<class Tensor , std::integral... Extents>
requires requires(Tensor& tensor, Extents... extents) { uni20::reshape_inplace(tensor, extents...); }
void uni20::reshape_inplace ( async::Async< Tensor > &  input,
Extents...  requested_extents 
)

Schedule an in-place mapping change on an async owning Tensor.

The operation retains the allocation and publishes metadata mutation through one writer epoch.

◆ reshape_inplace() [2/2]

template<detail::CanonicallyLaidOutOwningTensor TensorType, std::integral... Extents>
requires (sizeof...(Extents) == tensor_extents_t<TensorType>::rank() && requires(TensorType& tensor, typename TensorType::mapping_type mapping) { tensor.replace_mapping(std::move(mapping)); })
void uni20::reshape_inplace ( TensorType &  tensor,
Extents...  requested_extents 
)

Change a canonical owning tensor's shape without reallocating storage.

The compile-time rank is unchanged. Existing copied mdspan descriptors retain their old mappings.

◆ reshape_view() [1/2]

template<detail::CanonicallyLaidOutMdspan Span, std::integral... Extents>
auto uni20::reshape_view ( Span &&  source,
Extents...  requested_extents 
)

Return a no-copy mdspan reshape preserving a canonical source layout.

Automatic order selection is available only when the source's static layout is layout_left or layout_right.

◆ reshape_view() [2/2]

template<ImmediateTensorView Tensor, std::integral... Extents>
requires (std::is_lvalue_reference_v<Tensor &&> && StridedImmediateTensorView<Tensor> && detail::CanonicalReshapeLayout<typename immediate_tensor_mdspan_t<Tensor>::layout_type>)
auto uni20::reshape_view ( Tensor &&  tensor,
Extents...  requested_extents 
)

Return a tensor-level no-copy reshape preserving a canonical source layout.

Rvalue tensors are rejected because the returned descriptor does not extend the lifetime of addressable source storage. Runtime-precision views also retain a reference to the parent tensor to inherit its default, so that parent object must outlive the view.

◆ reshape_view_left() [1/2]

template<StridedMdspanLike Span, std::integral... Extents>
auto uni20::reshape_view_left ( Span &&  source,
Extents...  requested_extents 
)

Return a no-copy column-major reshape of a compatible strided mdspan.

Singleton-axis strides do not select an order. All other strides must describe a unique, exhaustive canonical column-major mapping.

◆ reshape_view_left() [2/2]

template<ImmediateTensorView Tensor, std::integral... Extents>
requires (std::is_lvalue_reference_v<Tensor &&> && StridedImmediateTensorView<Tensor>)
auto uni20::reshape_view_left ( Tensor &&  tensor,
Extents...  requested_extents 
)

Return a tensor-level no-copy column-major reshape of a strided source.

◆ reshape_view_right() [1/2]

template<StridedMdspanLike Span, std::integral... Extents>
auto uni20::reshape_view_right ( Span &&  source,
Extents...  requested_extents 
)

Return a no-copy row-major reshape of a compatible strided mdspan.

Singleton-axis strides do not select an order. All other strides must describe a unique, exhaustive canonical row-major mapping.

◆ reshape_view_right() [2/2]

template<ImmediateTensorView Tensor, std::integral... Extents>
requires (std::is_lvalue_reference_v<Tensor &&> && StridedImmediateTensorView<Tensor>)
auto uni20::reshape_view_right ( Tensor &&  tensor,
Extents...  requested_extents 
)

Return a tensor-level no-copy row-major reshape of a strided source.

◆ rootn() [1/2]

template<detail::MathInteger I>
mpreal uni20::rootn ( mpreal const &  x,
I  degree 
)
inline

Real integer-order root; negative orders give reciprocal roots.

Exact inputs remain rational when their root is rational, otherwise finite precision is required. Even-order negative roots are not real.

◆ rootn() [2/2]

template<detail::MathInteger I>
mpreal uni20::rootn ( mpreal const &  x,
I  degree,
Precision  p 
)
inline

Integer-order root with one final rounding at p, without input conversion.

◆ round() [1/2]

mpreal uni20::round ( mpreal const &  x)
inline

Round to nearest integer, with ties away from zero; exact inputs produce exact integers.

◆ round() [2/2]

mpreal uni20::round ( mpreal const &  x,
Precision  p 
)
inline

Round to nearest integer, with ties away from zero, then round the result to finite precision p.

The input is not rounded first. Approximate signed zero is retained.

◆ round_even() [1/2]

mpreal uni20::round_even ( mpreal const &  x)
inline

Round to nearest integer, with ties to even; exact inputs produce exact integers.

◆ round_even() [2/2]

mpreal uni20::round_even ( mpreal const &  x,
Precision  p 
)
inline

Round to nearest integer, with ties to even, then round the result to finite precision p.

The input is not rounded first. Approximate signed zero is retained.

◆ scalar_at_precision()

template<class S , class V >
requires ((requires { native_precision<S>(); } && std::constructible_from<S, V const&>) || (has_runtime_precision_v<S> && std::constructible_from<S, V const&, Precision>))
constexpr S uni20::scalar_at_precision ( V const &  value,
Precision  p 
)
constexpr

Construct or convert a scalar at one explicit precision.

◆ scalar_like()

template<Scalar S, class Value >
requires (std::constructible_from<S, Value const&> || requires(S const& exemplar, Value const& value) { S(value, exemplar.precision()); })
constexpr auto uni20::scalar_like ( S const &  exemplar,
Value const &  value 
) -> S
constexpr

Construct a scalar using an exemplar's type and numerical precision.

Fixed-precision types use ordinary construction. Runtime-precision types use the exemplar's exact state or finite precision. This does not invent working precision when the exemplar is exact.

◆ scalar_precision_is_available()

constexpr bool uni20::scalar_precision_is_available ( ScalarPrecision  precision)
constexpr

Report whether a runtime precision has a concrete scalar type in this build.

Parameters
precisionPrecision to query.
Returns
true when visit_scalar_precision can instantiate that scalar type.

◆ scalar_precision_name()

constexpr std::string_view uni20::scalar_precision_name ( ScalarPrecision  precision)
constexpr

Return the canonical command-line and diagnostic spelling of a precision.

Parameters
precisionPrecision to name.
Returns
Stable lowercase precision name.

◆ scalbn() [1/2]

template<detail::MathInteger I>
mpreal uni20::scalbn ( mpreal const &  x,
I  exponent 
)
inline

Binary scaling, identical to ldexp for Uni20's binary scalar formats.

◆ scalbn() [2/2]

template<detail::MathInteger I>
mpreal uni20::scalbn ( mpreal const &  x,
I  exponent,
Precision  p 
)
inline

Binary scaling with one rounding to finite result precision p.

◆ scale()

template<MutableBlockTensorView Tensor, class Scalar >
void uni20::scale ( Tensor &  tensor,
Scalar  factor 
)

Multiply every stored numerical block by a scalar in place.

The stored key pattern is unchanged, including when the factor is zero.

◆ sec() [1/2]

mpreal uni20::sec ( mpreal const &  x)
inline

Reciprocal cosine, evaluated directly by MPFR.

◆ sec() [2/2]

mpreal uni20::sec ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate sec at p.

◆ sech() [1/2]

mpreal uni20::sech ( mpreal const &  x)
inline

Reciprocal hyperbolic cosine, evaluated directly by MPFR.

◆ sech() [2/2]

mpreal uni20::sech ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate sech at p.

◆ select_svd_states()

template<uni20::Real Real>
auto uni20::select_svd_states ( std::span< BlockSvdState< Real > const >  spectrum,
linalg::SvdTruncationPolicy< Real > const &  policy = {} 
) -> BlockSvdSelection<Real>

Apply the standard truncation policy to a globally sorted block-SVD spectrum.

◆ set_zero()

template<MutableBlockTensorView Tensor>
void uni20::set_zero ( Tensor &  tensor)

Set every stored numerical block to zero without changing structure.

Legal but unstored blocks remain implicit zero. Ordinary block views dispatch through their storage-domain backend; async block storage schedules one update on each block timeline.

◆ signbit()

bool uni20::signbit ( mpreal const &  x)
inline

◆ sin() [1/4]

mpcomplex uni20::sin ( mpcomplex const &  z)
inline

◆ sin() [2/4]

mpcomplex uni20::sin ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate sin(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ sin() [3/4]

mpreal uni20::sin ( mpreal const &  x)
inline

◆ sin() [4/4]

mpreal uni20::sin ( mpreal const &  x,
Precision  p 
)
inline

Evaluate sin(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ sincos() [1/2]

sincos_result< mpreal > uni20::sincos ( mpreal const &  x)
inline

Evaluate sine and cosine using the paired provider routine.

◆ sincos() [2/2]

sincos_result< mpreal > uni20::sincos ( mpreal const &  x,
Precision  p 
)
inline

Paired elementary evaluation at p, matching sin(x,p) and cos(x,p).

◆ sinh() [1/4]

mpcomplex uni20::sinh ( mpcomplex const &  z)
inline

Hyperbolic sine at the input precision; exact zero remains exact.

◆ sinh() [2/4]

mpcomplex uni20::sinh ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate sinh(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ sinh() [3/4]

mpreal uni20::sinh ( mpreal const &  x)
inline

Hyperbolic sine; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ sinh() [4/4]

mpreal uni20::sinh ( mpreal const &  x,
Precision  p 
)
inline

Evaluate sinh(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ sinhcosh() [1/2]

sinhcosh_result< mpreal > uni20::sinhcosh ( mpreal const &  x)
inline

Evaluate hyperbolic sine and cosine using the paired provider routine.

◆ sinhcosh() [2/2]

sinhcosh_result< mpreal > uni20::sinhcosh ( mpreal const &  x,
Precision  p 
)
inline

Paired elementary evaluation at p, matching sinh(x,p) and cosh(x,p).

◆ sinpi() [1/2]

mpreal uni20::sinpi ( mpreal const &  x)
inline

Sine of pi times x, with provider argument reduction.

◆ sinpi() [2/2]

mpreal uni20::sinpi ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate sinpi at p.

◆ sqrt() [1/5]

mpcomplex uni20::sqrt ( mpcomplex const &  z)
inline

Principal square root, with the sign of imaginary zero selecting the cut side.

◆ sqrt() [2/5]

mpcomplex uni20::sqrt ( mpcomplex const &  z,
Precision  p 
)
inline

Evaluate sqrt(z.at(p)), returning an approximation at finite precision p.

MPC's principal branches and signed-zero rules apply after input conversion.

Exceptions
std::logic_errorIf p is exact or z is unset.

◆ sqrt() [3/5]

mpreal uni20::sqrt ( mpreal const &  x)
inline

◆ sqrt() [4/5]

mpreal uni20::sqrt ( mpreal const &  x,
Precision  p 
)
inline

Evaluate sqrt(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ sqrt() [5/5]

template<class X >
requires (std::same_as<X, exact_rational> || std::same_as<X, decimal_literal>)
exact_rational uni20::sqrt ( X const &  value)
inline

Return the nonnegative rational square root, or require finite precision.

◆ strides()

template<StridedTensorView T>
auto uni20::strides ( T const &  tensor)

Retrieve the normalized multidimensional strides of a tensor-level object.

Template Parameters
TThe strided tensor view type.
Parameters
tensorTensor metadata whose strides will be returned.
Returns
A std::array containing the strides for each rank.

◆ sum() [1/18]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( async::Async< InputTensor > const &  input)

Return an async storage-preserving full Tensor sum using storage policy.

◆ sum() [2/18]

template<TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( async::Async< InputTensor > const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Return an async storage-preserving sum over selected axes using storage policy.

◆ sum() [3/18]

template<AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void uni20::sum ( async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input 
)

Schedule a full sum into an explicit async scalar tensor using storage policy.

Precondition
The output must not share an epoch queue with the input.

◆ sum() [4/18]

template<AsyncTensorOutput OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (mutable_tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void uni20::sum ( async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Schedule an axis-selective sum into an explicit async output using storage policy.

Precondition
The output must not share an epoch queue with the input.

◆ sum() [5/18]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( BackendSelector &&  selector,
InputTensor const &  input 
)

Return a storage-preserving full Tensor sum.

◆ sum() [6/18]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( BackendSelector &&  selector,
InputTensor const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Return a storage-preserving Tensor sum over selected axes.

◆ sum() [7/18]

template<linalg::KernelBackendSelector BackendSelector, MutableRankedMdspanLike< 0 > OutputSpan, MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, typename std::remove_cvref_t<InputSpan>::value_type>
void uni20::sum ( BackendSelector &&  selector,
OutputSpan &&  output,
InputSpan &&  input 
)

Sum every element of an mdspan into a rank-zero output.

The output preserves the input element type. The CPU reference backend uses compensated accumulation in that scalar field.

◆ sum() [8/18]

template<linalg::KernelBackendSelector BackendSelector, MutableMdspanLike OutputSpan, MdspanLike InputSpan, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type> && std::same_as<typename std::remove_cvref_t<OutputSpan>::value_type, typename std::remove_cvref_t<InputSpan>::value_type> && (1 + sizeof...(RestAxes) <= std::remove_cvref_t<InputSpan>::rank()) && (std::remove_cvref_t<OutputSpan>::rank() + 1 + sizeof...(RestAxes) == std::remove_cvref_t<InputSpan>::rank())
void uni20::sum ( BackendSelector &&  selector,
OutputSpan &&  output,
InputSpan &&  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Sum selected mdspan axes into an existing lower-rank output.

Surviving axes retain their original logical order. Negative axes count backward from the input rank.

◆ sum() [9/18]

template<linalg::KernelBackendSelector BackendSelector, MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void uni20::sum ( BackendSelector &&  selector,
OutputTensor &&  output,
InputTensor const &  input 
)

Sum every element of a tensor view into an existing scalar tensor.

◆ sum() [10/18]

template<linalg::KernelBackendSelector BackendSelector, MutableTensorView OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void uni20::sum ( BackendSelector &&  selector,
OutputTensor &&  output,
InputTensor const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Sum selected device tensor axes into an existing lower-rank tensor.

◆ sum() [11/18]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( BackendSelector  selector,
async::Async< InputTensor > const &  input 
)

Return an async storage-preserving full Tensor sum through an explicit selector.

◆ sum() [12/18]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( BackendSelector  selector,
async::Async< InputTensor > const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Return an async storage-preserving sum over selected axes.

Negative axes are accepted and surviving axes retain logical order.

◆ sum() [13/18]

template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView InputTensor>
requires MutableScalarTensorView<OutputTensor> && RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void uni20::sum ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input 
)

Schedule a full sum into an explicit async scalar tensor.

Axis normalization is compile-time for the full reduction. Shape preparation and backend dispatch occur after the input is readable.

Precondition
The output must not share an epoch queue with the input.

◆ sum() [14/18]

template<linalg::KernelBackendSelector BackendSelector, AsyncTensorOutput OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (mutable_tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void uni20::sum ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
async::Async< InputTensor > const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Schedule an axis-selective sum into an explicit async output.

Negative axes are accepted. Axis errors are reported before task submission; output shape validation or resizing occurs in the task.

Precondition
The output must not share an epoch queue with the input.

◆ sum() [15/18]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( InputTensor const &  input)

Return a storage-preserving full Tensor sum using storage policy.

◆ sum() [16/18]

template<TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && detail::ReductionResultAvailable<tensor_element_t<InputTensor>, InputTensor>
auto uni20::sum ( InputTensor const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Return a storage-preserving Tensor sum over selected axes using storage policy.

◆ sum() [17/18]

template<MutableScalarTensorView OutputTensor, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>>
void uni20::sum ( OutputTensor &&  output,
InputTensor const &  input 
)

Sum every tensor view element into an existing scalar tensor using storage policy.

◆ sum() [18/18]

template<MutableTensorView OutputTensor, TensorView InputTensor, linalg::ReductionAxis FirstAxis, linalg::ReductionAxis... RestAxes>
requires RealOrComplex<tensor_element_t<InputTensor>> && std::same_as<tensor_element_t<OutputTensor>, tensor_element_t<InputTensor>> && (1 + sizeof...(RestAxes) <= tensor_mdspec_t<InputTensor>::rank()) && (tensor_mdspec_t<OutputTensor>::rank() + 1 + sizeof...(RestAxes) == tensor_mdspec_t<InputTensor>::rank())
void uni20::sum ( OutputTensor &&  output,
InputTensor const &  input,
FirstAxis  first_axis,
RestAxes...  rest_axes 
)

Sum selected device tensor axes into an existing output using storage policy.

◆ sum_host() [1/5]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::sum_host ( async::Async< InputTensor > const &  input)

Return a nonblocking async host C++ scalar sum using storage policy.

◆ sum_host() [2/5]

template<linalg::KernelBackendSelector BackendSelector, MdspanLike InputSpan>
requires RealOrComplex<typename std::remove_cvref_t<InputSpan>::value_type>
auto uni20::sum_host ( BackendSelector &&  selector,
InputSpan &&  input 
) -> typename std::remove_cvref_t<InputSpan>::value_type

Return the full mdspan sum as a host C++ scalar.

◆ sum_host() [3/5]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::sum_host ( BackendSelector &&  selector,
InputTensor const &  input 
) -> tensor_element_t<InputTensor>

Return a full Tensor sum as a host C++ scalar through an explicit selector.

◆ sum_host() [4/5]

template<linalg::KernelBackendSelector BackendSelector, TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::sum_host ( BackendSelector  selector,
async::Async< InputTensor > const &  input 
)

Return a nonblocking async host C++ scalar sum through an explicit selector.

◆ sum_host() [5/5]

template<TensorView InputTensor>
requires RealOrComplex<tensor_element_t<InputTensor>>
auto uni20::sum_host ( InputTensor const &  input) -> tensor_element_t<InputTensor>

Return a full Tensor sum as a host C++ scalar using storage policy.

◆ swap()

template<typename ElementType >
void uni20::swap ( HostBuffer< ElementType > &  lhs,
HostBuffer< ElementType > &  rhs 
)
noexcept

◆ system_run_clock()

run_clock_sample uni20::system_run_clock ( )

◆ tan() [1/2]

mpreal uni20::tan ( mpreal const &  x)
inline

◆ tan() [2/2]

mpreal uni20::tan ( mpreal const &  x,
Precision  p 
)
inline

Evaluate tan(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ tanh() [1/2]

mpreal uni20::tanh ( mpreal const &  x)
inline

Hyperbolic tangent; retain input precision or a supported exact result.

Exceptions
std::logic_errorIf an exact input requires approximation, or x is unset.

◆ tanh() [2/2]

mpreal uni20::tanh ( mpreal const &  x,
Precision  p 
)
inline

Evaluate tanh(x.at(p)), returning an approximation at finite precision p.

Exceptions
std::logic_errorIf p is exact or x is unset.

◆ tanh_sinh_integrate()

template<Real R, std::size_t N, class F >
quadrature_result< R, N > uni20::tanh_sinh_integrate ( F const &  f,
R const &  lo,
R const &  hi,
tanh_sinh_options< R, N > const &  options 
)

Integrate N real components over lo<=hi using successive tanh-sinh meshes.

f(quadrature_point<R> const&) returns std::array<R,N> at the bounds' finite precision. Both bounds and every tolerance must have that same precision. Two consecutive mesh agreements are required. Mesh agreement with a large endpoint indicator returns endpoint_limit: increase endpoint_power or change variables. Estimates cannot certify unresolved narrow features, integrand error or arbitrary endpoint tails. Split interior singularities beforehand. Callback exceptions propagate. Numerical range/budget failures retain the last complete mesh. No global scalar settings or scheduler state are changed.

◆ tanpi() [1/2]

mpreal uni20::tanpi ( mpreal const &  x)
inline

Tangent of pi times x, with provider argument reduction.

◆ tanpi() [2/2]

mpreal uni20::tanpi ( mpreal const &  x,
Precision  p 
)
inline

Convert x to finite precision p, then evaluate tanpi at p.

◆ task_registry_report()

presentation::report_builder uni20::task_registry_report ( TaskRegistryGraphSnapshot const &  snapshot,
TaskRegistryGraphDiagnostics const &  diagnostics,
TaskRegistryReportOptions const &  options = {} 
)
inline

Build a presentation-native summary of one async task-registry snapshot.

The report contains the same structured tasks, epochs, values, and diagnostic findings used by the Graphviz renderer. Callers choose terminal, plain-text, strict-ASCII, or another presentation policy when rendering the returned document.

Parameters
snapshotStructured async runtime snapshot.
diagnosticsFindings derived from snapshot.
optionsReport title and optional trigger reason.
Returns
Presentation report suitable for any presentation renderer.

◆ Tensor()

template<TensorView InputTensor>
uni20::Tensor ( InputTensor const &  ) -> Tensor< tensor_element_t< InputTensor >, tensor_mdspec_t< InputTensor >::rank(), HostStorage, detail::materialized_layout_t< void, tensor_mdspec_t< InputTensor > >, DefaultAccessorFactory >

Deduce a runtime-extents host tensor that materializes a tensor view.

Canonical source layout is preserved. Sources without canonical physical layout deduce the default column-major layout.

◆ tensor_extents_equal()

template<TensorExtentsLike LhsExtents, TensorExtentsLike RhsExtents>
constexpr bool uni20::tensor_extents_equal ( LhsExtents const &  lhs,
RhsExtents const &  rhs 
)
constexprnoexcept

Compare two tensor extent objects by rank and per-axis extent.

◆ tgamma() [1/2]

mpreal uni20::tgamma ( mpreal const &  x)
inline

Real Gamma function; exact positive integers produce exact factorials.

◆ tgamma() [2/2]

mpreal uni20::tgamma ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate tgamma at p.

◆ to_block_space() [1/3]

auto uni20::to_block_space ( IrregularSpace const &  space) -> BlockSpace
inline

Return the canonical block-space representation of an IrregularSpace.

Parameters
spaceOrdered segmented space.
Returns
Regularized block space with the same leg label.

◆ to_block_space() [2/3]

auto uni20::to_block_space ( LocalSpace const &  space) -> BlockSpace
inline

Return the coalesced block-space representation of a LocalSpace.

Parameters
spaceOrdered local space.
Returns
Regularized block space with the same leg label.

◆ to_block_space() [3/3]

auto uni20::to_block_space ( QNumList const &  list) -> BlockSpace
inline

Return the coalesced block-space representation of a sparse QNumList.

Parameters
listSparse-space quantum-number list.
Returns
Regularized block space.

◆ to_int()

template<std::signed_integral T>
constexpr auto uni20::to_int ( basic_half_int< T >  value) -> T
constexpr

Convert a half-integer to its integral value.

Template Parameters
TSigned storage type.
Parameters
valueValue to convert.
Returns
Integral representation.

◆ to_int_assert()

template<std::signed_integral T>
constexpr auto uni20::to_int_assert ( basic_half_int< T >  value) -> T
constexpr

Convert a half-integer to its integral value assuming exact integrality.

Template Parameters
TSigned storage type.
Parameters
valueValue to convert.
Returns
Integral representation.

◆ to_string() [1/6]

template<std::signed_integral T>
auto uni20::to_string ( basic_half_int< T >  value) -> std::string
inline

Format a half-integer as an integer or decimal .5.

Template Parameters
TSigned storage type.
Parameters
valueValue to format.
Returns
Decimal string form.

◆ to_string() [2/6]

std::string_view uni20::to_string ( configuration_source  source)
inline

◆ to_string() [3/6]

auto uni20::to_string ( QNum const &  q) -> std::string
inline

Format a quantum number as comma-separated named components.

Parameters
qQuantum number to format.
Returns
Human-readable string form.

◆ to_string() [4/6]

std::string_view uni20::to_string ( run_outcome  value)

◆ to_string() [5/6]

auto uni20::to_string ( Symmetry const &  symmetry) -> std::string
inline

Format a symmetry handle as its canonical string form.

Parameters
symmetrySymmetry handle to format.
Returns
Canonical string spelling of the symmetry.

◆ to_string() [6/6]

auto uni20::to_string ( U1  value) -> std::string
inline

Format a U(1) irrep in decimal half-integer form.

Parameters
valueU(1) irrep to format.
Returns
Decimal half-integer string.

◆ to_string_fraction() [1/2]

template<std::signed_integral T>
auto uni20::to_string_fraction ( basic_half_int< T >  value) -> std::string
inline

Format a half-integer as an integer or n/2.

Template Parameters
TSigned storage type.
Parameters
valueValue to format.
Returns
Fractional string form.

◆ to_string_fraction() [2/2]

auto uni20::to_string_fraction ( U1  value) -> std::string
inline

Format a U(1) irrep in fractional n/2 form.

Parameters
valueU(1) irrep to format.
Returns
Fractional string.

◆ transform_inplace() [1/5]

template<AsyncTensorOutput OutputTensor, class Function , TensorView... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void uni20::transform_inplace ( async::Async< OutputTensor > &  output,
Function &&  function,
async::Async< InputTensors > const &...  inputs 
)

Schedule a variadic elementwise update using the static Tensor selector.

Selector resolution occurs before scheduling. The output contributes one writer and is never enrolled again as a read-only input.

Precondition
The output must not share an epoch queue with any input.

◆ transform_inplace() [2/5]

template<class BackendSelector , class OutputMdspan , class Function , class... InputMdspans>
requires detail::UpdateTransformSpans<OutputMdspan, InputMdspans...>
void uni20::transform_inplace ( BackendSelector &&  selector,
OutputMdspan &&  output,
Function &&  function,
InputMdspans &&...  inputs 
)

Update a fixed-shape mdspan through an explicit backend selector.

Computes output[i...] = function(output[i...], inputs[i...]...). The old output and input elements are passed as values.

Precondition
All operands have equal extents and output does not overlap an input.

◆ transform_inplace() [3/5]

template<class BackendSelector , class OutputTensor , class Function , class... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void uni20::transform_inplace ( BackendSelector &&  selector,
OutputTensor &&  output,
Function &&  function,
InputTensors const &...  inputs 
)

Update a Tensor output through an explicit backend selector.

Existing output values participate and the output shape is fixed. The old output and input elements are passed as values.

Precondition
All operands have equal extents and output does not overlap an input.

◆ transform_inplace() [4/5]

template<class BackendSelector , AsyncTensorOutput OutputTensor, class Function , TensorView... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void uni20::transform_inplace ( BackendSelector  selector,
async::Async< OutputTensor > &  output,
Function &&  function,
async::Async< InputTensors > const &...  inputs 
)

Schedule a variadic elementwise update with an explicit backend selector.

The output must already contain a Tensor. Its old element value is supplied through the single output writer and precedes all input values in the callable argument list.

Precondition
The output must not share an epoch queue with any input.

◆ transform_inplace() [5/5]

template<class OutputTensor , class Function , class... InputTensors>
requires detail::UpdateTransformTensors<OutputTensor, InputTensors...>
void uni20::transform_inplace ( OutputTensor &&  output,
Function &&  function,
InputTensors const &...  inputs 
)

Update a Tensor output using its operands' default backend selector.

◆ transform_view() [1/2]

template<class Function , MdspanLike First, MdspanLike Second, MdspanLike... Rest>
requires detail::ConstDirectlyCallable<std::decay_t<Function>, typename First::reference, typename Second::reference, typename Rest::reference...>
constexpr auto uni20::transform_view ( Function &&  function,
First const &  first,
Second const &  second,
Rest const &...  rest 
)
constexpr

Create a lazy read-only elementwise transform view over two or more inputs.

Precondition
Every input has the same runtime extents.

◆ transform_view() [2/2]

template<class Function , MdspanLike Span>
requires detail::ConstDirectlyCallable<std::decay_t<Function>, typename Span::reference>
constexpr auto uni20::transform_view ( Function &&  function,
Span const &  span 
)
constexpr

Create a lazy read-only unary transform view while preserving the input mapping.

◆ trunc() [1/2]

mpreal uni20::trunc ( mpreal const &  x)
inline

Round toward zero; exact inputs produce exact integers.

◆ trunc() [2/2]

mpreal uni20::trunc ( mpreal const &  x,
Precision  p 
)
inline

Round toward zero, then round the result to finite precision p.

The input is not rounded first. Approximate signed zero is retained.

◆ u1_component()

auto uni20::u1_component ( QNum const &  q,
std::string_view  name 
) -> U1
inline

Read one named U(1) component from a quantum number.

Parameters
qQuantum number to decode.
nameName of the requested symmetry component.
Returns
U(1) charge for that component.

◆ uni20_library_anchor()

void uni20::uni20_library_anchor ( )

◆ upper_gamma() [1/2]

mpreal uni20::upper_gamma ( mpreal const &  a,
mpreal const &  x 
)
inline

Upper incomplete Gamma, with shape a and lower integration endpoint x.

◆ upper_gamma() [2/2]

mpreal uni20::upper_gamma ( mpreal const &  a,
mpreal const &  x,
Precision  p 
)
inline

Convert both inputs to finite precision p, then evaluate upper_gamma at p.

◆ utc_now()

std::string uni20::utc_now ( )

◆ visit_scalar_precision()

template<class Function >
decltype(auto) uni20::visit_scalar_precision ( ScalarPrecision  precision,
Function &&  function 
)

Invoke a templated callable with the concrete real scalar for a runtime precision.

The callable must provide operator()<Scalar>() with a common return type for every configured precision. Requesting a known but unavailable precision throws std::invalid_argument. The conditional fp80 and fp128 types are confined to this configuration boundary, so callers do not need preprocessor guards.

Template Parameters
FunctionTemplated callable type.
Parameters
precisionRuntime precision selection.
functionCallable invoked with the selected scalar as its template argument.
Returns
Result returned by the selected callable specialization.

◆ zeros()

template<Scalar ElementType, std::integral... Extents>
auto uni20::zeros ( Extents...  extents)

Return a generated tensor filled with scalar zeros.

◆ zeta() [1/2]

mpreal uni20::zeta ( mpreal const &  x)
inline

Riemann zeta; nonpositive integer arguments retain exact rational results.

◆ zeta() [2/2]

mpreal uni20::zeta ( mpreal const &  x,
Precision  p 
)
inline

Convert the input to finite precision p, then evaluate zeta at p.

Variable Documentation

◆ accessor_applies_conjugation_v

template<class Accessor >
constexpr bool uni20::accessor_applies_conjugation_v
inlineconstexpr
Initial value:
=
accessor_applies_conjugation<std::remove_cvref_t<Accessor>>::value
locale_t value
Definition data_table.cpp:49

True when an accessor presents conjugated values.

◆ catalan

template<class Real >
constexpr auto uni20::catalan = detail::math_constants<Real>::catalan
inlineconstexpr

Catalan constant as a native value or a precision-aware MPFR descriptor.

◆ enable_accessor_in_domain

template<class Accessor , class Domain >
constexpr bool uni20::enable_accessor_in_domain< detail::transform_accessor< Function, Spans... >, cuda_access_domain > = false
inlineconstexpr

Opt-in customization for the execution domains supported by an accessor.

A multi-input transform is CUDA-accessible when every wrapped span is.

A multi-input transform is host-accessible when every wrapped span is.

Specializations must describe where access(...) may be evaluated, independently of whether data_handle_type is pointer-shaped.

Template Parameters
AccessorAccessor policy being classified.
DomainExecution-domain tag.

◆ enable_accessor_in_domain< conjugated_accessor< Accessor >, Domain >

template<AccessorPolicy Accessor, class Domain >
constexpr bool uni20::enable_accessor_in_domain< conjugated_accessor< Accessor >, Domain >
inlineconstexpr
Initial value:
=
enable_accessor_in_domain<Accessor, Domain>

Conjugation preserves the execution domains of the wrapped accessor.

◆ enable_accessor_in_domain< const_accessor_adaptor< Accessor >, Domain >

template<class Accessor , class Domain >
constexpr bool uni20::enable_accessor_in_domain< const_accessor_adaptor< Accessor >, Domain >
inlineconstexpr
Initial value:
=
enable_accessor_in_domain<Accessor, Domain>

A const accessor adaptor preserves its wrapped accessor's execution domains.

◆ enable_accessor_in_domain< diagonal_accessor< ElementType, Extents >, host_access_domain >

template<class ElementType , class Extents >
constexpr bool uni20::enable_accessor_in_domain< diagonal_accessor< ElementType, Extents >, host_access_domain > = true
inlineconstexpr

Diagonal accessors may be evaluated by ordinary host code.

◆ enable_accessor_in_domain< generated_accessor< ElementType, Extents, Generator >, cuda_access_domain >

template<class ElementType , class Extents , class Generator >
constexpr bool uni20::enable_accessor_in_domain< generated_accessor< ElementType, Extents, Generator >, cuda_access_domain > = true
inlineconstexpr

◆ enable_accessor_in_domain< generated_accessor< ElementType, Extents, Generator >, host_access_domain >

template<class ElementType , class Extents , class Generator >
constexpr bool uni20::enable_accessor_in_domain< generated_accessor< ElementType, Extents, Generator >, host_access_domain > = true
inlineconstexpr

Generated accessors are semantically valid in either execution domain.

The stored generator must itself be callable in the selected domain.

◆ enable_owning_tensor

template<class T >
constexpr bool uni20::enable_owning_tensor = false
inlineconstexpr

Opt-in marker for tensor types that own their storage and lifetime.

Specialize this variable template for a tensor type only when moving an object transfers ownership of the storage observed by its resolved mdspan. Tensor view and proxy types must not opt in.

◆ enable_owning_tensor< Tensor< ElementType, Rank, StoragePolicy, LayoutPolicy, AccessorFactory, Extents > >

template<typename ElementType , std::size_t Rank, typename StoragePolicy , typename LayoutPolicy , typename AccessorFactory , typename Extents >
constexpr bool uni20::enable_owning_tensor< Tensor< ElementType, Rank, StoragePolicy, LayoutPolicy, AccessorFactory, Extents > > = true
inlineconstexpr

◆ enable_uninitialized_storage

template<typename T >
constexpr bool uni20::enable_uninitialized_storage< uni20::detail::standard_complex< Real > >
inlineconstexpr
Initial value:
=
std::is_trivially_copyable_v<T> && std::is_trivially_destructible_v<T>

Opt a type into allocation without construction or destruction.

The default accepts trivially copyable and trivially destructible types. The standard complex specializations are explicitly accepted as a practical extension: Uni20 relies on their scalar-array representation and trivial lifetime behavior even on standard libraries whose type traits do not yet report them as trivially copyable.

◆ euler_gamma

template<class Real >
constexpr auto uni20::euler_gamma = detail::math_constants<Real>::euler_gamma
inlineconstexpr

Euler-Mascheroni constant, with the same type and precision rules as pi.

◆ has_float128

constexpr bool uni20::has_float128 = UNI20_HAS_FLOAT128 != 0
inlineconstexpr

Whether this build provides a concrete uni20::float128 type.

◆ has_float80

constexpr bool uni20::has_float80 = UNI20_HAS_FLOAT80 != 0
inlineconstexpr

Whether this build provides native x87 extended precision as uni20::float80.

◆ has_runtime_precision_v

template<typename T >
constexpr bool uni20::has_runtime_precision_v = false
inlineconstexpr

Whether numerical values of this scalar family carry runtime precision.

◆ is_proxy_reference_v

template<typename R >
constexpr bool uni20::is_proxy_reference_v
constexpr
Initial value:
=
!std::is_same_v<typename remove_proxy_reference<std::remove_cvref_t<R>>::type, std::remove_cvref_t<R>>

Detects whether a type is considered a proxy reference.

Evaluates to true if remove_proxy_reference changes the type, i.e., if the transformation produces a different type than the CV-ref stripped input.

◆ log_two

template<class Real >
constexpr auto uni20::log_two = detail::math_constants<Real>::log_two
inlineconstexpr

Natural logarithm of two, with the same type and precision rules as pi.

◆ mdspan_needs_conjugation_v

template<class Mdspan >
constexpr bool uni20::mdspan_needs_conjugation_v
inlineconstexpr
Initial value:
=
accessor_applies_conjugation_v<typename std::remove_cvref_t<Mdspan>::accessor_type>

True when an mdspan-like type's accessor presents conjugated values.

◆ pi

template<class Real >
constexpr auto uni20::pi = detail::math_constants<Real>::pi
inlineconstexpr

Pi as a native constant or a precision-aware MPFR descriptor.

Native constants retain the requested type. With mpreal.hpp included, pi<mpreal>.at(p) evaluates at finite precision p; arithmetic with an approximate mpreal operand infers that operand's precision.

◆ uninitialized

constexpr uninitialized_t uni20::uninitialized {}
inlineconstexpr

Explicit allocation tag for overwrite outputs and scratch space.