The Quantum Exact Simulation Toolkit v4.2.0
Loading...
Searching...
No Matches
multiplication.h
1/** @file
2 * API signatures for directly pre- and post-multiplying
3 * operators upon density matrices, likely constituting
4 * non-physical operations which break state normalisation.
5 *
6 * @author Tyson Jones
7 *
8 * @defgroup multiplication Multiplication
9 * @ingroup api
10 * @brief Functions for directly pre- or post-multiplying operators
11 * upon density matrices.
12 * @{
13 */
14
15#ifndef MULTIPLICATION_H
16#define MULTIPLICATION_H
17
18#include "quest/include/qureg.h"
19#include "quest/include/paulis.h"
20#include "quest/include/matrices.h"
21#include "quest/include/channels.h"
22
23#ifdef __cplusplus
24 #include <vector>
25#endif
26
27
28/*
29 * unlike some other headers, we here intermix the C and C++-only
30 * signatures, grouping them semantically & by their doc groups
31 */
32
33
34
35/**
36 * @defgroup mult_compmatr1 CompMatr1
37 * @brief Functions for pre- or post-multiplying general one-qubit dense matrices
38 * (as CompMatr1) upon density matrices.
39 * @{
40 */
41
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47
48/** Multiplies a general one-qubit dense @p matrix upon the specified @p target
49 * qubit of @p qureg.
50 *
51 * @formulae
52 * Let @f$ \hat{M} = @f$ @p matrix and @f$ t = @f$ @p target, and notate
53 * @f$\hat{M}_t@f$ as per applyCompMatr1(). Unlike applyCompMatr1() however,
54 * this function only ever left-multiplies @p matrix upon @p qureg, regardless
55 * of whether it is a statevector or density matrix.
56 *
57 * Explicitly,
58 * - When @p qureg is a statevector @f$ \svpsi @f$, this function effects
59 * @f[
60 \svpsi \rightarrow \hat{M}_t \, \svpsi.
61 * @f]
62 * - When @p qureg is a density matrix @f$\dmrho@f$, this function effects
63 * @f[
64 \dmrho \rightarrow \hat{M}_t \, \dmrho.
65 * @f]
66 *
67 * There are no additional constraints like unitarity.
68 *
69 * @myexample
70 * ```
71 Qureg qureg = createDensityQureg(5);
72
73 CompMatr1 matrix = getInlineCompMatr1({
74 {0.1, 0.2},
75 {0.3i, 0.4i}
76 });
77
78 leftapplyCompMatr1(qureg, 2, matrix);
79 * ```
80 *
81 * @param[in,out] qureg the state to modify.
82 * @param[in] target the index of the target qubit.
83 * @param[in] matrix the Z-basis matrix to multiply upon the left.
84 * @throws @validationerror
85 * - if @p qureg or @p matrix are uninitialised.
86 * - if @p target is an invalid qubit index.
87 * @see
88 * - getCompMatr1()
89 * - getInlineCompMatr1()
90 * - applyCompMatr1()
91 * - rightapplyCompMatr1()
92 * - applyQubitProjector()
93 * - leftapplyCompMatr()
94 * @author Tyson Jones
95 */
96void leftapplyCompMatr1(Qureg qureg, int target, CompMatr1 matrix);
97
98
99/** Multiplies a general one-qubit dense @p matrix upon the specified @p target
100 * qubit of the density matrix @p qureg, from the right-hand side.
101 *
102 * @formulae
103 * Let @f$ \dmrho = @f$ @p qureg, @f$ \hat{M} = @f$ @p matrix and @f$ t = @f$ @p target,
104 * and notate @f$\hat{M}_t@f$ as per applyCompMatr1(). Unlike applyCompMatr1() however,
105 * this function only ever right-multiplies @p matrix upon @p qureg.
106 *
107 * Explicitly
108 * @f[
109 \dmrho \rightarrow \dmrho \, \hat{M}_t
110 * @f]
111 * where @f$ \hat{M} @f$ is not conjugated nor transposed, and there are no additional
112 * constraints like unitarity.
113 *
114 * In general, this function will break the normalisation of @p qureg and result in a
115 * non-physical state, and is useful for preparing sub-expressions of formulae like
116 * the Linbladian.
117 *
118 * @myexample
119 * ```
120 Qureg qureg = createDensityQureg(5);
121
122 CompMatr1 matrix = getInlineCompMatr1({
123 {0.1, 0.2},
124 {0.3i, 0.4i}
125 });
126
127 rightapplyCompMatr1(qureg, 2, matrix);
128 * ```
129 *
130 * @param[in,out] qureg the state to modify.
131 * @param[in] target the index of the target qubit.
132 * @param[in] matrix the Z-basis matrix to post-multiply.
133 * @throws @validationerror
134 * - if @p qureg or @p matrix are uninitialised.
135 * - if @p qureg is not a density matrix.
136 * - if @p target is an invalid qubit index.
137 * @see
138 * - getCompMatr1()
139 * - getInlineCompMatr1()
140 * - applyCompMatr1()
141 * - leftapplyCompMatr1()
142 * - leftapplyCompMatr()
143 * @author Tyson Jones
144 */
145void rightapplyCompMatr1(Qureg qureg, int target, CompMatr1 matrix);
146
147
148// end de-mangler
149#ifdef __cplusplus
150}
151#endif
152
153/** @} */
154
155
156
157/**
158 * @defgroup mult_compmatr2 CompMatr2
159 * @brief Functions for pre- or post-multiplying general two-qubit dense matrices
160 * (as CompMatr2) upon density matrices.
161 * @{
162 */
163
164
165#ifdef __cplusplus
166extern "C" {
167#endif
168
169
170/// @notyetdoced
171/// @see
172/// - applyCompMatr2()
173/// - leftapplyCompMatr1()
174void leftapplyCompMatr2(Qureg qureg, int target1, int target2, CompMatr2 matr);
175
176
177/// @notyetdoced
178/// @see
179/// - rightapplyCompMatr1()
180void rightapplyCompMatr2(Qureg qureg, int target1, int target2, CompMatr2 matrix);
181
182
183// end de-mangler
184#ifdef __cplusplus
185}
186#endif
187
188/** @} */
189
190
191
192
193/**
194 * @defgroup mult_compmatr CompMatr
195 * @brief Functions for pre- or post-multiplying general many-target dense matrices
196 * (as CompMatr) upon density matrices.
197 * @{
198 */
199
200
201#ifdef __cplusplus
202extern "C" {
203#endif
204
205
206/** @notyetdoced
207 *
208 * @see
209 * - applyCompMatr()
210 * - leftapplyCompMatr1()
211 */
212void leftapplyCompMatr(Qureg qureg, int* targets, int numTargets, CompMatr matrix);
213
214
215/// @notyetdoced
216/// @see
217/// - rightapplyCompMatr1()
218void rightapplyCompMatr(Qureg qureg, int* targets, int numTargets, CompMatr matrix);
219
220
221// end de-mangler
222#ifdef __cplusplus
223}
224#endif
225
226#ifdef __cplusplus
227
228
229/// @notyettested
230/// @notyetvalidated
231/// @notyetdoced
232/// @cppvectoroverload
233/// @see leftapplyCompMatr()
234void leftapplyCompMatr(Qureg qureg, std::vector<int> targets, CompMatr matr);
235
236
237/// @notyettested
238/// @notyetvalidated
239/// @notyetdoced
240/// @cppvectoroverload
241/// @see rightapplyCompMatr()
242void rightapplyCompMatr(Qureg qureg, std::vector<int> targets, CompMatr matr);
243
244
245#endif
246
247/** @} */
248
249
250
251/**
252 * @defgroup mult_diagmatr1 DiagMatr1
253 * @brief Functions for pre- or post-multiplying general single-qubit diagonal
254 * matrices (as DiagMatr1) upon density matrices.
255 * @{
256 */
257
258
259#ifdef __cplusplus
260extern "C" {
261#endif
262
263
264/// @notyetdoced
265/// @see leftapplyCompMatr1()
266void leftapplyDiagMatr1(Qureg qureg, int target, DiagMatr1 matr);
267
268
269/// @notyetdoced
270/// @see rightapplyCompMatr1()
271void rightapplyDiagMatr1(Qureg qureg, int target, DiagMatr1 matrix);
272
273
274// end de-mangler
275#ifdef __cplusplus
276}
277#endif
278
279/** @} */
280
281
282
283/**
284 * @defgroup mult_diagmatr2 DiagMatr2
285 * @brief Functions for pre- or post-multiplying general two-qubit diagonal
286 * matrices (as DiagMatr2) upon density matrices.
287 * @{
288 */
289
290
291#ifdef __cplusplus
292extern "C" {
293#endif
294
295
296/// @notyetdoced
297/// @see leftapplyCompMatr1()
298void leftapplyDiagMatr2(Qureg qureg, int target1, int target2, DiagMatr2 matr);
299
300
301/// @notyetdoced
302/// @see rightapplyCompMatr1()
303void rightapplyDiagMatr2(Qureg qureg, int target1, int target2, DiagMatr2 matrix);
304
305
306// end de-mangler
307#ifdef __cplusplus
308}
309#endif
310
311/** @} */
312
313
314
315/**
316 * @defgroup mult_diagmatr DiagMatr
317 * @brief Functions for pre- or post-multiplying general any-target diagonal
318 * matrices (as DiagMatr), or powers thereof, upon density matrices.
319 * @{
320 */
321
322
323#ifdef __cplusplus
324extern "C" {
325#endif
326
327
328/// @notyetdoced
329/// @see leftapplyCompMatr1()
330void leftapplyDiagMatr(Qureg qureg, int* targets, int numTargets, DiagMatr matrix);
331
332
333/// @notyetdoced
334/// @see rightapplyCompMatr1()
335void rightapplyDiagMatr(Qureg qureg, int* targets, int numTargets, DiagMatr matrix);
336
337
338/// @notyetdoced
339/// @see
340/// - leftapplyCompMatr1()
341/// - applyDiagMatrPower()
342void leftapplyDiagMatrPower(Qureg qureg, int* targets, int numTargets, DiagMatr matrix, qcomp exponent);
343
344
345/// @notyetdoced
346/// @see
347/// - rightapplyCompMatr1()
348/// - applyDiagMatrPower()
349void rightapplyDiagMatrPower(Qureg qureg, int* targets, int numTargets, DiagMatr matrix, qcomp exponent);
350
351
352// end de-mangler
353#ifdef __cplusplus
354}
355#endif
356
357#ifdef __cplusplus
358
359
360/// @notyettested
361/// @notyetvalidated
362/// @notyetdoced
363/// @cppvectoroverload
364/// @see leftapplyDiagMatr()
365void leftapplyDiagMatr(Qureg qureg, std::vector<int> targets, DiagMatr matrix);
366
367
368/// @notyettested
369/// @notyetvalidated
370/// @notyetdoced
371/// @cppvectoroverload
372/// @see rightapplyDiagMatr()
373void rightapplyDiagMatr(Qureg qureg, std::vector<int> targets, DiagMatr matrix);
374
375
376/// @notyettested
377/// @notyetvalidated
378/// @notyetdoced
379/// @cppvectoroverload
380/// @see leftapplyDiagMatrPower()
381void leftapplyDiagMatrPower(Qureg qureg, std::vector<int> targets, DiagMatr matrix, qcomp exponent);
382
383
384/// @notyettested
385/// @notyetvalidated
386/// @notyetdoced
387/// @cppvectoroverload
388/// @see rightapplyDiagMatrPower()
389void rightapplyDiagMatrPower(Qureg qureg, std::vector<int> targets, DiagMatr matrix, qcomp exponent);
390
391
392#endif
393
394/** @} */
395
396
397
398/**
399 * @defgroup mult_fullstatediagmatr FullStateDiagMatr
400 * @brief Functions for pre- or post-multiplying general full-state diagonal
401 * matrices (FullStateDiagMatr), or powers thereof, upon density matrices.
402 * @{
403 */
404
405
406#ifdef __cplusplus
407extern "C" {
408#endif
409
410
411/// @notyetdoced
412/// @notyetvalidated
413/// @see
414/// - leftapplyCompMatr1()
416
417
418/// @notyetdoced
419/// @notyetvalidated
420/// @see
421/// - rightapplyCompMatr1()
422/// - applyFullStateDiagMatr()
424
425
426/// @notyetdoced
427/// @notyetvalidated
428/// @see
429/// - leftapplyCompMatr1()
430/// - applyFullStateDiagMatr()
431void leftapplyFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matrix, qcomp exponent);
432
433
434/// @notyetdoced
435/// @notyetvalidated
436/// @see
437/// - rightapplyCompMatr1()
438/// - applyFullStateDiagMatr()
439void rightapplyFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matrix, qcomp exponent);
440
441
442// end de-mangler
443#ifdef __cplusplus
444}
445#endif
446
447/** @} */
448
449
450
451/**
452 * @defgroup multi_swap Swap
453 * @brief Functions for pre- or post-multiplying the two-qubit SWAP
454 * gate upon density matrices
455 * @{
456 */
457
458
459#ifdef __cplusplus
460extern "C" {
461#endif
462
463
464/// @notyetdoced
465/// @see
466/// - leftapplyCompMatr1()
467/// - applySwap()
468void leftapplySwap(Qureg qureg, int qubit1, int qubit2);
469
470
471/// @notyetdoced
472/// @see
473/// - leftapplyCompMatr1()
474/// - applySwap()
475void rightapplySwap(Qureg qureg, int qubit1, int qubit2);
476
477
478// end de-mangler
479#ifdef __cplusplus
480}
481#endif
482
483/** @} */
484
485
486
487/**
488 * @defgroup mult_pauli Pauli
489 * @brief Functions for pre- or post-multiplying the individual one-qubit
490 * Pauli operators upon density matrices.
491 * @{
492 */
493
494
495#ifdef __cplusplus
496extern "C" {
497#endif
498
499
500/// @notyetdoced
501/// @see
502/// - leftapplyCompMatr1()
503/// - applyPauliX()
504void leftapplyPauliX(Qureg qureg, int target);
505
506
507/// @notyetdoced
508/// @see
509/// - leftapplyCompMatr1()
510/// - applyPauliY()
511void leftapplyPauliY(Qureg qureg, int target);
512
513
514/// @notyetdoced
515/// @see
516/// - leftapplyCompMatr1()
517/// - applyPauliZ()
518void leftapplyPauliZ(Qureg qureg, int target);
519
520
521/// @notyetdoced
522/// @see
523/// - rightapplyCompMatr1()
524/// - applyPauliX()
525void rightapplyPauliX(Qureg qureg, int target);
526
527
528/// @notyetdoced
529/// @see
530/// - rightapplyCompMatr1()
531/// - applyPauliY()
532void rightapplyPauliY(Qureg qureg, int target);
533
534
535/// @notyetdoced
536/// @see
537/// - rightapplyCompMatr1()
538/// - applyPauliZ()
539void rightapplyPauliZ(Qureg qureg, int target);
540
541
542// end de-mangler
543#ifdef __cplusplus
544}
545#endif
546
547/** @} */
548
549
550
551/**
552 * @defgroup mult_paulistr PauliStr
553 * @brief Functions for pre- or post-multiplying a tensor product of
554 * Pauli operators (as a PauliStr) upon density matrices.
555 * @{
556 */
557
558
559#ifdef __cplusplus
560extern "C" {
561#endif
562
563
564/// @notyetdoced
565/// @see
566/// - leftapplyCompMatr1()
567/// - applyPauliStr()
568void leftapplyPauliStr(Qureg qureg, PauliStr str);
569
570
571/// @notyetdoced
572/// @see
573/// - rightapplyCompMatr1()
574/// - applyPauliStr()
575void rightapplyPauliStr(Qureg qureg, PauliStr str);
576
577
578// end de-mangler
579#ifdef __cplusplus
580}
581#endif
582
583/** @} */
584
585
586
587/**
588 * @defgroup mult_pauligadget Pauli gadgets
589 * @brief Functions for pre- or post-multiplying many-qubit rotations around
590 * arbitrary PauliStr upon density matrices.
591 * @{
592 */
593
594
595#ifdef __cplusplus
596extern "C" {
597#endif
598
599
600/// @notyetdoced
601/// @see
602/// - leftapplyCompMatr1()
603/// - applyPauliGadget()
604void leftapplyPauliGadget(Qureg qureg, PauliStr str, qreal angle);
605
606
607/// @notyetdoced
608/// @see
609/// - rightapplyCompMatr1()
610/// - applyPauliGadget()
611void rightapplyPauliGadget(Qureg qureg, PauliStr str, qreal angle);
612
613
614// end de-mangler
615#ifdef __cplusplus
616}
617#endif
618
619/** @} */
620
621
622
623/**
624 * @defgroup mult_phasegadget Phase gates
625 * @brief Functions for pre- or post-multiplying many-qubit rotations around
626 * the Pauli Z axis upon density matrices.
627 * @{
628 */
629
630
631#ifdef __cplusplus
632extern "C" {
633#endif
634
635
636/// @notyetdoced
637/// @see
638/// - leftapplyCompMatr1()
639/// - applyPhaseGadget()
640void leftapplyPhaseGadget(Qureg qureg, int* targets, int numTargets, qreal angle);
641
642
643/// @notyetdoced
644/// @see
645/// - rightapplyCompMatr1()
646/// - applyPhaseGadget()
647void rightapplyPhaseGadget(Qureg qureg, int* targets, int numTargets, qreal angle);
648
649
650// end de-mangler
651#ifdef __cplusplus
652}
653#endif
654
655#ifdef __cplusplus
656
657
658/// @notyettested
659/// @notyetvalidated
660/// @notyetdoced
661/// @cppvectoroverload
662/// @see leftapplyPhaseGadget()
663void leftapplyPhaseGadget(Qureg qureg, std::vector<int> targets, qreal angle);
664
665
666/// @notyettested
667/// @notyetvalidated
668/// @notyetdoced
669/// @cppvectoroverload
670/// @see rightapplyPhaseGadget()
671void rightapplyPhaseGadget(Qureg qureg, std::vector<int> targets, qreal angle);
672
673
674#endif
675
676/** @} */
677
678
679
680/**
681 * @defgroup mult_nots Many-not gates
682 * @brief Functions for pre- or post-multiplying many-qubit NOT gates
683 * upon density matrices.
684 * @{
685 */
686
687
688#ifdef __cplusplus
689extern "C" {
690#endif
691
692
693/// @notyetdoced
694/// @see
695/// - leftapplyCompMatr1()
696/// - applyMultiQubitNot()
697void leftapplyMultiQubitNot(Qureg qureg, int* targets, int numTargets);
698
699
700/// @notyetdoced
701/// @notyetvalidated
702/// @see
703/// - rightapplyCompMatr1()
704/// - applyMultiQubitNot()
705void rightapplyMultiQubitNot(Qureg qureg, int* targets, int numTargets);
706
707
708// end de-mangler
709#ifdef __cplusplus
710}
711#endif
712
713#ifdef __cplusplus
714
715
716/// @notyetvalidated
717/// @notyetdoced
718/// @cppvectoroverload
719/// @see leftapplyMultiQubitNot()
720void leftapplyMultiQubitNot(Qureg qureg, std::vector<int> targets);
721
722
723/// @notyetvalidated
724/// @notyetdoced
725/// @cppvectoroverload
726/// @see rightapplyMultiQubitNot()
727void rightapplyMultiQubitNot(Qureg qureg, std::vector<int> targets);
728
729
730#endif
731
732/** @} */
733
734
735
736/**
737 * @defgroup mult_projectors Projectors
738 * @brief Functions for pre- or post-multiplying projectors upon density matrices.
739 * @{
740 */
741
742
743#ifdef __cplusplus
744extern "C" {
745#endif
746
747
748/// @notyetdoced
749/// @notyetvalidated
750/// @see
751/// - leftapplyCompMatr1()
752/// - applyQubitProjector()
753void leftapplyQubitProjector(Qureg qureg, int qubit, int outcome);
754
755
756/// @notyetdoced
757/// @notyetvalidated
758/// @see
759/// - leftapplyCompMatr1()
760/// - applyMultiQubitProjector()
761void leftapplyMultiQubitProjector(Qureg qureg, int* qubits, int* outcomes, int numQubits);
762
763
764/// @notyetdoced
765/// @notyetvalidated
766/// @see
767/// - rightapplyCompMatr1()
768/// - applyQubitProjector()
769void rightapplyQubitProjector(Qureg qureg, int qubit, int outcome);
770
771
772/// @notyetdoced
773/// @notyetvalidated
774/// @see
775/// - rightapplyCompMatr1()
776/// - applyMultiQubitProjector()
777void rightapplyMultiQubitProjector(Qureg qureg, int* qubits, int* outcomes, int numQubits);
778
779
780// end de-mangler
781#ifdef __cplusplus
782}
783#endif
784
785
786
787/**
788 * @defgroup mult_paulistrsum PauliStrSum
789 * @brief Functions for pre- or post-multiplying weighted sums of Pauli
790 * tensors upon a density matrix.
791 * @{
792 */
793
794
795#ifdef __cplusplus
796extern "C" {
797#endif
798
799
800/// @notyetdoced
801/// @notyetvalidated
802/// @see leftapplyCompMatr1()
803void leftapplyPauliStrSum(Qureg qureg, PauliStrSum sum, Qureg workspace);
804
805
806/// @notyetdoced
807/// @notyetvalidated
808/// @see leftapplyCompMatr1()
809void rightapplyPauliStrSum(Qureg qureg, PauliStrSum sum, Qureg workspace);
810
811
812// end de-mangler
813#ifdef __cplusplus
814}
815#endif
816
817/** @} */
818
819
820
821#endif // MULTIPLICATION_H
822
823/** @} */ // (end file-wide doxygen defgroup)
void rightapplyCompMatr1(Qureg qureg, int target, CompMatr1 matrix)
void leftapplyCompMatr1(Qureg qureg, int target, CompMatr1 matrix)
void rightapplyCompMatr2(Qureg qureg, int target1, int target2, CompMatr2 matrix)
void leftapplyCompMatr2(Qureg qureg, int target1, int target2, CompMatr2 matr)
void leftapplyCompMatr(Qureg qureg, int *targets, int numTargets, CompMatr matrix)
void rightapplyCompMatr(Qureg qureg, int *targets, int numTargets, CompMatr matrix)
void leftapplyDiagMatr1(Qureg qureg, int target, DiagMatr1 matr)
void rightapplyDiagMatr1(Qureg qureg, int target, DiagMatr1 matrix)
void leftapplyDiagMatr2(Qureg qureg, int target1, int target2, DiagMatr2 matr)
void rightapplyDiagMatr2(Qureg qureg, int target1, int target2, DiagMatr2 matrix)
void rightapplyDiagMatr(Qureg qureg, int *targets, int numTargets, DiagMatr matrix)
void leftapplyDiagMatrPower(Qureg qureg, int *targets, int numTargets, DiagMatr matrix, qcomp exponent)
void rightapplyDiagMatrPower(Qureg qureg, int *targets, int numTargets, DiagMatr matrix, qcomp exponent)
void leftapplyDiagMatr(Qureg qureg, int *targets, int numTargets, DiagMatr matrix)
void rightapplyFullStateDiagMatr(Qureg qureg, FullStateDiagMatr matrix)
void leftapplyFullStateDiagMatr(Qureg qureg, FullStateDiagMatr matrix)
void rightapplyFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matrix, qcomp exponent)
void leftapplyFullStateDiagMatrPower(Qureg qureg, FullStateDiagMatr matrix, qcomp exponent)
void leftapplyMultiQubitNot(Qureg qureg, int *targets, int numTargets)
void rightapplyMultiQubitNot(Qureg qureg, int *targets, int numTargets)
void leftapplyPauliX(Qureg qureg, int target)
void rightapplyPauliY(Qureg qureg, int target)
void leftapplyPauliY(Qureg qureg, int target)
void leftapplyPauliZ(Qureg qureg, int target)
void rightapplyPauliX(Qureg qureg, int target)
void rightapplyPauliZ(Qureg qureg, int target)
void leftapplyPauliGadget(Qureg qureg, PauliStr str, qreal angle)
void rightapplyPauliGadget(Qureg qureg, PauliStr str, qreal angle)
void rightapplyPauliStr(Qureg qureg, PauliStr str)
void leftapplyPauliStr(Qureg qureg, PauliStr str)
void rightapplyPauliStrSum(Qureg qureg, PauliStrSum sum, Qureg workspace)
void leftapplyPauliStrSum(Qureg qureg, PauliStrSum sum, Qureg workspace)
void rightapplyPhaseGadget(Qureg qureg, int *targets, int numTargets, qreal angle)
void leftapplyPhaseGadget(Qureg qureg, int *targets, int numTargets, qreal angle)
void leftapplyMultiQubitProjector(Qureg qureg, int *qubits, int *outcomes, int numQubits)
void rightapplyQubitProjector(Qureg qureg, int qubit, int outcome)
void rightapplyMultiQubitProjector(Qureg qureg, int *qubits, int *outcomes, int numQubits)
void leftapplyQubitProjector(Qureg qureg, int qubit, int outcome)
void leftapplySwap(Qureg qureg, int qubit1, int qubit2)
void rightapplySwap(Qureg qureg, int qubit1, int qubit2)
Definition qureg.h:49