A time-looping variable container for quantum misfits and deterministic dreamers.
$ dotnet add package PositronicVariablesA time looping variable container for quantum misfits and deterministic dreamers.
PositronicVariable<T> simulates values that evolve across iterative timelines. Think Schr�dinger's variable: simultaneously filled with regret and potential. Now with automatic convergence, STM-backed transactional updates, telemetry, and existential debugging.
Not exactly time travel but close enough to confuse your boss.
QuBit<T> from QuantumSuperpositiondotnet add package PositronicVariables
Logical loop with no stable resolution:
[DontPanic]
private static void Main()
{
var antival = PositronicVariable<int>.GetOrCreate("antival", -1);
Console.WriteLine($"The antival is {antival}");
var val = -1 * antival;
Console.WriteLine($"The value is {val}");
antival.State = val;
}
The antival is any(-1, 1)
The value is any(1, -1)
Two state paradox. Like a light switch held halfway by indecision. Convergence matters. Without it you loop until the compiler cries.
Use the ambient transaction scope for multi-variable atomic updates. Read-only transactions validate without taking locks.
using PositronicVariables.Transactions;
// Read-only fast path
a = PositronicVariable<int>.GetOrCreate("a", 1);
using (var tx = TransactionScope.Begin())
{
TransactionScope.RecordRead(a);
}
// Update with retry and telemetry
TransactionV2.RunWithRetry(tx =>
{
tx.RecordRead(a);
var next = a.GetCurrentQBit();
tx.StageWrite(a, next + 1); // stage a new qubit state
});
Console.WriteLine(STMTelemetry.GetReport());
Time ->
[initial guess] - val = -1 * antival -> antival = val -> [back in time]
^_______________________________________________|
We created a cycle. The engine iterates until the values stabilise. If they never settle you get superpositions. Emotional baggage for integers.
TransactionV2/TransactionScope. Reads-only take the fast lane (no locks), writes stage and commit atomically with per-variable locks.ConvergenceCoordinator owns this queue and the exclusive engine token.IReadOnlyList<QuBit<T>>; bring your own transactions if you want changes.AsyncLocal, so await won�t quietly wander off with your invariants.IComparable.Unlicensed. Use it. Break it. Ship it. Regret it.
File an issue or collapse reality and start again.