Loading docker/ci/ubuntu1804/master/Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,4 @@ run git clone --recursive https://github.com/eclipse/xacc && cd xacc && mkdir bu && make -j$(nproc) install run cd ../../ && git clone -b master https://github.com/ornl-qci/qcor && cd qcor && mkdir build && cd build \ && cmake .. -DXACC_DIR=~/.xacc -DQCOR_BUILD_TESTS=TRUE \ && make -j$(nproc) install No newline at end of file && make -j$(nproc) install && ctest --output-on-failure No newline at end of file examples/xasm/deuteron_exp_inst.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -10,11 +10,11 @@ int main(int argc, char **argv) { auto q = qalloc(2); // Create the Deuteron Hamiltonian auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the Ansatz exponent Operator auto ansatz_exponent = qcor::getObservable("X0 Y1 - Y0 X1"); auto ansatz_exponent = qcor::createObservable("X0 Y1 - Y0 X1"); // Create an objective function to optimize // Each call evaluates E(theta) = <ansatz(theta) | H | ansatz(theta)> Loading @@ -31,7 +31,7 @@ int main(int argc, char **argv) { 1); // Create a qcor Optimizer auto optimizer = qcor::getOptimizer(); auto optimizer = qcor::createOptimizer("nlopt"); // Optimize the above function auto result = optimizer->optimize(opt_func); Loading examples/xasm/hwe_ansatz_deuteron.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ int main(int argc, char **argv) { qreg q = qalloc(2); // Create the Deuteron Hamiltonian (Observable) auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the ObjectiveFunction, here we want to run VQE Loading @@ -34,7 +34,7 @@ int main(int argc, char **argv) { }, 10); auto optimizer = qcor::getOptimizer(); auto optimizer = qcor::createOptimizer("nlopt"); auto results = optimizer->optimize(f); // Print the result Loading examples/xasm/objective_function.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ int main(int argc, char **argv) { auto q = qalloc(2); // Create the Deuteron Hamiltonian (Observable) auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the ObjectiveFunction, here we want to run VQE Loading examples/xasm/simple-objective-function.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ int main(int argc, char **argv) { auto q = qalloc(2); // Create the Deuteron Hamiltonian (Observable) auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the ObjectiveFunction, here we want to run VQE Loading Loading
docker/ci/ubuntu1804/master/Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -4,4 +4,4 @@ run git clone --recursive https://github.com/eclipse/xacc && cd xacc && mkdir bu && make -j$(nproc) install run cd ../../ && git clone -b master https://github.com/ornl-qci/qcor && cd qcor && mkdir build && cd build \ && cmake .. -DXACC_DIR=~/.xacc -DQCOR_BUILD_TESTS=TRUE \ && make -j$(nproc) install No newline at end of file && make -j$(nproc) install && ctest --output-on-failure No newline at end of file
examples/xasm/deuteron_exp_inst.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -10,11 +10,11 @@ int main(int argc, char **argv) { auto q = qalloc(2); // Create the Deuteron Hamiltonian auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the Ansatz exponent Operator auto ansatz_exponent = qcor::getObservable("X0 Y1 - Y0 X1"); auto ansatz_exponent = qcor::createObservable("X0 Y1 - Y0 X1"); // Create an objective function to optimize // Each call evaluates E(theta) = <ansatz(theta) | H | ansatz(theta)> Loading @@ -31,7 +31,7 @@ int main(int argc, char **argv) { 1); // Create a qcor Optimizer auto optimizer = qcor::getOptimizer(); auto optimizer = qcor::createOptimizer("nlopt"); // Optimize the above function auto result = optimizer->optimize(opt_func); Loading
examples/xasm/hwe_ansatz_deuteron.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ int main(int argc, char **argv) { qreg q = qalloc(2); // Create the Deuteron Hamiltonian (Observable) auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the ObjectiveFunction, here we want to run VQE Loading @@ -34,7 +34,7 @@ int main(int argc, char **argv) { }, 10); auto optimizer = qcor::getOptimizer(); auto optimizer = qcor::createOptimizer("nlopt"); auto results = optimizer->optimize(f); // Print the result Loading
examples/xasm/objective_function.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ int main(int argc, char **argv) { auto q = qalloc(2); // Create the Deuteron Hamiltonian (Observable) auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the ObjectiveFunction, here we want to run VQE Loading
examples/xasm/simple-objective-function.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ int main(int argc, char **argv) { auto q = qalloc(2); // Create the Deuteron Hamiltonian (Observable) auto H = qcor::getObservable( auto H = qcor::createObservable( "5.907 - 2.1433 X0X1 - 2.1433 Y0Y1 + .21829 Z0 - 6.125 Z1"); // Create the ObjectiveFunction, here we want to run VQE Loading