-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreproducing.m
1008 lines (809 loc) · 43.1 KB
/
reproducing.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%% Section U: 2-Level Systems
%% Pauli Matrices (SU(2))
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0]; z = [1 0 ; 0 -1];
%% Standard Basis matrices
A1 = [1 0 ; 0 0];
A2 = [0 0 ; 0 1];
A3 = [0 1 ; 1 0];
A4 = [0 1i ; -1i 0];
%% Eq. 34
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
LHS = [0 1 ; 0 0];
RHS = (1/2)*(x + 1i*y);
isequal(LHS,RHS)
%% Eq. 35
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
LHS = [0 0 ; 1 0];
RHS = (1/2)*(x - 1i*y);
isequal(LHS,RHS)
%% Eq. 36
z = [1 0 ; 0 -1];
LHS = [1 0 ; 0 0];
RHS = (1/2)*(eye(2) + z);
isequal(LHS,RHS)
%% Eq. 37
z = [1 0 ; 0 -1];
LHS = [0 0 ; 0 1];
RHS = (1/2)*(eye(2) - z);
isequal(LHS,RHS)
%% Section V: 3-level Systems
%% X3, Y3, Z3
x3 = [0 1 0 ; 1 0 1 ; 0 1 0]; y3 = [0 -1i 0 ; 1i 0 -1i ; 0 1i 0]; z3 = [1 0 0 ; 0 0 0 ; 0 0 -1];
%% S3+ and S3-
s_3plus = [0 1 0 ; 0 0 1 ; 0 0 0];
s_3minus = [0 0 0 ; 1 0 0 ; 0 1 0];
%% X3^2 and Y3^2
x3_squared = [1 0 1 ; 0 2 0 ; 1 0 1];
y3_squared = [1 0 -1 ; 0 2 0 ; -1 0 1];
%% Gell-Mann Matrices (SU(3))
gm1 = [0 1 0 ; 1 0 0 ; 0 0 0];
gm2 = [0 -1i 0 ; 1i 0 0 ; 0 0 0];
gm3 = [1 0 0 ; 0 -1 0 ; 0 0 0];
gm4 = [0 0 1 ; 0 0 0 ; 1 0 0];
gm5 = [0 0 -1i ; 0 0 0 ; 1i 0 0];
gm6 = [0 0 0 ; 0 0 1 ; 0 1 0];
gm7 = [0 0 0 ; 0 0 -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0];
z4 = [3 0 0 0 ; 0 1 0 0 ; 0 0 -1 0 ; 0 0 0 -3];
LHS = [0 0 0 0 ; sqrt(3) 0 0 0 ; 0 2 0 0 ; 0 0 sqrt(3) 0];
RHS = (x4 - 1i*y4)/2;
isequal(LHS, RHS)
%% Eq. 66
z = [1 0 ; 0 -1];
z1 = kron(z,eye(2));
z2 = kron(eye(2),z);
LHS = (1/4)*(z2 + z1*z2 + z1 + eye(4));
RHS = [1 0 0 0 ; 0 0 0 0 ; 0 0 0 0 ; 0 0 0 0];
isequal(LHS, RHS)
%% Eq. 67
z = [1 0 ; 0 -1];
z1 = kron(z,eye(2));
z2 = kron(eye(2),z);
LHS = [0 0 0 0 ; 0 1 0 0 ; 0 0 0 0 ; 0 0 0 0];
RHS = (1/4)*(eye(4) + z1 - z2 - z1*z2);
isequal(LHS, RHS)
%% Eq. 68
z = [1 0 ; 0 -1];
z1 = kron(z,eye(2));
z2 = kron(eye(2),z);
LHS = [0 0 0 0 ; 0 0 0 0 ; 0 0 1 0 ; 0 0 0 0];
RHS = (1/4)*(eye(4) - z1 + z2 - z1*z2);
isequal(LHS, RHS)
%% Eq. 69
z = [1 0 ; 0 -1];
z1 = kron(z,eye(2));
z2 = kron(eye(2),z);
LHS = [0 0 0 0 ; 0 0 0 0 ; 0 0 0 0 ; 0 0 0 1];
RHS = (1/4)*(eye(4) - z1 - z2 + z1*z2);
isequal(LHS, RHS)
%% Eq. 70
z = [1 0 ; 0 -1];
z1 = kron(z,eye(2));
z2 = kron(eye(2),z);
LHS = (1/2)*(eye(4) - z1 + z1*z2 + z2);
RHS = [1 0 0 0 ; 0 -1 0 0 ; 0 0 1 0 ; 0 0 0 1];
isequal(LHS, RHS)
%% Eq. 71
z = [1 0 ; 0 -1];
z1 = kron(z,eye(2));
z2 = kron(eye(2),z);
LHS = (1/2)*(eye(4) - z2 + z1*z2 + z1);
RHS = [1 0 0 0 ; 0 1 0 0 ; 0 0 -1 0 ; 0 0 0 1];
isequal(LHS, RHS)
%% Eq. 72
zero = [1 ; 0]; one = [0 ; 1];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
x1 = kron(x,eye(2));
y1 = kron(y,eye(2));
x2 = kron(eye(2),x);
y2 = kron(eye(2),y);
LHS = kron(one,zero)*kron(zero,one)';
RHS_1 = [0 0 0 0 ; 0 0 0 0 ; 0 1 0 0 ; 0 0 0 0];
RHS_2 = (1/4)*(x1*x2 - 1i*y1*x2 + 1i*x1*y2 + y1*y2);
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 73
zero = [1 ; 0]; one = [0 ; 1];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
x1 = kron(kron(eye(1),x),eye(2));
y1 = kron(kron(eye(1),y),eye(2));
x2 = kron(kron(eye(2),x),eye(1));
y2 = kron(kron(eye(2),y),eye(1));
LHS = kron(zero,one)*kron(one,zero)';
RHS_1 = [0 0 0 0 ; 0 0 1 0 ; 0 0 0 0 ; 0 0 0 0];
RHS_2 = (1/4)*(x1*x2 - 1i*x1*y2 + 1i*y1*x2 + y1*y2);
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 74
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0]; z = [1 0 ; 0 -1];
x1 = kron(x,eye(2));
y1 = kron(y,eye(2));
z1 = kron(z,eye(2));
x2 = kron(eye(2),x);
y2 = kron(eye(2),y);
z2 = kron(eye(2),z);
LHS = [1 0 0 0 ; 0 1 0 0 ; 0 0 0 1 ; 0 0 1 0];
RHS = (1/2)*(eye(4) + z1 + x2 - z1*x2);
isequal(LHS, RHS)
%% Section X: 5-level systems
%% X5, Y5, Z5
x5 = [0 2 0 0 0 ; 2 0 sqrt(6) 0 0 ; 0 sqrt(6) 0 sqrt(6) 0 ; 0 0 sqrt(6) 0 2 ; 0 0 0 2 0];
y5 = [0 -2i 0 0 0 ; 2i 0 -sqrt(6)*1i 0 0 ; 0 sqrt(6)*1i 0 -sqrt(6)*1i 0 ; 0 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0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
isequal(LHS,RHS)
%% Eq. 82
zero_b = [1 ; 0]; one_b = [0 ; 1];
zero_t = [1 ; 0 ; 0]; one_t = [0 ; 1 ; 0];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
gm1 = [0 1 0 ; 1 0 0 ; 0 0 0]; gm2 = [0 -1i 0 ; 1i 0 0 ; 0 0 0];
LHS = kron(zero_b,one_t)*kron(one_b,zero_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 1 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(x,gm1) + 1i*kron(y,gm1) - 1i*kron(x,gm2) + kron(y,gm2));
isequal(LHS, RHS_1)
isequal(LHS, RHS_2)
%% Eq. 83
zero_b = [1 ; 0]; one_b = [0 ; 1];
zero_t = [1 ; 0 ; 0]; one_t = [0 ; 1 ; 0];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
gm1 = [0 1 0 ; 1 0 0 ; 0 0 0]; gm2 = [0 -1i 0 ; 1i 0 0 ; 0 0 0];
LHS = kron(one_b,zero_t)*kron(zero_b,one_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 1 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(x,gm1) - 1i*kron(y,gm1) + 1i*kron(x,gm2) + kron(y,gm2));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 84
zero_b = [1 ; 0]; one_b = [0 ; 1];
zero_t = [1 ; 0 ; 0]; one_t = [0 ; 1 ; 0];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
gm1 = [0 1 0 ; 1 0 0 ; 0 0 0]; gm2 = [0 -1i 0 ; 1i 0 0 ; 0 0 0];
LHS = kron(zero_b,one_t)*kron(one_b,zero_t)' + kron(one_b,zero_t)*kron(zero_b,one_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 1 0 0 ; 0 0 0 0 0 0 ; 0 1 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/2)*(kron(x,gm1) + kron(y,gm2));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 85
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
gm3 = [1 0 0 ; 0 -1 0 ; 0 0 0]; gm8 = (1/sqrt(3))*[1 0 0 ; 0 1 0 ; 0 0 -2];
zero_b = [1 ; 0]; one_b = [0 ; 1]; one_t = [0 ; 1 ; 0];
LHS = kron(one_b,one_t)*kron(zero_b,one_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 1 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(1i*kron(y,gm3) - kron(x,gm3)) + sqrt(1/48)*(kron(x,gm8) - 1i*kron(y,gm8)) + (1/6)*(kron(x,eye(3)) - 1i*kron(y,eye(3)));
isequal(LHS, RHS_1)
isequal(LHS, round(RHS_2,13,'decimals'))
% LHS = kron(two_t,zero_b)*kron(zero_t,one_b)'; Original Qutrit-Qubit Interaction
%% Eq. 86
zero_b = [1 ; 0]; one_b = [0 ; 1]; one_t = [0 ; 1 ; 0];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
gm4 = [0 0 1 ; 0 0 0 ; 1 0 0]; gm5 = [0 0 -1i ; 0 0 0 ; 1i 0 0];
LHS = kron(one_b,one_t)*kron(zero_b,one_t)' + kron(zero_b,one_t)*kron(one_b,one_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 1 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 1 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/2)*(kron(gm5,y) + kron(gm4,x));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
% LHS = kron(two_t,zero_b)*kron(zero_t,one_b)' + kron(zero_t,one_b)*kron(two_t,zero_b)'; Original Qutrit-Qubit Interaction
%% Eq. 87
one_b = [0 ; 1];one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
z = [1 0 ; 0 -1]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0]; gm7 = [0 0 0 ; 0 0 -1i ; 0 1i 0];
LHS = kron(one_b,one_t)*kron(one_b,two_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(eye(2),gm6) - kron(z,gm6) + 1i*kron(eye(2),gm7) - 1i*kron(z,gm7));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 88
one_b = [0 ; 1]; zero_t = [1 ; 0 ; 0]; two_t = [0 ; 0 ; 1];
z = [1 0 ; 0 -1]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0];
LHS = kron(one_b,zero_t)*kron(one_b,two_t)' + kron(one_b,two_t)*kron(one_b,zero_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 0 0 ; 0 0 0 1 0 0];
RHS_2 = (1/2)*(kron(gm6,eye(2)) - kron(gm6,z));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
% LHS = kron(one_t,one_b)*kron(two_t,one_b)' + kron(two_t,one_b)*kron(one_t,one_b)'; Original Qutrit-Qubit Interaction
%% Eq. 89
z = [1 0 ; 0 -1]; gm1 = [0 1 0 ; 1 0 0 ; 0 0 0]; gm2 = [0 -1i 0 ; 1i 0 0 ; 0 0 0];
zero_b = [1 ; 0]; zero_t = [1 ; 0 ; 0]; one_t = [0 ; 1 ; 0];
LHS = kron(zero_b,one_t)*kron(zero_b,zero_t)';
RHS_1 = [0 0 0 0 0 0 ; 1 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(z,gm1) + kron(eye(2),gm1) - 1i*kron(z,gm2) - 1i*kron(eye(2),gm2));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 90
z = [1 0 ; 0 -1]; gm1 = [0 1 0 ; 1 0 0 ; 0 0 0]; gm2 = [0 -1i 0 ; 1i 0 0 ; 0 0 0];
zero_b = [1 ; 0]; zero_t = [1 ; 0 ; 0]; one_t = [0 ; 1 ; 0];
LHS = kron(zero_b,zero_t)*kron(zero_b,one_t)';
RHS_1 = [0 1 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(z,gm1) + kron(eye(2),gm1) + 1i*kron(z,gm2) + 1i*kron(eye(2),gm2));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 91
z = [1 0 ; 0 -1]; gm1 = [0 1 0 ; 1 0 0 ; 0 0 0];
zero_b = [1 ; 0]; zero_t = [1 ; 0 ; 0]; one_t = [0 ; 1 ; 0];
LHS = kron(zero_b,one_t)*kron(zero_b,zero_t)' + kron(zero_b,zero_t)*kron(zero_b,one_t)';
RHS_1 = [0 1 0 0 0 0 ; 1 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/2)*(kron(z,gm1) + kron(eye(2),gm1));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 92
zero_b = [1 ; 0]; one_b = [0 ; 1];
zero_t = [1 ; 0 ; 0]; two_t = [0 ; 0 ; 1];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
gm4 = [0 0 1 ; 0 0 0 ; 1 0 0]; gm5 = [0 0 -1i ; 0 0 0 ; 1i 0 0];
LHS = kron(zero_b,two_t)*kron(one_b,zero_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 1 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(x,gm4) + 1i*kron(y,gm4) - 1i*kron(x,gm5) + kron(y,gm5));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 93
zero_b = [1 ; 0]; one_b = [0 ; 1];
zero_t = [1 ; 0 ; 0]; two_t = [0 ; 0 ; 1];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0];
gm4 = [0 0 1 ; 0 0 0 ; 1 0 0]; gm5 = [0 0 -1i ; 0 0 0 ; 1i 0 0];
LHS = kron(zero_b,two_t)*kron(one_b,zero_t)' + kron(one_b,zero_t)*kron(zero_b,two_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 1 0 0 ; 0 0 1 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/2)*(kron(x,gm4) + kron(y,gm5));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 94
z = [1 0 ; 0 -1]; gm4 = [0 0 1 ; 0 0 0 ; 1 0 0]; gm5 = [0 0 -1i ; 0 0 0 ; 1i 0 0];
zero_b = [1 ; 0]; zero_t = [1 ; 0 ; 0]; two_t = [0 ; 0 ; 1];
LHS = kron(zero_b,two_t)*kron(zero_b,zero_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 1 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(z,gm4) + kron(eye(2),gm4) - 1i*kron(z,gm5) - 1i*kron(eye(2),gm5));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 95
z = [1 0 ; 0 -1]; gm4 = [0 0 1 ; 0 0 0 ; 1 0 0];
zero_b = [1 ; 0]; zero_t = [1 ; 0 ; 0]; two_t = [0 ; 0 ; 1];
LHS = kron(zero_b,two_t)*kron(zero_b,zero_t)' + kron(zero_b,zero_t)*kron(zero_b,two_t)';
RHS_1 = [0 0 1 0 0 0 ; 0 0 0 0 0 0 ; 1 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/2)*(kron(z,gm4) + kron(eye(2),gm4));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 96
z = [1 0 ; 0 -1]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0]; gm7 = [0 0 0 ; 0 0 -1i ; 0 1i 0];
one_b = [0 ; 1]; one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
LHS = kron(one_b,one_t)*kron(one_b,two_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(eye(2),gm6) - kron(z,gm6) + 1i*kron(eye(2),gm7) - 1i*kron(z,gm7));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 97
z = [1 0 ; 0 -1]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0];
one_b = [0 ; 1]; one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
LHS = kron(one_b,one_t)*kron(one_b,two_t)' + kron(one_b,two_t)*kron(one_b,one_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 1 0];
RHS_2 = (1/2)*(kron(eye(2),gm6) - kron(z,gm6));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 98-99
one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
x = [0 1 ; 1 0]; z = [1 0 ; 0 -1];
gm1 = [0 1 0 ; 1 0 0 ; 0 0 0]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0]; gm8 = (1/sqrt(3))*[1 0 0 ; 0 1 0 ; 0 0 -2];
LHS = kron(kron(one_t,two_t'),x) + kron(kron(two_t,one_t'),x);
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 1 0 ; 0 0 0 1 0 0 ; 0 0 1 0 0 0];
RHS_2 = kron(gm6,x);
RHS_3 = (-1/2)*kron(z,gm1) + (1/2)*kron(eye(2),gm1) - (1/sqrt(3))*kron(x,gm8) + (1/3)*kron(x,eye(3));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
isequal(LHS,round(RHS_3,15,'decimals'))
%% Eq. 100
one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
x = [0 1 ; 1 0]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0]; gm7 = [0 0 0 ; 0 0 -1i ; 0 1i 0];
LHS = kron(x,kron(one_t,two_t'));
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 1 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/2)*kron(x,gm6 + 1i*gm7);
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 101
one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
x = [0 1 ; 1 0]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0];
LHS = kron(x,kron(one_t,two_t')) + kron(x,kron(two_t,one_t'));
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 1 ; 0 0 0 0 1 0 ; 0 0 0 0 0 0 ; 0 0 1 0 0 0 ; 0 1 0 0 0 0];
RHS_2 = kron(x,gm6);
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 102-103
zero_b = [1 ; 0]; one_b = [0 ; 1]; one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
x = [0 1 ; 1 0]; y = [0 -1i ; 1i 0]; z = [1 0 ; 0 -1];
gm6 = [0 0 0 ; 0 0 1 ; 0 1 0]; gm7 = [0 0 0 ; 0 0 -1i ; 0 1i 0];
LHS = kron(zero_b,two_t)*kron(one_b,one_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 1 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(x,gm6) + 1i*kron(y,gm6) - 1i*kron(x,gm7) + kron(y,gm7));
RHS_3 = (1/4)*(kron(gm6,eye(2)) + kron(gm6,z) + 1i*kron(gm7,eye(2)) + 1i*kron(gm7,z));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
isequal(LHS,RHS_3)
% LHS = kron(one_t,zero_b)*kron(two_t,zero_b)'; % Original Qutrit-Qubit Interaction
%% Eq. 104
zero_b = [1 ; 0]; one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
z = [1 0 ; 0 -1]; gm6 = [0 0 0 ; 0 0 1 ; 0 1 0]; gm7 = [0 0 0 ; 0 0 -1i ; 0 1i 0];
LHS = kron(zero_b,one_t)*kron(zero_b,two_t)';
RHS_1 = [0 0 0 0 0 0 ; 0 0 1 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0 ; 0 0 0 0 0 0];
RHS_2 = (1/4)*(kron(eye(2),gm6) + kron(z,gm6) + 1i*kron(eye(2),gm7) + 1i*kron(z,gm7));
isequal(LHS,RHS_1)
isequal(LHS,RHS_2)
%% Eq. 105
zero_b = [1 ; 0]; one_b = [0 ; 1];
zero_t = [1 ; 0 ; 0]; one_t = [0 ; 1 ; 0]; two_t = [0 ; 0 ; 1];
z = [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