You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/unitary_integration.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,20 @@ println(res3)
121
121
# Output: 1
122
122
```
123
123
124
+
### 4. Matrix Integration
125
+
126
+
New in v0.2: You can integrate matrix-valued expressions directly. The function `integrate` will element-wise integrate any `AbstractArray` passed to it.
127
+
128
+
```julia
129
+
using LinearAlgebra
130
+
131
+
# Integrate U * U' (should be identity)
132
+
# We collect the symbolic expression to a Matrix{Num} to ensure it's treated as an array of expressions
133
+
expr_mat =collect(U * U')
134
+
res_mat =integrate(expr_mat, measure)
135
+
# Result is the Identity matrix
136
+
```
137
+
124
138
## Potential Pitfalls
125
139
126
140
-**Symbolic vs Numeric Dimension**: The dimension $d$ can be symbolic.
0 commit comments