|
Maestro 0.3.11
Unified interface for quantum circuit simulation
|
#include <TensorChainRouting.h>
Classes | |
| class | DecompositionScope |
Public Member Functions | |
| size_t | GetCurrentMaxBondDimension () const override |
| double | getGrowthFactorGate () const override |
| double | getGrowthFactorSwap () const override |
| bool | IsRoutingLookaheadEnabled () const override |
| void | setGrowthFactorGate (double factor) override |
| void | setGrowthFactorSwap (double factor) override |
| void | SetLookaheadDepth (int depth) override |
| void | SetLookaheadDepthWithHeuristic (int depth) override |
| bool | SwapGatesRelabelQubits () const override |
Protected Member Functions | |
| TensorChainRouting (bool isOperatorChain, bool relabelSwaps=false) | |
| std::vector< double > | CaptureDummyHistory () const |
| void | ClearDummySimulator () |
| void | ConfigureDummy () |
| virtual std::vector< double > | CurrentBondDimensions () const =0 |
| virtual std::vector< long long > | CurrentRoutingMap () const =0 |
| MPSDummySimulator::IndexType | EffectiveLookaheadMaxBondDimension (size_t nQ) const |
| MPSDummySimulator::IndexType | EffectiveLookaheadMaxBondDimension (size_t nQ, MPSDummySimulator::IndexType cap) const |
| void | EnsureDummySimulator (size_t nQ) |
| void | InvalidateDummyHistory () noexcept |
| const char * | MaxBondDimensionConfigKey () const |
| template<class Bond> | |
| long long | PlanMeetingPosition (const Bond *bonds, size_t count) |
| void | RecordExecutedTwoQubitGate (Types::qubit_t q0, Types::qubit_t q1, bool isSwap, double schmidtRank) noexcept |
| void | RefreshRoutingSettings () |
| void | ResetDummySimulator () |
| void | RestoreDummyHistory (const std::vector< double > &bonds) |
| void | RestoreDummyState () |
| void | SaveDummyState () |
| void | SeedDummyHistory (const std::vector< long long > &map) |
| void | SetSwapGatesRelabelQubits (bool enabled) |
| bool | ShouldTrackVirtualBonds () const |
| void | ValidateDummyHistoryMap () noexcept |
Static Protected Member Functions | |
| static bool | IsExactSwapMatrix (const Eigen::Matrix4cd &gate) |
| template<class Gate> | |
| static double | NativeGateSchmidtRank (const Gate &gate) |
Protected Attributes | |
| size_t | curMaxBondDim = 0 |
| unsigned | decompositionDepth = 0 |
| bool | dummyHistoryValid = false |
| std::unique_ptr< MPSDummySimulator > | dummySim |
| double | growthFactorGate = 0.7 |
| double | growthFactorSwap = 1. |
| int | lookaheadDepth = 0 |
| int | lookaheadDepthWithHeuristic = 0 |
| const bool | operatorChain |
| MPSDummySimulator::IndexType | physicalBondCap = 0 |
| std::vector< double > | savedDummyBondDims |
| bool | swapGatesRelabelQubits |
| bool | trackVirtualBonds = false |
| double | truncationWeight = 1. |
| bool | useOptimalMeetingPosition = true |
| bool | virtualBondsEnabled = false |
Definition at line 9 of file TensorChainRouting.h.
|
inlineexplicitprotected |
Definition at line 18 of file TensorChainRouting.h.
References operatorChain, and swapGatesRelabelQubits.
Referenced by Simulators::Private::TensorChainRouting< Backend >::DecompositionScope::DecompositionScope().
|
inlineprotected |
Definition at line 289 of file TensorChainRouting.h.
References dummyHistoryValid, dummySim, and trackVirtualBonds.
Referenced by SaveDummyState().
|
inlineprotected |
Definition at line 332 of file TensorChainRouting.h.
References dummySim, InvalidateDummyHistory(), and savedDummyBondDims.
|
inlineprotected |
Definition at line 168 of file TensorChainRouting.h.
References dummySim, EffectiveLookaheadMaxBondDimension(), growthFactorGate, growthFactorSwap, physicalBondCap, swapGatesRelabelQubits, truncationWeight, and virtualBondsEnabled.
Referenced by EnsureDummySimulator(), RefreshRoutingSettings(), and SetSwapGatesRelabelQubits().
|
protectedpure virtual |
Referenced by SeedDummyHistory().
|
protectedpure virtual |
|
inlineprotected |
Definition at line 108 of file TensorChainRouting.h.
References EffectiveLookaheadMaxBondDimension(), and physicalBondCap.
|
inlineprotected |
Definition at line 103 of file TensorChainRouting.h.
References Simulators::MPSDummySimulator::EffectiveLookaheadMaxBondDimension(), operatorChain, and virtualBondsEnabled.
Referenced by ConfigureDummy(), and EffectiveLookaheadMaxBondDimension().
|
inlineprotected |
Definition at line 177 of file TensorChainRouting.h.
References ConfigureDummy(), dummySim, InvalidateDummyHistory(), and operatorChain.
Referenced by PlanMeetingPosition(), RecordExecutedTwoQubitGate(), and RestoreDummyHistory().
|
inlineoverride |
Definition at line 91 of file TensorChainRouting.h.
References curMaxBondDim.
|
inlineoverride |
Definition at line 72 of file TensorChainRouting.h.
References growthFactorGate.
|
inlineoverride |
Definition at line 67 of file TensorChainRouting.h.
References growthFactorSwap.
|
inlineprotectednoexcept |
Definition at line 138 of file TensorChainRouting.h.
References dummyHistoryValid.
Referenced by ClearDummySimulator(), EnsureDummySimulator(), RecordExecutedTwoQubitGate(), RefreshRoutingSettings(), ResetDummySimulator(), RestoreDummyHistory(), SeedDummyHistory(), SetSwapGatesRelabelQubits(), and ValidateDummyHistoryMap().
|
inlinestaticprotected |
Definition at line 24 of file TensorChainRouting.h.
|
inlineoverride |
Definition at line 47 of file TensorChainRouting.h.
References CurrentRoutingMap(), lookaheadDepth, and useOptimalMeetingPosition.
|
inlineprotected |
Definition at line 97 of file TensorChainRouting.h.
References operatorChain.
Referenced by RefreshRoutingSettings().
|
inlinestaticprotected |
Definition at line 236 of file TensorChainRouting.h.
References Simulators::EffectiveSchmidtRank().
|
inlineprotected |
Definition at line 198 of file TensorChainRouting.h.
References CurrentRoutingMap(), decompositionDepth, dummyHistoryValid, dummySim, EnsureDummySimulator(), Circuits::kGate, lookaheadDepth, lookaheadDepthWithHeuristic, physicalBondCap, trackVirtualBonds, and useOptimalMeetingPosition.
|
inlineprotectednoexcept |
Definition at line 243 of file TensorChainRouting.h.
References CurrentRoutingMap(), dummyHistoryValid, dummySim, EnsureDummySimulator(), InvalidateDummyHistory(), SeedDummyHistory(), swapGatesRelabelQubits, and trackVirtualBonds.
|
inlineprotected |
Definition at line 116 of file TensorChainRouting.h.
References ConfigureDummy(), dummySim, Simulators::MPSDummySimulator::EffectiveLookaheadMaxBondDimension(), InvalidateDummyHistory(), lookaheadDepth, MaxBondDimensionConfigKey(), operatorChain, physicalBondCap, trackVirtualBonds, Simulators::RoutingConfig::TruncationWeight(), truncationWeight, useOptimalMeetingPosition, Simulators::RoutingConfig::VirtualBondsEnabled(), and virtualBondsEnabled.
Referenced by SetLookaheadDepth().
|
inlineprotected |
Definition at line 318 of file TensorChainRouting.h.
References CurrentRoutingMap(), dummyHistoryValid, dummySim, InvalidateDummyHistory(), and trackVirtualBonds.
|
inlineprotected |
Definition at line 294 of file TensorChainRouting.h.
References CurrentRoutingMap(), dummyHistoryValid, dummySim, EnsureDummySimulator(), InvalidateDummyHistory(), and trackVirtualBonds.
Referenced by RestoreDummyState().
|
inlineprotected |
Definition at line 313 of file TensorChainRouting.h.
References RestoreDummyHistory(), and savedDummyBondDims.
|
inlineprotected |
Definition at line 308 of file TensorChainRouting.h.
References CaptureDummyHistory(), and savedDummyBondDims.
|
inlineprotected |
Definition at line 187 of file TensorChainRouting.h.
References CurrentBondDimensions(), dummyHistoryValid, dummySim, and InvalidateDummyHistory().
Referenced by RecordExecutedTwoQubitGate().
|
inlineoverride |
Definition at line 84 of file TensorChainRouting.h.
References dummySim, and growthFactorGate.
|
inlineoverride |
Definition at line 77 of file TensorChainRouting.h.
References dummySim, and growthFactorSwap.
|
inlineoverride |
Definition at line 53 of file TensorChainRouting.h.
References lookaheadDepth, and RefreshRoutingSettings().
Referenced by SetLookaheadDepthWithHeuristic().
|
inlineoverride |
Definition at line 60 of file TensorChainRouting.h.
References lookaheadDepth, lookaheadDepthWithHeuristic, and SetLookaheadDepth().
|
inlineprotected |
Definition at line 158 of file TensorChainRouting.h.
References ConfigureDummy(), dummySim, InvalidateDummyHistory(), and swapGatesRelabelQubits.
|
inlineprotected |
Definition at line 133 of file TensorChainRouting.h.
References trackVirtualBonds.
|
inlineoverride |
Definition at line 42 of file TensorChainRouting.h.
References swapGatesRelabelQubits.
|
inlineprotectednoexcept |
Definition at line 143 of file TensorChainRouting.h.
References CurrentRoutingMap(), dummyHistoryValid, dummySim, InvalidateDummyHistory(), and trackVirtualBonds.
|
protected |
Definition at line 371 of file TensorChainRouting.h.
Referenced by GetCurrentMaxBondDimension().
|
protected |
Definition at line 375 of file TensorChainRouting.h.
Referenced by PlanMeetingPosition().
|
protected |
Definition at line 370 of file TensorChainRouting.h.
Referenced by CaptureDummyHistory(), InvalidateDummyHistory(), PlanMeetingPosition(), RecordExecutedTwoQubitGate(), ResetDummySimulator(), RestoreDummyHistory(), SeedDummyHistory(), and ValidateDummyHistoryMap().
|
protected |
Definition at line 368 of file TensorChainRouting.h.
Referenced by CaptureDummyHistory(), ClearDummySimulator(), ConfigureDummy(), EnsureDummySimulator(), PlanMeetingPosition(), RecordExecutedTwoQubitGate(), RefreshRoutingSettings(), ResetDummySimulator(), RestoreDummyHistory(), SeedDummyHistory(), setGrowthFactorGate(), setGrowthFactorSwap(), SetSwapGatesRelabelQubits(), and ValidateDummyHistoryMap().
|
protected |
Definition at line 367 of file TensorChainRouting.h.
Referenced by ConfigureDummy(), getGrowthFactorGate(), and setGrowthFactorGate().
|
protected |
Definition at line 367 of file TensorChainRouting.h.
Referenced by ConfigureDummy(), getGrowthFactorSwap(), and setGrowthFactorSwap().
|
protected |
Definition at line 365 of file TensorChainRouting.h.
Referenced by IsRoutingLookaheadEnabled(), PlanMeetingPosition(), RefreshRoutingSettings(), SetLookaheadDepth(), and SetLookaheadDepthWithHeuristic().
|
protected |
Definition at line 365 of file TensorChainRouting.h.
Referenced by PlanMeetingPosition(), and SetLookaheadDepthWithHeuristic().
|
protected |
Definition at line 38 of file TensorChainRouting.h.
Referenced by TensorChainRouting(), EffectiveLookaheadMaxBondDimension(), EnsureDummySimulator(), MaxBondDimensionConfigKey(), and RefreshRoutingSettings().
|
protected |
Definition at line 372 of file TensorChainRouting.h.
Referenced by ConfigureDummy(), EffectiveLookaheadMaxBondDimension(), PlanMeetingPosition(), and RefreshRoutingSettings().
|
protected |
Definition at line 369 of file TensorChainRouting.h.
Referenced by ClearDummySimulator(), RestoreDummyState(), and SaveDummyState().
|
protected |
Definition at line 39 of file TensorChainRouting.h.
Referenced by TensorChainRouting(), ConfigureDummy(), RecordExecutedTwoQubitGate(), SetSwapGatesRelabelQubits(), and SwapGatesRelabelQubits().
|
protected |
Definition at line 373 of file TensorChainRouting.h.
Referenced by CaptureDummyHistory(), PlanMeetingPosition(), RecordExecutedTwoQubitGate(), RefreshRoutingSettings(), ResetDummySimulator(), RestoreDummyHistory(), ShouldTrackVirtualBonds(), and ValidateDummyHistoryMap().
|
protected |
Definition at line 374 of file TensorChainRouting.h.
Referenced by ConfigureDummy(), and RefreshRoutingSettings().
|
protected |
Definition at line 366 of file TensorChainRouting.h.
Referenced by IsRoutingLookaheadEnabled(), PlanMeetingPosition(), and RefreshRoutingSettings().
|
protected |
Definition at line 373 of file TensorChainRouting.h.
Referenced by ConfigureDummy(), EffectiveLookaheadMaxBondDimension(), and RefreshRoutingSettings().