Skip to content

Use Styles interface for expectation values#391

Open
AFeuerpfeil wants to merge 6 commits intoQuantumKitHub:mainfrom
AFeuerpfeil:pr-styles-expvals
Open

Use Styles interface for expectation values#391
AFeuerpfeil wants to merge 6 commits intoQuantumKitHub:mainfrom
AFeuerpfeil:pr-styles-expvals

Conversation

@AFeuerpfeil
Copy link
Contributor

@AFeuerpfeil AFeuerpfeil commented Feb 27, 2026

In this PR, I implement the GeometryStyle and OperatorStyle interface for expectation_value.
The main entry points are:

function expectation_value(ψ::AbstractMPS, H::AbstractMPO)
    return expectation_value(GeometryStyle(ψ, H), OperatorStyle(H), ψ, H)
end
function expectation_value(
        ψ::AbstractMPS, H::AbstractMPO,
        envs::AbstractMPSEnvironments
    )
    return expectation_value(GeometryStyle(ψ, H), OperatorStyle(H), ψ, H, envs)
end

@lkdvos: Happy to take feedback from you for this small PR! When we have converged on a good convention, I will spend the next days to finish up the styles rewrite.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Your PR no longer requires formatting changes. Thank you for your contribution!

@lkdvos
Copy link
Member

lkdvos commented Feb 27, 2026

That's great news, happy you are back, and happy to discuss :)

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