Skip to main content

Variable Adding 1.0.0

An experimental, dependency-free Python toolkit integrating Variable Adding and Optimation ideas: fractional increments, 1–100 percent weighting, exploratory trade-offs, coordinate-search models, and weighted gradient descent.

Installation

pip install variable-adding

Example

from variable_adding import (
    apply_weight, weighted_blend, sweep_weights,
    Model, Variable, Objective, minimize, weighted_gradient_descent,
)

print(apply_weight(10, 20, 90))  # 29.0 = B + 90% of A
print(weighted_blend(10, 20, 90))  # 11.0 = 90% A + 10% B
print(sweep_weights(10, 20, [10, 50, 90]))

model = Model()
model.add_variable(Variable("x", 5, lower=-10, upper=10))
model.set_objective(Objective(lambda values: (values["x"] - 2)**2))
print(minimize(model))

history = weighted_gradient_descent(
    lambda x: x[0]**2,
    lambda x: (2*x[0],),
    (4.0,), weights=[25, 50, 100], c=1, lipschitz=2,
    iterations=100,
)
print(history[-1])

API

  • Core: variable_add, half_add, quarter_add, double_add, percentage_add, weighted_add, exponential_add.
  • Adaptive: adaptive_step, iterate_add, optimize_scalar.
  • Weighting: apply_weight, weighted_blend, tradeoff_update, half_weighted_balance, exponential_blend, quadratic_blend, sweep_weights.
  • Model API: Variable, Objective, Model, Result, minimize.
  • Gradient: weight_law_rate, weighted_gradient_descent, GradientStep.
  • Quantum-inspired parameter tools: tune_angle, rotation_matrix. These do not implement quantum computing or quantum error correction.

The weighting formulas correspond to examples in the supplied Optimation documents. The model API is a new compatible-style interface, not a claim of exact backward compatibility with every previously published optimation version.

Caution: Coordinate search is heuristic and not guaranteed to find a global optimum. The gradient law requires a smooth lower-bounded objective and a correct Lipschitz gradient constant; this library cannot verify those assumptions. Claims of empirical performance improvements or quantum hardware advantages are not established by these implementations.

Publishing

python -m pip install --upgrade build twine
python publish_pypi.py --dry-run
python publish_pypi.py --repository testpypi
python publish_pypi.py --repository pypi

Publishing needs a repository-specific API token. Version 1.0.0 must be unused on the target index. Source material: Optimation, Examples, Optimation Weight Law, Variable Adding and Variable Adding Theorem supplied by Sourceduty.

Metadata

Release files for variable-adding 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for variable-adding 1.0.0
File Size Uploaded Provenance Actions
variable_adding-1.0.0.tar.gz 9.2 kB Without provenance Details for variable_adding-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for variable-adding 1.0.0
File Interpreter ABI Platform Actions
variable_adding-1.0.0-py3-none-any.whl Python 3 none any Details for variable_adding-1.0.0-py3-none-any.whl

Total release size: 18.0 kB

Release files / variable_adding-1.0.0.tar.gz

Download URL variable_adding-1.0.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
786bdd75c869893b034cf8f4794ea6cf9c50e5b284c250b5eb6cb9ab465a3100
BLAKE2b-256 checksum
How to use checksums
88185eb6e9216f8a3d22525c0bc68ec6e3bc79f8a1c59b3c64887649ec945bca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / variable_adding-1.0.0-py3-none-any.whl

Download URL variable_adding-1.0.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
159f86eefbfa6dc00c715bbb400753149ac6423de9b27329b2127fcd50a988c1
BLAKE2b-256 checksum
How to use checksums
a95f49f64763ffc28ce7499824ca22c79b8949db81b8937195e900fb1ceb32a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for variable-adding 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page