mirror of https://github.com/softwareQinc/qpp.git
Version 0.8.8.2
This commit is contained in:
parent
43d41e9852
commit
d924a20c52
|
@ -1,20 +0,0 @@
|
|||
// Randomness
|
||||
// Source: ./examples/random.cpp
|
||||
#include <qpp.h>
|
||||
|
||||
using namespace qpp;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
int main()
|
||||
{
|
||||
cout << ">> Generating a random ket on D = 5" << endl;
|
||||
ket rket = randket(5);
|
||||
cout << disp(rket) << endl;
|
||||
|
||||
std::vector<double> probs = abssq(rket);
|
||||
cout << ">> Probabilities: " << disp(probs, ", ") << endl;
|
||||
|
||||
cout << ">> Sum of the probabilities: ";
|
||||
cout << sum(probs.begin(), probs.end()) << endl;
|
||||
}
|
|
@ -23,7 +23,7 @@ SET(SOURCE_FILES
|
|||
INCLUDE_DIRECTORIES(SYSTEM "$ENV{HOME}/eigen")
|
||||
|
||||
#### GoogleMock, modify as needed
|
||||
SET(GMOCK "$ENV{HOME}/gmock-1.7.0")
|
||||
SET(GMOCK "$ENV{HOME}/gmock")
|
||||
INCLUDE_DIRECTORIES(../include)
|
||||
INCLUDE_DIRECTORIES(SYSTEM "${GMOCK}/gtest/include")
|
||||
|
||||
|
|
Loading…
Reference in New Issue