Commit fe322eeb authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Addresses code review comments



Removed unnecessary include's, namespace, and using.

Signed-off-by: default avatarThien Nguyen <nguyentm@ornl.gov>
parent 2781e522
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
#include "xacc.hpp"
#include <qcor_vqe>

// Compile with:
@@ -17,7 +16,7 @@ int main(int argc, char **argv) {
  auto H = 5.907 - 2.1433 * X(0) * X(1) - 2.1433 * Y(0) * Y(1) + .21829 * Z(0) -
           6.125 * Z(1);
  auto optimizer = createOptimizer("nlopt");
  xacc::OptFunction f(
  OptFunction f(
      [&](const std::vector<double> &x, std::vector<double> &dx) {
        const double angle = x[0];
        auto statePrep =
+0 −2
Original line number Diff line number Diff line
#include <qalloc>
// Compile with: qcor -qpu qpp -qrt ftqc -shots 1024 run-with-shots.cpp

// Define sub-kernel to print out FTQC execution
@@ -12,7 +11,6 @@ __qpu__ void cx_gate(qreg q) {
}

__qpu__ void bell(qreg q) {
  using qcor::xasm;
  h_gate(q);
  cx_gate(q);
  const bool q0Result = Measure(q[0]);