Skip to content

Commit 727a9fb

Browse files
committed
full cleanup
Signed-off-by: Kevin Mato <[email protected]>
1 parent c10743b commit 727a9fb

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

runtime/nvqir/NVQIR.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,9 @@ extern "C" void __quantum__qis__save_state() {
852852

853853
std::unique_ptr<cudaq::SimulationState> state =
854854
nvqir::getCircuitSimulatorInternal()->getCurrentSimulationState();
855-
856-
CUDAQ_INFO("NVQIR::simulator name : {}", nvqir::getCircuitSimulatorInternal()->name().c_str());
855+
856+
CUDAQ_INFO("NVQIR::simulator name : {}",
857+
nvqir::getCircuitSimulatorInternal()->name().c_str());
857858

858859
ctx->save_state(state.get());
859860
}

runtime/nvqir/stim/StimCircuitSimulator.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ class StimCircuitSimulator : public nvqir::CircuitSimulatorBase<double> {
251251
for (int shot = 0; shot < batch_size; shot++) {
252252
for (std::size_t q = 0; q < num_qubits; q++) {
253253
CUDAQ_INFO("q {}: x = {}, z = {}", q,
254-
static_cast<int>(sampleSim->x_table[q][shot]),
255-
static_cast<int>(sampleSim->z_table[q][shot]));
254+
static_cast<int>(sampleSim->x_table[q][shot]),
255+
static_cast<int>(sampleSim->z_table[q][shot]));
256256

257257
x_output[q + shot * num_qubits] = sampleSim->x_table[q][shot] ? 1 : 0;
258258
z_output[q + shot * num_qubits] = sampleSim->z_table[q][shot] ? 1 : 0;
@@ -591,8 +591,10 @@ class StimCircuitSimulator : public nvqir::CircuitSimulatorBase<double> {
591591

592592
error_log_vec_index++;
593593
} else if (is_replay_errors_mode) {
594-
CUDAQ_INFO("In replay mode: Noise application index: {}", noise_application_index);
595-
CUDAQ_INFO("Replaying errors for noise operation ID {}", error_log_vec_index);
594+
CUDAQ_INFO("In replay mode: Noise application index: {}",
595+
noise_application_index);
596+
CUDAQ_INFO("Replaying errors for noise operation ID {}",
597+
error_log_vec_index);
596598

597599
if (sampleSim->num_qubits < max_qubit + 1)
598600
applyOpToSims("R", std::vector<std::uint32_t>{max_qubit});
@@ -633,7 +635,8 @@ class StimCircuitSimulator : public nvqir::CircuitSimulatorBase<double> {
633635

634636
// Get the number of shots to replay
635637
size_t num_shots = x_errors_per_shot.size();
636-
CUDAQ_INFO("Replaying {} shots for error ID {}", num_shots, error_log_vec_index);
638+
CUDAQ_INFO("Replaying {} shots for error ID {}", num_shots,
639+
error_log_vec_index);
637640

638641
if (last_column_touched + num_shots > getBatchSize()) {
639642
throw std::runtime_error(fmt::format(

unittests/integration/test.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2022 - 2025 NVIDIA Corporation & Affiliates. *
3+
* All rights reserved. *
4+
* *
5+
* This source code and the accompanying materials are made available under *
6+
* the terms of the Apache License 2.0 which accompanies this distribution. *
7+
******************************************************************************/
18
#include <cudaq.h>
29

310
/*

0 commit comments

Comments
 (0)