The Quantum Exact Simulation Toolkit v4.0.0
Loading...
Searching...
No Matches
Integration tests

Tests which combine many QuEST API functions to perform computations using relatively large Quregs, validated against known analytic results. More...

Functions

 TEST_CASE ("density evolution", TEST_TAG)
 

Detailed Description

Tests which combine many QuEST API functions to perform computations using relatively large Quregs, validated against known analytic results.

Function Documentation

◆ TEST_CASE()

TEST_CASE ( "density evolution" ,
TEST_TAG  )

Definition at line 232 of file densitymatrix.cpp.

232 {
233
234 auto deployments = getSupportedDeployments();
235
236 // try all combination of statevec and density-matrix deploments
237 for (auto [rhoDeploy, rhoMPI, rhoGPU, rhoOMP] : deployments) {
238 for (auto [psiDeploy, psiMPI, psiGPU, psiOMP] : deployments) {
239
240 // some combinations are illegal
241 if (psiMPI && !rhoMPI)
242 continue;
243
244 // Qureg size determined by slowest deployment
245 int numQubits = 6;
246 if (rhoMPI && rhoMPI) numQubits = 12;
247 if (rhoOMP && rhoOMP) numQubits = 12;
248 if (rhoGPU && psiGPU) numQubits = 14;
249
250 auto label = (
251 "rho = " + rhoDeploy + ", " +
252 "psi = " + psiDeploy + ", " +
253 "qubits = " + std::to_string(numQubits));
254
255 DYNAMIC_SECTION( label ) {
256
257 Qureg psi = createCustomQureg(numQubits, 0, psiMPI,psiGPU,psiOMP);
258 Qureg rho = createCustomQureg(numQubits, 1, rhoMPI,rhoGPU,rhoOMP);
259
260 testDensityMatrixEvolution(psi, rho);
261
262 destroyQureg(psi);
263 destroyQureg(rho);
264 }
265 }
266 }
267}
Qureg createCustomQureg(int numQubits, int isDensMatr, int useDistrib, int useGpuAccel, int useMultithread)
Definition qureg.cpp:273
void destroyQureg(Qureg qureg)
Definition qureg.cpp:330
Definition qureg.h:49