alternative

Start Here

  • Quickstart
    • Register Implementations
    • Test the Contract
    • Benchmark Representative Inputs
    • Choose a Default
    • Use Methods
    • Next Steps
  • An Optimization Workflow
    • Reference and Candidate
    • Startup Imports
    • Test the Contract and Measure the Result

Guides

  • Example applications
    • NumPy optimisation
      • Compare with Alternative
    • Evolving Quantum Circuits
      • Test, Score, and Benchmark the Finalists
  • Pytest Integration
    • Equivalence Tests
    • Check Expected Results
    • Benchmark All Implementations
    • Only the Default Implementation
    • Testing Methods
    • Async Tests
    • Reference Caching
    • Collection Order
  • Testing Observable Behavior
    • Fresh Inputs for Mutating Functions
    • Exceptions Are Part of the Contract
    • Numerical Comparisons
    • Different but Valid Outputs
  • Runtime Workflow
    • When to Use It
    • Selection Lifecycle
    • Measure Implementations
    • Safety Rules
    • Debug Mode
    • Registration Forms
    • Copying Implementations
    • Typed Calls
  • Methods and Descriptors
    • Decorator Order
    • Imported Static Candidates
    • Call Through a Class or Instance
    • Testing and Measuring
  • Performance and When to Use It
    • A Rough Overhead Budget
    • Benchmark Your Application
    • Measure Dispatch in Your Environment

Reference and Development

  • API Reference
    • Decorator
      • reference()
    • Alternatives
      • Alternatives
      • Alternatives.add()
      • Alternatives.pytest_parametrize()
      • Alternatives.pytest_parametrize_pairs()
    • Implementation
      • Implementation
      • Implementation.add()
    • Exceptions
      • AlternativeError
      • AddTooLateError
      • MultipleDefaultsError
      • CrossAlternativesImplementationError
    • Typing and IDEs
  • Contributing and Releases
    • Validation
    • Typing Compatibility Checks
    • Publishing
alternative
  • Search


© Copyright 2025, Oliver Bristow.

Built with Sphinx using a theme provided by Read the Docs.