-
Notifications
You must be signed in to change notification settings - Fork 14
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
TypeError: non-boolean (SymbolicUtils.BasicSymbolic{Bool}) #227
Comments
Could you provide a complete code snippet that reproduces this error? That should make it easier to debug. Thanks! |
Sure Thing ! Actually, while preparing the code snippet, I found the error source. The
But as soon as I hand it the ground state to ground state transition Here is the code snippet I prepared
|
I'm not at a computer right now, so I can't say for sure, but that statement has me suspicious:
You don't need to include the ground state projector as it can simply be computed as So here's what I think happens: when you add the ground state projector to the list of operators, it gets written as the above expression. That means you end up trying to derive an equation for an addition, which it can't deal with properly. And then you end up with this completely unhelpful error message (sorry about that). To fix it, have a look at the ground state sigmas to verify whether it gets rewritten as sum of other projectors. If that's the case, then exclude them from the list of operators, they shouldn't be required in order to complete the set of equations and compute the dynamics. You can then compute the ground state expectation values afterwards from the sum over all other level projectors (see also https://qojulia.github.io/QuantumCumulants.jl/dev/implementation/#Operator-expressions-and-commutation-relations). I hope that fixes the issue. |
Yes it does. Thanks! |
I am Using Julia Version 1.11.1 (2024-10-16) with Windows 11 and QuantumCumulants v0.3.7.
I have written a code which should display the mean field equations for a complex Hamiltonian (Coupling 5 ground states to 7 excited states) with dual cavity mode driving. This worked well when ignoring summations over atoms. However, I wanted to implement the Sums, I basically replaced all
Transitions
withIndexedOperator(Transition)
. After doing so the code works well untileqs=complete(eqs);
This is the last working step. Afterwards I want to usescale(eqs)
. If I only do this for the cavity Equations, it works and I get the correct cavity equations. If I try to usescale(eqs,h=h_atom)
on the total equations of my system I get:.
The same error appears for
scale(eqs_atom,h=h_atom)
.An example Equation for the atom would be
An example before scale for the cavity would be
and after scale:
![equation_a_after_scale](https://private-user-images.githubusercontent.com/171231617/390922191-e9dbcf1c-c6a8-49c0-bffa-40c941189fcf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTUxMDAsIm5iZiI6MTczOTM1NDgwMCwicGF0aCI6Ii8xNzEyMzE2MTcvMzkwOTIyMTkxLWU5ZGJjZjFjLWM2YTgtNDljMC1iZmZhLTQwYzk0MTE4OWZjZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMlQxMDA2NDBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zMjVhYzdkZWE0N2QyMGM2YzMxMmViZGNhM2VlNTBmOTY2YTczOTJmYmZlYWJmYzYyODQ1ZjljMGY4YzAyOTVkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.p1vq7eKzLrtmagsWnBtUqHVA90zYghAdC2kLDjmPp3w)
This appears to be correct according to my hand calculations. But I cant get the atomic Equations to work.
The Objects I use :
I would be greatful for some help. Thanks.
PS:
Complete(eqs)
because of some Parsing error (ParseError: KaTeX parse error
)- incase someone runs into the same problem - just use a.jl
The text was updated successfully, but these errors were encountered: