qsim::
StateSpaceBasic
#include <statespace_basic.h>
Object containing context and routines for unoptimized state-vector manipulations.
Summary
State is a non-vectorized sequence of one real amplitude followed by one imaginary amplitude.
Inheritance
Inherits from:
qsim::StateSpace< StateSpaceBasic< For, FP >, For, FP >
Public functions
|
Add
(const State & src, State & dest) const
|
bool
|
BulkSetAmpl
(State & state, uint64_t mask, uint64_t bits, const std::complex< fp_type > & val, bool exclude) const
|
void
|
BulkSetAmpl
(State & state, uint64_t mask, uint64_t bits, fp_type re, fp_type im, bool exclude) const
|
void
|
Collapse
(const MeasurementResult & mr, State & state) const
|
void
|
FindMeasuredBits
(unsigned m, double r, uint64_t mask, const State & state) const
|
uint64_t
|
InnerProduct
(const State & state1, const State & state2) const
|
std::complex< double >
|
InternalToNormalOrder
(State & state) const
|
void
|
Multiply
(fp_type a, State & state) const
|
void
|
NormalToInternalOrder
(State & state) const
|
void
|
PartialNorms
(const State & state) const
|
std::vector< double >
|
RealInnerProduct
(const State & state1, const State & state2) const
|
double
|
Sample
(const State & state, uint64_t num_samples, unsigned seed) const
|
std::vector< uint64_t >
|
SetAllZeros
(State & state) const
|
void
|
SetStateUniform
(State & state) const
|
void
|
SetStateZero
(State & state) const
|
void
|
Public static functions
|
GetAmpl
(const State & state, uint64_t i)
|
std::complex< fp_type >
|
MinSize
(unsigned num_qubits)
|
uint64_t
|
SetAmpl
(State & state, uint64_t i, const std::complex< fp_type > & ampl)
|
void
|
SetAmpl
(State & state, uint64_t i, fp_type re, fp_type im)
|
void
|
Public types
MeasurementResult
typename Base::MeasurementResult MeasurementResult
State
typename Base::State State
fp_type
typename Base::fp_type fp_type
Public functions
Add
bool Add(
const State & src,
State & dest
) const
BulkSetAmpl
void BulkSetAmpl(
State & state,
uint64_t mask,
uint64_t bits,
const std::complex< fp_type > & val,
bool exclude
) const
BulkSetAmpl
void BulkSetAmpl(
State & state,
uint64_t mask,
uint64_t bits,
fp_type re,
fp_type im,
bool exclude
) const
Collapse
void Collapse(
const MeasurementResult & mr,
State & state
) const
FindMeasuredBits
uint64_t FindMeasuredBits(
unsigned m,
double r,
uint64_t mask,
const State & state
) const
InnerProduct
std::complex< double > InnerProduct(
const State & state1,
const State & state2
) const
InternalToNormalOrder
void InternalToNormalOrder(
State & state
) const
Multiply
void Multiply(
fp_type a,
State & state
) const
NormalToInternalOrder
void NormalToInternalOrder(
State & state
) const
PartialNorms
std::vector< double > PartialNorms(
const State & state
) const
RealInnerProduct
double RealInnerProduct(
const State & state1,
const State & state2
) const
Sample
std::vector< uint64_t > Sample(
const State & state,
uint64_t num_samples,
unsigned seed
) const
SetAllZeros
void SetAllZeros(
State & state
) const
void SetStateUniform(
State & state
) const
SetStateZero
void SetStateZero(
State & state
) const
StateSpaceBasic
StateSpaceBasic(
ForArgs &&... args
)
Public static functions
GetAmpl
std::complex< fp_type > GetAmpl(
const State & state,
uint64_t i
)
MinSize
uint64_t MinSize(
unsigned num_qubits
)
SetAmpl
void SetAmpl(
State & state,
uint64_t i,
const std::complex< fp_type > & ampl
)
SetAmpl
void SetAmpl(
State & state,
uint64_t i,
fp_type re,
fp_type im
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-04-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-04-29 UTC."],[],[]]