Skip to content

Commit

Permalink
wrote doc for unit-testing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonRayJones committed Jan 12, 2020
1 parent be87756 commit 750d963
Show file tree
Hide file tree
Showing 5 changed files with 854 additions and 176 deletions.
4 changes: 2 additions & 2 deletions doxyconf
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = . README.md ./QuEST/src ./QuEST/src/CPU ./QuEST/src/GPU ./QuEST/include
INPUT = . README.md ./QuEST/src ./QuEST/src/CPU ./QuEST/src/GPU ./QuEST/include ./testing

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand All @@ -779,7 +779,7 @@ INPUT_ENCODING = UTF-8

EXTENSION_MAPPING = cu=c++ cpp=c++ c=c h=c md=markdown

FILE_PATTERNS = *.cu *.c *.cpp *.h *.md
FILE_PATTERNS = *.cu *.c *.cpp *.h *.hpp *.md

# The RECURSIVE tag can be used to specify whether or not subdirectories should
# be searched for input files as well.
Expand Down
1 change: 1 addition & 0 deletions testing/QuEST_test_calculations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
using Catch::Matchers::Contains;



TEST_CASE( "calcDensityInnerProduct", "[calculations]" ) {

QuESTEnv env = createQuESTEnv();
Expand Down
28 changes: 2 additions & 26 deletions testing/QuEST_test_unitaries.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,6 @@
*
* QuEST's user validation handling is unit tested by redefining exitWithError
* (a weak C symbol) to throw a C++ exception, caught by the Catch2 library.
*
* All unitary unit tests follow the master template:
TEST_CASE( "OP", "[unitaries]" ) {
PREPARE_TEST( env, quregVec, quregMatr, refVec, refMatr, NUM_QUBITS );
SECTION( "state-vector correctness" ) {
}
SECTION( "density-matrix correctness" ) {
}
SECTION( "input validation" ) {
}
CLEANUP_TEST( env, quregVec, quregMatr );
}
CLEANUP_TEST( env, quregVec, quregMatr );
}
*
* @author Tyson Jones
*/
Expand Down Expand Up @@ -1416,7 +1392,7 @@ TEST_CASE( "multiRotatePauli", "[unitaries]" ) {
// produces exp(-i param/2 pauliProd), unless pauliProd = I
QMatrix op;
if (numRefTargs > 0)
op = getExponentialPauliMatrix(param, pauliProd);
op = getExponentialOfPauliMatrix(param, pauliProd);

SECTION( "state-vector" ) {

Expand Down Expand Up @@ -1490,7 +1466,7 @@ TEST_CASE( "multiRotateZ", "[unitaries]" ) {
getFullOperatorMatrix(NULL, 0, targs, numTargs, zProd, NUM_QUBITS);

// exp( -i param/2 Z . I . Z ...)
QMatrix op = getExponentialDiagonalMatrix(expArg);
QMatrix op = getExponentialOfDiagonalMatrix(expArg);

// all qubits to specify full operator matrix on reference structures
int allQubits[NUM_QUBITS];
Expand Down
Loading

0 comments on commit 750d963

Please sign in to comment.