-
Notifications
You must be signed in to change notification settings - Fork 19
Add StateVectorRepr backend with tests and documentation #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add StateVectorRepr backend with tests and documentation #120
Conversation
Added `StateVectorRepr` backend to `QuantumSymbolics.jl`. Turns symbolic quantum stuff into `Vector{ComplexF64}` (kets) or `Matrix{ComplexF64}` (operators) using `QuantumOpticsRepr` for `express`. Put it in `QuantumOpticsExt.jl`, added tests in `quantumoptics_tests.jl`, docs in `index.md`, and `QuantumOptics` as a weak dep in `Project.toml`. Tests pass locally.
…bject in QuantumOpticsExt.jl”
…ls.Symbolic in QuantumOpticsExt.jl
Add [compat] section and QuantumSavory version to test/Project.toml
Project.toml
Outdated
@@ -16,11 +16,12 @@ TermInterface = "8ea1fca8-c5ef-4a55-8b96-4e9afe9c9a3c" | |||
[weakdeps] | |||
QuantumClifford = "0525e862-1e90-11e9-3e4d-1b39d7109de1" | |||
QuantumOpticsBase = "4f57444f-1401-5e15-980d-4471b28d5678" | |||
QuantumOptics = "6e4d0e0e-3d2e-5f0e-8f3f-2b5b8e8d2f1e" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QuantumOpticsBase should be sufficient. I do not think you need QuantumOptics.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks i have removed that line now
test/Project.toml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes to this file seem a bit weird. Was this done by an LLM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, an LLM provided some initial support on these changes, especially with deciphering a few errors and code patterns
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the Pkg.jl documentation and look at how QuantumSymbolics.jl and QuantumClifford.jl have things done as a reference, so that you can detect whether the LLM is suggesting silly things
struct StateVectorRepr{C} | ||
config::C | ||
StateVectorRepr(config=nothing) = new{typeof(config)}(config) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type parameterization here is a bit overly complicated. Any reason to set it up like this? Check out the QuantumOpticsRepr
-- it can be a good reference for how to do it in a simpler way.
I am marking this as a draft just to keep my review queue a bit more manageable. Feel free to convert it back once it is ready and do not hesitate to ask for a review at any time. |
@phantmgx what's the status on this PR? If you want I can help finish it :) |
This PR adds a new
StateVectorRepr
backend toQuantumSymbolics.jl
, which converts symbolic quantum objects to numerical vectors/matrices usingQuantumOpticsRepr
. The changes include:StateVectorRepr
inQuantumOpticsExt.jl
.test_statevectorrepr.jl
using@testitem
.docs/src/index.md
under a new## Backends
section.QuantumOptics
as a weak dependency inProject.toml
for theQuantumOpticsExt
extension.CHANGELOG.md
with an entry for the newStateVectorRepr
backend.Checklist