Skip to content
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

Wrong distributive scaling properties #54

Closed
apkille opened this issue Jun 24, 2024 · 3 comments
Closed

Wrong distributive scaling properties #54

apkille opened this issue Jun 24, 2024 · 3 comments

Comments

@apkille
Copy link
Member

apkille commented Jun 24, 2024

julia> @op A
A

julia> (1+im)*A
1 + 1imA
@apkille
Copy link
Member Author

apkille commented Jun 24, 2024

Could be that printing functionalities are misleading here:

julia> QuantumSymbolics.arguments((1+im)*A)
2-element Vector{Any}:
 1 + 1im
    A

Will address in upcoming PR.

@apkille
Copy link
Member Author

apkille commented Jun 24, 2024

Also, we currently have

julia> @bra b; @ket k;

julia> (b*k)*A
ERROR: TypeError: non-boolean (SymbolicUtils.BasicSymbolic{Bool}) used in boolean context
Stacktrace:
 [1] *(c::SBraKet, x::SOperator)
   @ QuantumSymbolics ~/Documents/Julia Packages/QuantumJulia/QuantumSymbolics.jl/src/QSymbolicsBase/basic_ops_homogeneous.jl:33
 [2] top-level scope
   @ REPL[16]:1

@apkille
Copy link
Member Author

apkille commented Jun 26, 2024

Could be that printing functionalities are misleading here:

julia> QuantumSymbolics.arguments((1+im)*A)
2-element Vector{Any}:
 1 + 1im
    A

Will address in upcoming PR.

Another printing issue is when you multiply a tensor product with an operator, say A*(B ⊗ C), which currently gives AB⊗C, rather than the preferred A(B ⊗ C).

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

No branches or pull requests

1 participant