The Quantum Exact Simulation Toolkit v4.2.0
Loading...
Searching...
No Matches

Functions for pre- or post-multiplying general two-qubit dense matrices (as CompMatr2) upon density matrices. More...

Functions

void leftapplyCompMatr2 (Qureg qureg, int target1, int target2, CompMatr2 matr)
 
void rightapplyCompMatr2 (Qureg qureg, int target1, int target2, CompMatr2 matrix)
 

Detailed Description

Functions for pre- or post-multiplying general two-qubit dense matrices (as CompMatr2) upon density matrices.

Function Documentation

◆ leftapplyCompMatr2()

void leftapplyCompMatr2 ( Qureg qureg,
int target1,
int target2,
CompMatr2 matr )
Note
Documentation for this function or struct is under construction!
See also

Definition at line 64 of file multiplication.cpp.

64 {
65 validate_quregFields(qureg, __func__);
66 validate_twoTargets(qureg, target1, target2, __func__);
67 validate_matrixFields(matrix, __func__);
68 validate_mixedAmpsFitInNode(qureg, 2, __func__);
69
70 bool conj = false;
71 bool transp = false;
72 localiser_statevec_anyCtrlTwoTargDenseMatr(qureg, {}, {}, target1, target2, matrix, conj, transp);
73}

◆ rightapplyCompMatr2()

void rightapplyCompMatr2 ( Qureg qureg,
int target1,
int target2,
CompMatr2 matrix )
Note
Documentation for this function or struct is under construction!
See also

Definition at line 75 of file multiplication.cpp.

75 {
76 validate_quregFields(qureg, __func__);
77 validate_quregIsDensityMatrix(qureg, __func__);
78 validate_twoTargets(qureg, target1, target2, __func__);
79 validate_matrixFields(matrix, __func__);
80 validate_mixedAmpsFitInNode(qureg, 2, __func__);
81
82 // rho matrix ~ transpose(rho) (x) I ||rho>>
83 bool conj = false;
84 bool transp = true;
85 int qubit1 = util_getBraQubit(target1, qureg);
86 int qubit2 = util_getBraQubit(target2, qureg);
87 localiser_statevec_anyCtrlTwoTargDenseMatr(qureg, {}, {}, qubit1, qubit2, matrix, conj, transp);
88}