|
Maestro 0.3.11
Unified interface for quantum circuit simulation
|
A bounded forecast based on the current physical ranks and logical map. More...
#include <BoundedRoutingPlanner.h>
Classes | |
| struct | PreparedOperations |
Public Types | |
| using | Index = long long |
| using | Map = std::vector<Index> |
| using | Operation = std::shared_ptr<Circuits::IOperation<>> |
| enum class | Policy { Work4 , Work24 } |
| using | SharedOperations = std::shared_ptr<const PreparedOperations> |
Public Member Functions | |
| BoundedRoutingPlanner (size_t n, bool operatorChain, Index cap, const std::vector< Operation > &operations, Policy policy) | |
| BoundedRoutingPlanner (size_t n, bool operatorChain, Index cap, SharedOperations operations, Policy policy) | |
| const SharedOperations & | GetPreparedOperations () const noexcept |
| template<class Bond> | |
| Index | Select (const Map &map, const Bond *bonds, size_t bondCount, size_t operationIndex) |
| Return a physical meeting bond, or -1 to use the native fallback. | |
| template<class Bond> | |
| Index | Select (const Map &map, const std::vector< Bond > &bonds, size_t operationIndex) |
Static Public Member Functions | |
| static SharedOperations | PrepareOperations (size_t n, const std::vector< Operation > &operations) |
Static Public Attributes | |
| static constexpr size_t | kForecastOperationBudget = 4096 |
Friends | |
| struct | BoundedRoutingPlannerTestAccess |
A bounded forecast based on the current physical ranks and logical map.
Construct again when the operation sequence, qubit count, bond cap or policy changes. Compatible instances may share an immutable prepared operation table. Every Select call starts from the supplied live state. No forecast ranks persist across calls. Instances have scratch storage and are not safe for concurrent calls.
Unsupported operations (including channels, measurements and decompositions) terminate a forecast. Select returns -1 for such an operation; the caller must retain its native routing fallback and decomposition guard. Logical SWAPs are assumed to relabel qubits, as in the CPU QCSim wrappers.
Definition at line 45 of file BoundedRoutingPlanner.h.
| using Simulators::Private::BoundedRoutingPlanner::Index = long long |
Definition at line 48 of file BoundedRoutingPlanner.h.
| using Simulators::Private::BoundedRoutingPlanner::Map = std::vector<Index> |
Definition at line 49 of file BoundedRoutingPlanner.h.
| using Simulators::Private::BoundedRoutingPlanner::Operation = std::shared_ptr<Circuits::IOperation<>> |
Definition at line 50 of file BoundedRoutingPlanner.h.
| using Simulators::Private::BoundedRoutingPlanner::SharedOperations = std::shared_ptr<const PreparedOperations> |
Definition at line 79 of file BoundedRoutingPlanner.h.
|
strong |
| Enumerator | |
|---|---|
| Work4 | |
| Work24 | |
Definition at line 51 of file BoundedRoutingPlanner.h.
|
inline |
Definition at line 84 of file BoundedRoutingPlanner.h.
References BoundedRoutingPlanner(), and PrepareOperations().
Referenced by BoundedRoutingPlanner().
|
inline |
Definition at line 89 of file BoundedRoutingPlanner.h.
|
inlinenoexcept |
Definition at line 105 of file BoundedRoutingPlanner.h.
|
inlinestatic |
Definition at line 110 of file BoundedRoutingPlanner.h.
References Circuits::kGate, and Circuits::kSwapGateType.
Referenced by BoundedRoutingPlanner().
|
inline |
Return a physical meeting bond, or -1 to use the native fallback.
Definition at line 175 of file BoundedRoutingPlanner.h.
References Work4.
Referenced by Select().
|
inline |
Definition at line 203 of file BoundedRoutingPlanner.h.
References Select().
|
friend |
Definition at line 230 of file BoundedRoutingPlanner.h.
References BoundedRoutingPlannerTestAccess.
Referenced by BoundedRoutingPlannerTestAccess.
|
staticconstexpr |
Definition at line 82 of file BoundedRoutingPlanner.h.