Skip to content

States, expectation, and uncertainty relations - #1577

Closed
TomOleDiem wants to merge 2 commits into
leanprover-community:masterfrom
TomOleDiem:measurement-state-uncertainty
Closed

States, expectation, and uncertainty relations#1577
TomOleDiem wants to merge 2 commits into
leanprover-community:masterfrom
TomOleDiem:measurement-state-uncertainty

Conversation

@TomOleDiem

@TomOleDiem TomOleDiem commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Adds states and the uncertainty relations built on the existing Jordan/Lie observable API.

  • OperatorAlgebra.Measurement.State: the expectation functional ω⟨a⟩, centering, covariance, and variance.
  • OperatorAlgebra.Measurement.Uncertainty: the GNS Cauchy–Schwarz inequality for states, and the Robertson–Schrödinger and Robertson uncertainty relations.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for this pull-request (PR). If this is your first PR, welcome to the community!

Below is what will happen next. Please read carefully if you are not familiar with the process. You may open other PRs while this one is being reviewed, and can stack PRs on top of each other, so don't let these steps slow you down.

  1. Some automated checks will be run on your PR. You can see the results of these checks at the buttom of your PR page. If any of these checks fail, you will need to fix the issues before your PR can be merged. You can learn more about these here, including how to run them locally, which is sometimes quicker than relying on the GitHub Actions. If you have never had a PR merged before, you may have to wait for a reviewer to manually start these checks (this is for security).

  2. A reviewer will look at your PR and may ask you to make changes. This may happen a couple of days after you submit your PR, so you may need to be patient. But it should not be longer than that - if it is please bring it to the attention of the community on the Zulip. The level of review will depend on where your PR is submitted. If it is submitted to ./Physlib or ./QuantumInfo, the review will be more thorough than if it is submitted to ./PhyslibAlpha. You can find out more about what the review process is looking for in our review guidelines. If a reviewer adds an awaiting-author label to your PR, address the review comments, then please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

  3. The reviewer will either approve your PR, or request more changes (in which case we return to step 2). Once your PR is approved, it will be merged by a maintainer, this should happen shortly after approval, though you may get more comments at this stage.

Tip: The easiest way to get have a fast review is to submit a PR that is small and self-contained, and has clear documentation explaining why things are the way they are in your chages.

If you have any problems or questions, please reach out to the community on the Zulip.

@github-actions github-actions Bot added the t-quantum-mechanics Quantum mechanics label Aug 24, 2026
@jstoobysmith

Copy link
Copy Markdown
Member

Maybe in this we can also subsume the definitions and lemmas within ./Operators/StateObservables/ where possible?
I.e. remove the overlap

@jstoobysmith

Copy link
Copy Markdown
Member

Putting on

awaiting-author

for the comment above

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Aug 24, 2026
@TomOleDiem

Copy link
Copy Markdown
Contributor Author

Maybe in this we can also subsume the definitions and lemmas within ./Operators/StateObservables/ where possible? I.e. remove the overlap

I dont think it is time for that.
There is no notion of an unbounded operator yet.
Average position can not be defined by this PR.
Only finite systems and maybe some infinite lattice models with bounded gap can be handled as of right now.

@TomOleDiem

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes label Aug 25, 2026
TomOleDiem and others added 2 commits August 25, 2026 09:37
Adds OperatorAlgebra.Measurement.State (expectation, centering, covariance,
variance) and OperatorAlgebra.Measurement.Uncertainty (GNS Cauchy-Schwarz,
Robertson-Schrodinger and Robertson uncertainty relations), built on the
existing Jordan/Lie observable API.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ent/State.lean

Basic.lean's own docstring already says elementary results about each notion
should live in their own file; State's structure definition was left behind
there instead. Move it into Measurement/State.lean, which already builds the
expectation/covariance/variance API on top of it and had its own duplicate
CoeFun instance — drop that duplicate now that the struct lives alongside it.

Addresses jstoobysmith's review comment on removing overlap.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@TomOleDiem
TomOleDiem force-pushed the measurement-state-uncertainty branch from 3d14f7f to 0830bb8 Compare August 25, 2026 07:49

@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.

One quick comment from me here.

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.

Should "State" really be under "Measurement"?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I see what you mean. I’m using the Heisenberg view, where states act on observables by assigning expectation values, so grouping them with measurement seemed natural.

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.

Ok, can we put a comment to this effect in the doc-string?

@jstoobysmith

Copy link
Copy Markdown
Member

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Aug 25, 2026
@malmortieus537

Copy link
Copy Markdown

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes label Aug 25, 2026
@jstoobysmith

Copy link
Copy Markdown
Member

awaiting-author

For the comment above.

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Aug 25, 2026
@jstoobysmith

Copy link
Copy Markdown
Member

@TomOleDiem Just a ping about the comment above

@TomOleDiem

Copy link
Copy Markdown
Contributor Author

Superseded by #1590, which isolates the reviewed primitive API split.

@TomOleDiem TomOleDiem closed this Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes medium t-quantum-mechanics Quantum mechanics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants