Skip to content

Commit 27bc48e

Browse files
refactor: made U_f to correct dimnensions and returned U_t dimensions to original form
1 parent 6332645 commit 27bc48e

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tutorials-v5/optimal-control/control-grape-cnot.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,13 @@ plot_control_amplitudes(times, result.final_amps / (2 * np.pi), H_labels)
165165
## Fidelity/overlap
166166

167167
```python
168-
# initially its dimensions where [[2,2],[2,2]]
169-
U_target = qt.Qobj(U_target.data, dims=[[4], [4]])
170-
U_target
171-
```
172168

173-
```python
174-
np.shape(U_target)
169+
U_target
175170
```
176171

177172
```python
178-
U_f = result.evo_full_final
173+
U_f=result.evo_full_final
174+
U_f.dims = [[2,2], [2, 2]]
179175
```
180176

181177
```python

0 commit comments

Comments
 (0)