|
Maestro 0.2.5
Unified interface for quantum circuit simulation
|
#include <TensorNetwork.h>
Collaboration diagram for TensorNetworks::TensorNetwork:Public Types | |
| using | Index = Eigen::Index |
Public Member Functions | |
| TensorNetwork ()=delete | |
| TensorNetwork (size_t numQubits) | |
| Constructor. | |
| void | AddGate (const QC::Gates::QuantumGateWithOp< TensorNode::MatrixClass > &gate, Types::qubit_t q1, Types::qubit_t q2=0) |
| void | AddProjector (Types::qubit_t qubit, bool zero=true) |
| void | AddProjectorOp (Types::qubit_t qubit, bool zero=true, double prob=1.) |
| void | Clear () |
| void | ClearSavedState () |
| void | ClearSavedStateMinimal () |
| std::unique_ptr< TensorNetwork > | Clone () const |
| void | Connect () |
| void | Disconnect () |
| double | ExpectationValue (const std::string &pauliString) |
| Returns the expected value of a Pauli string. | |
| double | getBasisStateProbability (size_t outcome) |
| std::shared_ptr< ITensorContractor > | GetContractor () const |
| bool | GetMultithreading () const |
| Get the multithreading flag. | |
| size_t | GetNumQubits () const |
| const std::unordered_set< Types::qubit_t > & | GetQubitGroup (Types::qubit_t q) const |
| const std::vector< std::shared_ptr< TensorNode > > & | GetTensors () const |
| bool | Measure (Types::qubit_t qubit) |
| double | Probability (Types::qubit_t qubit, bool zero=true) |
| void | RestoreSavedStateDestructive () |
| void | RestoreSavedStateMinimalDestructive () |
| void | RestoreState () |
| void | RestoreStateMinimal () |
| void | SaveState () |
| void | SaveStateMinimal () |
| void | SetContractor (const std::shared_ptr< ITensorContractor > &c) |
| void | SetMultithreading (bool multithreading=true) |
| Enable/disable multithreading. | |
Definition at line 27 of file TensorNetwork.h.
| using TensorNetworks::TensorNetwork::Index = Eigen::Index |
Definition at line 29 of file TensorNetwork.h.
|
delete |
|
inline |
Constructor.
| numQubits | The number of qubits in the network. |
Definition at line 38 of file TensorNetwork.h.
|
inline |
Definition at line 66 of file TensorNetwork.h.
Referenced by AddProjectorOp().
|
inline |
Definition at line 208 of file TensorNetwork.h.
Referenced by getBasisStateProbability(), and Probability().
|
inline |
|
inline |
Definition at line 50 of file TensorNetwork.h.
References GetNumQubits().
|
inline |
Definition at line 339 of file TensorNetwork.h.
References ClearSavedStateMinimal().
Referenced by RestoreSavedStateDestructive().
|
inline |
Definition at line 348 of file TensorNetwork.h.
Referenced by ClearSavedState(), and RestoreSavedStateMinimalDestructive().
|
inline |
< A map between qubits (as identified from outside) and the qubits group ids
< A map between qubits group ids and the qubits in that group
< A map between qubits (as identified from outside) and the qubits group ids
< A map between qubits group ids and the qubits in that group
Definition at line 423 of file TensorNetwork.h.
|
inline |
Definition at line 356 of file TensorNetwork.h.
References GetNumQubits().
Referenced by Probability().
|
inline |
Definition at line 379 of file TensorNetwork.h.
References GetNumQubits(), and TensorNetworks::TensorNode::NotConnected.
Referenced by ExpectationValue().
|
inline |
Returns the expected value of a Pauli string.
Use it to obtain the expected value of a Pauli string. The Pauli string is a string of characters representing the Pauli operators, e.g. "XIZY". The length of the string should be less or equal to the number of qubits (if it's less, it's completed with I).
| pauliString | The Pauli string to obtain the expected value for. |
Definition at line 122 of file TensorNetwork.h.
References Disconnect().
|
inline |
Definition at line 174 of file TensorNetwork.h.
References AddProjector(), GetNumQubits(), RestoreSavedStateMinimalDestructive(), and SaveStateMinimal().
|
inline |
Definition at line 266 of file TensorNetwork.h.
|
inline |
Get the multithreading flag.
Returns the multithreading flag.
Definition at line 421 of file TensorNetwork.h.
|
inline |
Definition at line 260 of file TensorNetwork.h.
Referenced by Clear(), Connect(), Disconnect(), and getBasisStateProbability().
|
inline |
Definition at line 274 of file TensorNetwork.h.
Referenced by TensorNetworks::VerticalContractor::Contract(), and TensorNetworks::BaseContractor::InitializeTensors().
|
inline |
Definition at line 270 of file TensorNetwork.h.
Referenced by TensorNetworks::BaseContractor::InitializeTensors().
|
inline |
Definition at line 194 of file TensorNetwork.h.
References AddProjectorOp(), and Probability().
|
inline |
Definition at line 76 of file TensorNetwork.h.
References AddProjector(), and Connect().
Referenced by Measure().
|
inline |
Definition at line 317 of file TensorNetwork.h.
References ClearSavedState(), and RestoreSavedStateMinimalDestructive().
|
inline |
Definition at line 328 of file TensorNetwork.h.
References ClearSavedStateMinimal().
Referenced by getBasisStateProbability(), and RestoreSavedStateDestructive().
|
inline |
Definition at line 298 of file TensorNetwork.h.
References RestoreStateMinimal().
|
inline |
Definition at line 309 of file TensorNetwork.h.
Referenced by RestoreState().
|
inline |
Definition at line 279 of file TensorNetwork.h.
References SaveStateMinimal().
|
inline |
Definition at line 290 of file TensorNetwork.h.
Referenced by getBasisStateProbability(), and SaveState().
|
inline |
Definition at line 262 of file TensorNetwork.h.
|
inline |
Enable/disable multithreading.
Enable/disable multithreading. Default is enabled.
| multithreading | A flag to indicate if multithreading should be enabled. |
Definition at line 410 of file TensorNetwork.h.