Skip to content

Conversation

@mtfishman
Copy link
Member

@mtfishman mtfishman commented Jan 24, 2025

For example:

julia> using QuantumOperatorDefinitions

julia> op("X + 2Z")
2×2 Matrix{Float64}:
 2.0   1.0
 1.0  -2.0

julia> op("exp(im * (X + 2Z))")
2×2 Matrix{ComplexF64}:
   -0.617273+0.70369im   -2.77556e-17+0.351845im
 5.55112e-17+0.351845im     -0.617273-0.70369im

Closes #11 .

@mtfishman mtfishman merged commit ac8ca27 into main Jan 24, 2025
10 checks passed
@mtfishman mtfishman deleted the parse branch January 24, 2025 14:52
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.

[ENHANCEMENT] Decide if we should have the behavior OpName("X * Y") == OpName("X") * OpName("Y"), op("X * Y") == op("X") * op("Y"), etc.

2 participants