forked from NVIDIA/cuda-quantum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPTSBEOptions.h
More file actions
52 lines (42 loc) · 1.96 KB
/
PTSBEOptions.h
File metadata and controls
52 lines (42 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/****************************************************************-*- C++ -*-****
* Copyright (c) 2026 NVIDIA Corporation & Affiliates. *
* All rights reserved. *
* *
* This source code and the accompanying materials are made available under *
* the terms of the Apache License 2.0 which accompanies this distribution. *
******************************************************************************/
#pragma once
#include "ShotAllocationStrategy.h"
#include <cstddef>
#include <memory>
#include <optional>
namespace cudaq::ptsbe {
// Forward declaration
class PTSSamplingStrategy;
/// @brief Configuration options for PTSBE execution.
///
/// Controls whether PTSBEExecutionData output is produced and which sampling
/// strategy to use.
///
/// The return_execution_data flag controls production of the full
/// PTSBEExecutionData, which bundles circuit instructions, trajectory
/// specifications, and per-trajectory measurement outcomes as a single unit.
///
struct PTSBEOptions {
/// Produce PTSBEExecutionData (instructions + trajectories + measurement
/// counts) in the sample result. Default false to avoid overhead when not
/// needed.
bool return_execution_data = false;
/// Populate per-shot sequential bitstring data on the result. When false
/// (default), only aggregated counts are produced.
bool include_sequential_data = false;
/// Maximum number of unique trajectories to generate. When `nullopt`,
/// defaults to the number of shots.
std::optional<std::size_t> max_trajectories = std::nullopt;
/// Custom sampling strategy. If `nullptr`, uses default strategy.
std::shared_ptr<PTSSamplingStrategy> strategy = nullptr;
/// Strategy for allocating shots across trajectories.
/// Defaults to PROPORTIONAL.
ShotAllocationStrategy shot_allocation{};
};
} // namespace cudaq::ptsbe