Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorNetwork.ScheduleCount

The number of calls of the contraction recursion #

Under the parameter schedule of Cslib.Circuits.Frontier.ContractionSchedule, a call at depth d of the recursion of [OAI26k] (Appendix D.4) has at most 2 ^ (2 ⌊log₂ s⌋ + branchExponent C s d) children (ContractionSchedule.exists_activeBounds, ContractionSchedule.ActiveBounds.card_modeBudget_le), and there are at most ⌊log₂ s⌋ levels. The excess exponents sum to O(s / √⌊log₂ s⌋) (ContractionSchedule.sum_branchExponent_le), so the recursion has 2 ^ O(s / √⌊log₂ s⌋) calls (ContractionSchedule.recursionBound_le_two_pow_div_sqrt_log_two, with the constant 245760 C + 37): the count of Appendix D.4.7 (p. 64), in the natural-number scale of the contraction interface. It bounds the nodes of the depth-first evaluation (Nat.recursionBound), hence the fuel of Cslib.Algorithms.StackRecursion.Scheme.certificate.

Main results #

References #

theorem Cslib.Circuits.Frontier.ContractionSchedule.recursionBound_le_two_pow_div_sqrt_log_two (C : ℕ) {s D : ℕ} (hs : 2 ≤ s) (hD : D ≤ Nat.log 2 s) :
Nat.recursionBound (fun (d : ℕ) => 2 ^ (2 * Nat.log 2 s + branchExponent C s d)) D 0 ≤ 2 ^ ((245760 * C + 37) * s / (Nat.log 2 s).sqrt)

The recursion has 2 ^ O(s / √⌊log₂ s⌋) calls, with the constant 245760 C + 37. From s = 2 on, a recursion of depth at most D ≤ ⌊log₂ s⌋ whose calls at depth d have at most 2 ^ (2 ⌊log₂ s⌋ + branchExponent C s d) children has at most 2 ^ ((245760 C + 37) s / √⌊log₂ s⌋) nodes below its root. The constant is linear in C, so one clock serves every admissibility constant at once, as a machine that does not know C needs.