Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Sachin Pisal <spisal@nvidia.com>
  • Loading branch information
sacpis committed Dec 19, 2024
1 parent 9b7e5b3 commit 791fb25
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
30 changes: 15 additions & 15 deletions docs/sphinx/targets/cpp/infleqtion.cpp
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
// Compile and run with:
// ```
// nvq++ --target infleqtion infleqtion.cpp -o out.x && ./out.x
// nvq++ --target `infleqtion` `infleqtion`.cpp -o out.x && ./out.x
// ```
// This will submit the job to the Infleqtion's ideal simulator,
// cq_sqale_simulator (default). Alternatively, we can enable hardware noise
// model simulation by specifying `noise-sim` to the flag `--infleqtion-method`,
// This will submit the job to the `Infleqtion's` ideal simulator,
// `cq`_`sqale`_simulator (default). Alternatively, we can enable hardware noise
// model simulation by specifying `noise-sim` to the flag --`infleqtion`-method,
// e.g.,
// ```
// nvq++ --target infleqtion --infleqtion-machine cq_sqale_qpu
// --infleqtion-method noise-sim infleqtion.cpp -o out.x && ./out.x
// nvq++ --target `infleqtion` --`infleqtion`-machine `cq`_`sqale`_qpu
// --`infleqtion`-method noise-sim `infleqtion`.cpp -o out.x && ./out.x
// ```
// where "noise-sim" instructs Superstaq to perform a noisy emulation of the
// where "noise-sim" instructs `Superstaq` to perform a noisy emulation of the
// QPU. An ideal dry-run execution on the QPU may be performed by passing
// `dry-run` to the `--infleqtion-method` flag, e.g.,
// `dry-run` to the --`infleqtion`-method flag, e.g.,
// ```
// nvq++ --target infleqtion --infleqtion-machine cq_sqale_qpu
// --infleqtion-method dry-run infleqtion.cpp -o out.x && ./out.x
// nvq++ --target `infleqtion` --`infleqtion`-machine `cq`_`sqale`_qpu
// --`infleqtion`-method dry-run `infleqtion`.cpp -o out.x && ./out.x
// ```
// Note: If targeting ideal cloud simulation, `--infleqtion-machine
// cq_sqale_simulator` is optional since it is the default configuration if not
// Note: If targeting ideal cloud simulation, --`infleqtion`-machine
// `cq`_`sqale`_simulator is optional since it is the default configuration if not
// provided.

#include <cudaq.h>
#include <fstream>

// Define a simple quantum kernel to execute on Infleqtion backends.
// Define a simple quantum kernel to execute on `infleqtion` backends.
struct ghz {
// Maximally entangled state between 5 qubits.
auto operator()() __qpu__ {
Expand All @@ -38,7 +38,7 @@ struct ghz {
};

int main() {
// Submit to infleqtion asynchronously (e.g., continue executing
// Submit to `infleqtion` asynchronously (e.g., continue executing
// code in the file until the job has been returned).
auto future = cudaq::sample_async(ghz{});
// ... classical code to execute in the meantime ...
Expand All @@ -58,7 +58,7 @@ int main() {
auto async_counts = readIn.get();
async_counts.dump();

// OR: Submit to infleqtion synchronously (e.g., wait for the job
// OR: Submit to `infleqtion` synchronously (e.g., wait for the job
// result to be returned before proceeding).
auto counts = cudaq::sample(ghz{});
counts.dump();
Expand Down
6 changes: 3 additions & 3 deletions runtime/cudaq/algorithms/observe.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ concept ObserveCallValid =
/// @param shots number of shots to run for the given kernel, or -1 if not
/// applicable.
/// @param noise noise model to use for the sample operation
/// @param num_trajectories is the optional number of trajectories to be used when
/// computing the expectation values in the presence of noise. This parameter is
/// only applied to simulation backends that support noisy
/// @param num_trajectories is the optional number of trajectories to be used
/// when computing the expectation values in the presence of noise. This
/// parameter is only applied to simulation backends that support noisy
/// simulation of trajectories.
struct observe_options {
int shots = -1;
Expand Down

0 comments on commit 791fb25

Please sign in to comment.