Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
Add const keyword to time variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tyi1025 committed Jun 8, 2023
1 parent a397089 commit 9f66121
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/AlternatingVerificationExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "executors/AlternatingVerificationExecutor.hpp"

json AlternatingVerificationExecutor::execute(const VerificationTask& task) {
json result;
auto start = std::chrono::steady_clock::now();
json result;
auto const start = std::chrono::steady_clock::now();

auto qc1 = task.getQc1()->clone();
auto qc2 = task.getQc2()->clone();
Expand All @@ -15,8 +15,8 @@ json AlternatingVerificationExecutor::execute(const VerificationTask& task) {
equivalenceCheckingManager->run();
result["check_results"] = equivalenceCheckingManager->getResults().json();
// Add memory usage
auto stop = std::chrono::steady_clock::now();
auto runtime =
auto const stop = std::chrono::steady_clock::now();
auto const runtime =
std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
result["runtime"] = runtime.count();

Expand Down
6 changes: 3 additions & 3 deletions src/CircuitSimulatorExecutor.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#include "executors/CircuitSimulatorExecutor.hpp"

json CircuitSimulatorExecutor::execute(const SimulationTask& task) {
json result;
auto start = std::chrono::steady_clock::now();
json result;
auto const start = std::chrono::steady_clock::now();

auto qc = std::make_unique<qc::QuantumComputation>(task.getQc()->clone());
auto circuitSimulator = std::make_unique<CircuitSimulator<>>(std::move(qc));

result["measurement_results"] = circuitSimulator->simulate(1024U);
// Add memory usage

auto stop = std::chrono::steady_clock::now();
auto const stop = std::chrono::steady_clock::now();
auto const runtime =
std::chrono::duration_cast<std::chrono::microseconds>(stop - start);
result["runtime"] = runtime.count();
Expand Down

0 comments on commit 9f66121

Please sign in to comment.