|
Maestro 0.3.11
Unified interface for quantum circuit simulation
|
#include <MPSDummySimulator.h>
Public Types | |
| using | GateClass = QC::TensorNetworks::MPSSimulatorInterface::GateClass |
| enum class | HeuristicPolicy { kCombinedCostAndGravity = 0 , kMinOneStepCost , kNextPartnerGravity , kAnchorHeavierQubit , kMinBondCost , kSwapLeft , kSwapRight , kCloserToEnd , kCloserToCenter } |
| using | IndexType = long long int |
| using | MatrixClass = QC::TensorNetworks::MPSSimulatorInterface::MatrixClass |
Public Member Functions | |
| MPSDummySimulator (size_t N, bool operatorChain=false) | |
| void | ApplyGate (const GateClass &gate, IndexType qubit, IndexType controllingQubit1=0) |
| void | ApplyGate (const QC::Gates::AppliedGate< MatrixClass > &gate) |
| void | ApplyGate (const std::shared_ptr< Circuits::IOperation<> > &gate) |
| void | ApplyGates (const std::vector< QC::Gates::AppliedGate< MatrixClass > > &gates) |
| void | ApplyGates (const std::vector< std::shared_ptr< Circuits::IOperation<> > > &gates) |
| void | ApplyTwoQubitGate (IndexType qubit, IndexType controllingQubit1, double schmidtRank, bool isSwapGate=false) |
| double | BondCost (double dimension) const |
| void | Clear () |
| std::unique_ptr< MPSDummySimulator > | Clone () const |
| std::vector< long long int > | ComputeOptimalQubitsMap (const std::vector< std::shared_ptr< Circuits::Circuit<> > > &layers, int nrShuffles=0, int nrSwaps=0) |
| void | EvaluateMeetingPositionCost (IndexType meetPosition, const std::vector< std::shared_ptr< Circuits::IOperation<> > > &upcomingGates, long long int currentGateIndex, int lookaheadDepth, int lookaheadDepthWithHeuristic, double currentCost, double &bestCost, bool useSameDummy=false) |
| IndexType | FindBestMeetingPosition (const std::vector< std::shared_ptr< Circuits::IOperation<> > > &upcomingGates, long long int currentGateIndex, int lookaheadDepth, int lookaheadDepthWithHeuristic, double currentCost, double &bestCost) |
| const std::vector< double > & | getCurrentBondDimensions () const |
| double | getGrowthFactorGate () const |
| double | getGrowthFactorSwap () const |
| const std::vector< double > & | getMaxBondDimensions () const |
| double | getMinLayoutGain () const |
| size_t | getNrQubits () const |
| const std::vector< IndexType > & | getQubitsMap () const |
| const std::vector< IndexType > & | getQubitsMapInv () const |
| double | getTotalSwappingCost () const |
| void | InvalidateMemoCache () |
| bool | IsOperatorChain () const |
| void | print () const |
| void | RecordAdjacentTwoQubitGate (IndexType bond, bool isSwapGate, double schmidtRank) |
| void | RelabelQubits (IndexType q1, IndexType q2) |
| void | ResetBondDimensions () |
| IndexType | SelectMeetingPositionAdaptive (const std::vector< std::shared_ptr< Circuits::IOperation<> > > &upcomingGates, long long int currentGateIndex, int lookaheadDepth, int lookaheadDepthWithHeuristic, double currentCost, double &bestCost) |
| void | SetCurrentBondDimensions (const std::vector< double > &dims) |
| void | setGrowthFactorGate (double factor) |
| void | setGrowthFactorSwap (double factor) |
| void | SetInitialQubitsMap (const std::vector< long long int > &initialMap) |
| void | SetMaxBondDimension (IndexType val) |
| void | setMinLayoutGain (double gain) |
| void | SetRoutingCostModel (IndexType cap, double weight) |
| void | SetRoutingMap (const std::vector< long long int > &actualMap) |
| void | SetSwapGatesRelabelQubits (bool enabled) |
| void | setTotalSwappingCost (double cost) |
| void | SwapQubitsToPosition (IndexType qubit1, IndexType qubit2, IndexType meetPosition) |
Static Public Member Functions | |
| static IndexType | EffectiveLookaheadMaxBondDimension (size_t nrQubits, bool operatorChain, IndexType cap) |
| static IndexType | EffectiveMapMaxBondDimension (size_t nrQubits, bool operatorChain, IndexType cap) |
| static double | GateSchmidtRank (const Circuits::IQuantumGate<> &gate) |
| static bool | IsControlledTwoQubitGateType (Circuits::QuantumGateType type) |
Static Public Attributes | |
| static constexpr double | kPostGateCostWeight = 0.5 |
| static constexpr double | kPostSwapCostWeight = 0.25 |
Definition at line 41 of file MPSDummySimulator.h.
| using Simulators::MPSDummySimulator::GateClass = QC::TensorNetworks::MPSSimulatorInterface::GateClass |
Definition at line 46 of file MPSDummySimulator.h.
| using Simulators::MPSDummySimulator::IndexType = long long int |
Definition at line 44 of file MPSDummySimulator.h.
| using Simulators::MPSDummySimulator::MatrixClass = QC::TensorNetworks::MPSSimulatorInterface::MatrixClass |
Definition at line 45 of file MPSDummySimulator.h.
|
strong |
| Enumerator | |
|---|---|
| kCombinedCostAndGravity | |
| kMinOneStepCost | |
| kNextPartnerGravity | |
| kAnchorHeavierQubit | |
| kMinBondCost | |
| kSwapLeft | |
| kSwapRight | |
| kCloserToEnd | |
| kCloserToCenter | |
Definition at line 500 of file MPSDummySimulator.h.
|
inlineexplicit |
Definition at line 50 of file MPSDummySimulator.h.
References SetMaxBondDimension().
Referenced by Clone().
|
inline |
Definition at line 367 of file MPSDummySimulator.h.
References ApplyTwoQubitGate(), getNrQubits(), and RelabelQubits().
|
inline |
Definition at line 308 of file MPSDummySimulator.h.
References ApplyGate().
Referenced by ApplyGate(), ApplyGate(), ApplyGates(), and ApplyGates().
|
inline |
Definition at line 313 of file MPSDummySimulator.h.
References ApplyGate(), ApplyTwoQubitGate(), GateSchmidtRank(), Circuits::kCCXGateType, Circuits::kGate, and Circuits::kSwapGateType.
|
inline |
Definition at line 433 of file MPSDummySimulator.h.
References ApplyGate().
Referenced by ComputeOptimalQubitsMap().
|
inline |
Definition at line 439 of file MPSDummySimulator.h.
References ApplyGate().
|
inline |
Definition at line 397 of file MPSDummySimulator.h.
References getNrQubits(), and RecordAdjacentTwoQubitGate().
Referenced by ApplyGate(), and ApplyGate().
|
inline |
Definition at line 156 of file MPSDummySimulator.h.
Referenced by SetCurrentBondDimensions(), SetMaxBondDimension(), and SetRoutingCostModel().
|
inline |
Definition at line 214 of file MPSDummySimulator.h.
References InvalidateMemoCache().
|
inline |
Definition at line 63 of file MPSDummySimulator.h.
References MPSDummySimulator().
|
inline |
Definition at line 634 of file MPSDummySimulator.h.
References ApplyGates(), getNrQubits(), getTotalSwappingCost(), Circuits::kSwapGateType, and SetInitialQubitsMap().
Referenced by Network::SimpleDisconnectedNetwork< Time, Controller >::OptimizeMPSInitialQubitsMap().
|
inlinestatic |
Definition at line 143 of file MPSDummySimulator.h.
References EffectiveLookaheadMaxBondDimension().
Referenced by Network::SimpleDisconnectedNetwork< Time, Controller >::OptimizeMPSInitialQubitsMap().
|
inline |
Definition at line 516 of file MPSDummySimulator.h.
|
inline |
Definition at line 546 of file MPSDummySimulator.h.
Referenced by SelectMeetingPositionAdaptive().
|
inlinestatic |
Definition at line 388 of file MPSDummySimulator.h.
References Circuits::IQuantumGate< Time >::GetGateType(), Circuits::IGateOperation< Time >::GetNumQubits(), Circuits::IQuantumGate< Time >::GetParams(), and Simulators::RoutingSchmidtRank().
Referenced by ApplyGate().
|
inline |
Definition at line 470 of file MPSDummySimulator.h.
|
inline |
Definition at line 120 of file MPSDummySimulator.h.
|
inline |
Definition at line 115 of file MPSDummySimulator.h.
|
inline |
Definition at line 475 of file MPSDummySimulator.h.
|
inline |
Definition at line 202 of file MPSDummySimulator.h.
|
inline |
Definition at line 86 of file MPSDummySimulator.h.
Referenced by ApplyGate(), ApplyTwoQubitGate(), and ComputeOptimalQubitsMap().
|
inline |
Definition at line 480 of file MPSDummySimulator.h.
|
inline |
Definition at line 485 of file MPSDummySimulator.h.
|
inline |
Definition at line 495 of file MPSDummySimulator.h.
Referenced by ComputeOptimalQubitsMap(), and SelectMeetingPositionAdaptive().
|
inline |
Definition at line 177 of file MPSDummySimulator.h.
Referenced by Clear(), setGrowthFactorGate(), setGrowthFactorSwap(), SetMaxBondDimension(), SetRoutingCostModel(), and SetSwapGatesRelabelQubits().
|
inlinestatic |
Definition at line 148 of file MPSDummySimulator.h.
References Simulators::IsControlledRoutingGate().
|
inline |
Definition at line 91 of file MPSDummySimulator.h.
|
inline |
Definition at line 300 of file MPSDummySimulator.h.
|
inline |
Definition at line 424 of file MPSDummySimulator.h.
References kPostGateCostWeight.
Referenced by ApplyTwoQubitGate().
Definition at line 106 of file MPSDummySimulator.h.
Referenced by ApplyGate().
|
inline |
Definition at line 220 of file MPSDummySimulator.h.
Referenced by SetInitialQubitsMap().
|
inline |
Definition at line 2454 of file MPSDummySimulator.h.
References FindBestMeetingPosition(), getTotalSwappingCost(), setTotalSwappingCost(), and SwapQubitsToPosition().
|
inline |
Definition at line 459 of file MPSDummySimulator.h.
References BondCost().
|
inline |
Definition at line 191 of file MPSDummySimulator.h.
References InvalidateMemoCache().
Referenced by Network::SimpleDisconnectedNetwork< Time, Controller >::OptimizeMPSInitialQubitsMap().
|
inline |
Definition at line 183 of file MPSDummySimulator.h.
References InvalidateMemoCache().
Referenced by Network::SimpleDisconnectedNetwork< Time, Controller >::OptimizeMPSInitialQubitsMap().
|
inline |
Definition at line 452 of file MPSDummySimulator.h.
References ResetBondDimensions(), and SetRoutingMap().
Referenced by ComputeOptimalQubitsMap().
|
inline |
Definition at line 232 of file MPSDummySimulator.h.
References BondCost(), and InvalidateMemoCache().
Referenced by MPSDummySimulator(), and Network::SimpleDisconnectedNetwork< Time, Controller >::OptimizeMPSInitialQubitsMap().
|
inline |
Definition at line 207 of file MPSDummySimulator.h.
|
inline |
Definition at line 164 of file MPSDummySimulator.h.
References BondCost(), and InvalidateMemoCache().
Referenced by Network::SimpleDisconnectedNetwork< Time, Controller >::OptimizeMPSInitialQubitsMap().
|
inline |
Definition at line 445 of file MPSDummySimulator.h.
Referenced by SetInitialQubitsMap().
|
inline |
Definition at line 96 of file MPSDummySimulator.h.
References InvalidateMemoCache().
Referenced by Network::SimpleDisconnectedNetwork< Time, Controller >::OptimizeMPSInitialQubitsMap().
|
inline |
Definition at line 490 of file MPSDummySimulator.h.
Referenced by SelectMeetingPositionAdaptive().
|
inline |
Definition at line 2666 of file MPSDummySimulator.h.
References kPostSwapCostWeight.
Referenced by SelectMeetingPositionAdaptive().
|
staticconstexpr |
Definition at line 126 of file MPSDummySimulator.h.
Referenced by RecordAdjacentTwoQubitGate().
|
staticconstexpr |
Definition at line 125 of file MPSDummySimulator.h.
Referenced by SwapQubitsToPosition().