Skip to content

feat(PhyslibAlpha): QuantumThermodynamics — thermal state, Landauer bound, area API-map#1409

Draft
fliingelephant wants to merge 3 commits into
leanprover-community:masterfrom
fliingelephant:alpha/quantum-thermal
Draft

feat(PhyslibAlpha): QuantumThermodynamics — thermal state, Landauer bound, area API-map#1409
fliingelephant wants to merge 3 commits into
leanprover-community:masterfrom
fliingelephant:alpha/quantum-thermal

Conversation

@fliingelephant

Copy link
Copy Markdown

Seeds a PhyslibAlpha/QuantumThermodynamics/ area: the quantum thermal (Gibbs) state as an MState constructor-family member, the Gibbs relative-entropy balance, a minimal Landauer erasure setup with the Landauer bound, and the area's API-map.yaml (exemplar format) recording done seeds and the open requirements (total correlation, thermal operations, thermo-majorization, quantum free energy).

Draft on purpose: opened early for direction feedback on the area layout and the MState.thermal naming before polishing toward ready-for-review.

Added declarations

PhyslibAlpha/QuantumThermodynamics/ThermalState.lean

  • HermitianMat.partitionFunctionBetaReal, partitionFunctionBetaReal_posZ(β) = Tr exp(-βH) and its positivity.
  • MState.thermalBetaReal, MState.thermal — the Gibbs state exp(-βH)/Z(β); real-β primitive (functional-calculus-friendly, negative temperatures reachable) with the Temperature-facing entry matching the classical CanonicalEnsemble idiom.
  • Lemma kit: thermalBetaReal_M, thermalBetaReal_trace, thermalBetaReal_nonSingular, thermalBetaReal_posDef, thermal_eq_thermalBetaReal (simp normal form), thermalBetaReal_log.
  • gibbsRelativeEntropyBalanceBetaReal, gibbsRelativeEntropyBalanceβ(⟨H⟩_ρ − ⟨H⟩_γ) = S(γ) − S(ρ) + D(ρ‖γ) in both parametrizations.

PhyslibAlpha/QuantumThermodynamics/Landauer.lean

  • LandauerProcess — system + finite reservoir at Temperature, coupled by a global unitary.
  • State/bookkeeping defs: initialReservoir, initialJoint, finalJoint, finalSystem, finalReservoir, systemEntropyDecrease, reservoirEntropyIncrease, reservoirHeat, reservoirRelativeEntropy.
  • entropyBalance — entropy production as mutual information plus reservoir relative entropy.
  • landauerIdentity, landauerBound — the exact finite-β Landauer identity (Reeb–Wolf style) and the bound β·Q ≥ ΔS.

PhyslibAlpha/QuantumThermodynamics/API-map.yaml — area map: overview, ParentAPIs (QuantumInfo entropies/CFC, classical CanonicalEnsemble, Temperature), references, done + open requirements.

PhyslibAlpha.lean — registration of the two new modules.

Reviewer map

  1. ThermalState.lean top-to-bottom (partition function → state → kit → balance).
  2. Landauer.lean (structure → bookkeeping defs → the three lemmas).
  3. API-map.yaml, then the registration line.

Notes for reviewers

  • No existing declaration in QuantumInfo/ or Physlib/ covers a quantum Gibbs state, quantum partition function, or these results (searched by meaning; closest neighbor is a private normalized exponential inside the Stein's-lemma proof).
  • All heavy facts are consumed from upstream (qRelativeEnt expansion, entropy lemmas, HermitianMat CFC positivity/log API) — nothing is re-proved.
  • Builds green; runPhyslibAlphaLinters, alphaFileImports.py, noAlphaImports.py, and the style linters all pass; no sorryAx in the new modules.
  • AI-assisted per AI-POLICY.md/AGENTS.md: commits carry the model co-author trailer; the human author will independently verify the bibliographic references and certifies the statements before this leaves draft.

🤖 Generated with Claude Code

fliingelephant and others added 3 commits July 11, 2026 06:01
MState.thermalBetaReal / Temperature-facing MState.thermal in the MState
constructor-family idiom, partition function, positivity/trace-one/full-rank
lemma kit, beta-Temperature bridge, and the Gibbs relative-entropy balance.

Co-authored-by: Claude Fable 5 <no-reply+claude-fable-5@anthropic.com>
Minimal LandauerProcess, initial/final marginals, entropy balance,
Landauer identity, and the Landauer bound, built on QuantumInfo's
entropy machinery.

Co-authored-by: Claude Fable 5 <no-reply+claude-fable-5@anthropic.com>
API-map.yaml in the exemplar format: done entries for the seeded thermal
state and Landauer results; open requirements for total correlation,
thermal operations, thermo-majorization, and quantum free energy.

Co-authored-by: Claude Fable 5 <no-reply+claude-fable-5@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for this PR, which will now be reviewed. If submitting to ./Physlib or ./QuantumInfo, please see our review guidelines if you are not familiar with the process. You should expect a back and forth with a reviewer before your PR is merged. See also that link for how to add appropriate labels to your PR. The PR will also go through a number of automated checks. You can learn more about these here, including how to run them locally.

If you are submitting to ./PhyslibAlpha there will be a lighter review process, though your PR must still pass the automated checks.

If you want to bring attention to this PR, please write a message on this thread of the Lean Zulip.

Important: If a reviewer adds an awaiting-author label to your PR, once you have addressed the review comments, please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

@jstoobysmith jstoobysmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I've put some comments here. Normally for ./PhyslibAlpha we don't do a detailed review, but have done so since you asked for comments.


/-- A finite-dimensional Landauer process consisting of a system state, a thermal reservoir, and
a joint unitary evolution. -/
structure LandauerProcess (S R : Type*) [Fintype S] [DecidableEq S]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generally looks quite good. Although it is not my area so I can't speak about specific details.

One thing that I think would improve this PR is a better description in the documentation about what the Landauer process is, and why you need this input data for it.

- Reeb and Wolf, An improved Landauer principle with finite-size corrections.
- Esposito, Lindenberg, and Van den Broeck, New Journal of Physics 12, 013013 (2010).
- Horodecki and Oppenheim, Nature Communications 4, 2059 (2013).
- Brandão, Horodecki, Ng, Oppenheim, and Wehner, PNAS 112, 3275 (2015).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have these references been checked or AI generated?

namespace HermitianMat

/-- The quantum partition function `Z(β) = tr(exp(-βH))` at real inverse temperature `β`. -/
noncomputable def partitionFunctionBetaReal (H : HermitianMat d ℂ) (β : ℝ) : ℝ :=

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does e.g. this relate to other partition functions we have in Physlib?

@jstoobysmith

Copy link
Copy Markdown
Member

That said, I've someone who has more experience in this area then me might be able to say something more useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants