63 unit->ResetPhaseOffset();
77 std::vector<bitLenInt*>::iterator first, std::vector<bitLenInt*>::iterator last);
109 fn(
shards[target].unit, target, mtrx);
112 }
else if (p > (3 *
ONE_R1_F / 4)) {
114 fn(
shards[target].unit, target, mtrx);
119 std::vector<bitLenInt> bits{ control, target };
120 std::vector<bitLenInt*> ebits{ &bits[0
U], &bits[1U] };
122 cfn(unit, bits[0
U], bits[1U], mtrx);
133 Swap(control, target);
134 Phase(phaseFac, phaseFac, target);
137 std::vector<bitLenInt> bits{ control, target };
138 std::vector<bitLenInt*> ebits{ &bits[0
U], &bits[1U] };
140 ufn(unit, bits[0
U], bits[1U]);
153 throw std::invalid_argument(
154 methodName + std::string(
" target qubit index parameter must be within allocated qubit bounds!"));
161 throw std::invalid_argument(
162 methodName + std::string(
" target qubit index parameter must be within allocated qubit bounds!"));
164 if (controls.size() > 1U) {
165 throw std::invalid_argument(methodName + std::string(
" can only have one control qubit!"));
169 throw std::invalid_argument(
170 methodName + std::string(
" control qubit index parameter must be within allocated qubit bounds!"));
184 bool ignored2 =
false, int64_t ignored3 = -1,
bool useHardwareRNG =
true,
bool ignored4 =
false,
199 return std::make_shared<QUnitClifford>(
215 shards[i].unit->SetRandGlobalPhase(isRand);
224 std::map<QStabilizerPtr, QStabilizerPtr> engines;
228 if (engines.find(unit) == engines.end()) {
231 permCount = permCount + pg;
240 shards = std::vector<CliffordShard>();
247 const std::vector<bitLenInt>& bits,
const std::vector<bitCapInt>& perms,
const bitCapInt& offset =
ZERO_BCI)
258 const std::vector<bitLenInt>& bits,
const std::vector<bitCapInt>& perms,
const bitCapInt& offset =
ZERO_BCI)
286 throw std::domain_error(
"QUnitClifford::SetAmplitude() not implemented!");
340 unit->AntiCNOT(c, t);
423 if (qubit1 == qubit2) {
444 bool ForceM(
bitLenInt t,
bool result,
bool doForce =
true,
bool doApply =
true);
454 std::map<bitCapInt, int>
MultiShotMeasureMask(
const std::vector<bitCapInt>& qPowers,
unsigned shots);
456 void MultiShotMeasureMask(
const std::vector<bitCapInt>& qPowers,
unsigned shots,
unsigned long long* shotsArray);
477 std::vector<complex>
GetAmplitudes(std::vector<bitCapInt> perms);
486 return shard.
unit->IsSeparableZ(shard.
mapped);
496 return shard.
unit->IsSeparableX(shard.
mapped);
505 return shard.
unit->IsSeparableY(shard.
mapped);
523 return std::dynamic_pointer_cast<QUnitClifford>(
Clone())->EntangleAll()->CanDecomposeDispose(start, length);
532 throw std::invalid_argument(
"QUnit::Compose start index is out-of-bounds!");
536 QUnitCliffordPtr clone = std::dynamic_pointer_cast<QUnitClifford>(toCopy->Clone());
539 shards.insert(
shards.begin() + start, clone->shards.begin(), clone->shards.end());
547 return Compose(std::dynamic_pointer_cast<QUnitClifford>(toCopy), start);
551 Decompose(start, std::dynamic_pointer_cast<QUnitClifford>(dest));
573 throw std::out_of_range(
"QUnitClifford::Allocate() cannot start past end of register!");
584 return Compose(nQubits, start);
601 return SumSqrDiff(std::dynamic_pointer_cast<QUnitClifford>(toCompare));
606 return ApproxCompare(std::dynamic_pointer_cast<QUnitClifford>(toCompare), error_tol);
614 if (
this == toCompare.get()) {
618 return std::dynamic_pointer_cast<QUnitClifford>(
Clone())->EntangleAll()->ApproxCompare(
619 std::dynamic_pointer_cast<QUnitClifford>(toCompare->Clone())->EntangleAll(), error_tol);
640 shard.
unit->Phase(topLeft, bottomRight, shard.
mapped);
647 shard.
unit->Invert(topRight, bottomLeft, shard.
mapped);
653 if (controls.empty()) {
654 Phase(topLeft, bottomRight, t);
669 unit->MCPhase({ c }, mtrx[0
U], mtrx[3U], t);
677 if (controls.empty()) {
678 Phase(topLeft, bottomRight, t);
693 unit->MACPhase({ c }, mtrx[0
U], mtrx[3U], t);
701 if (controls.empty()) {
702 Invert(topRight, bottomLeft, t);
717 unit->MCInvert({ c }, mtrx[1U], mtrx[2U], t);
725 if (controls.empty()) {
726 Invert(topRight, bottomLeft, t);
741 unit->MACInvert({ c }, mtrx[1U], mtrx[2U], t);
749 MCPhase(controls, mtrx[0
U], mtrx[3U], t);
753 MCInvert(controls, mtrx[1U], mtrx[2U], t);
757 if (controls.empty()) {
767 unit->MCMtrx({ c }, mtrx, t);
774 MACPhase(controls, mtrx[0
U], mtrx[3U], t);
778 MACInvert(controls, mtrx[1U], mtrx[2U], t);
782 if (controls.empty()) {
792 unit->MACMtrx({ c }, mtrx, t);
801 std::vector<bitLenInt> bits{ c, t };
802 std::vector<bitLenInt*> ebits{ &bits[0
U], &bits[1U] };
804 unit->FSim(theta, phi, c, t);
812 for (
size_t i = 0
U; i < qubits.size(); ++i) {
823 if (qubit1 == qubit2) {
A "Qrack::QInterface" is an abstract interface exposing qubit permutation state vector with methods t...
Definition: qinterface.hpp:141
bitCapInt maxQPower
Definition: qinterface.hpp:149
bool useRDRAND
Definition: qinterface.hpp:145
virtual bitLenInt Allocate(bitLenInt length)
Allocate new "length" count of |0> state qubits at end of qubit index position.
Definition: qinterface.hpp:470
std::shared_ptr< RdRandom > hardware_rand_generator
Definition: qinterface.hpp:152
virtual bitLenInt Compose(QInterfacePtr toCopy)
Combine another QInterface with this one, after the last bit index of this one.
Definition: qinterface.hpp:364
qrack_rand_gen_ptr rand_generator
Definition: qinterface.hpp:150
bool randGlobalPhase
Definition: qinterface.hpp:144
virtual void SetQubitCount(bitLenInt qb)
Definition: qinterface.hpp:268
bitLenInt qubitCount
Definition: qinterface.hpp:146
bool doNormalize
Definition: qinterface.hpp:143
Definition: qunitclifford.hpp:42
void Mtrx(const complex *mtrx, bitLenInt t)
Apply an arbitrary single bit unitary transformation.
Definition: qunitclifford.hpp:629
void Phase(const complex &topLeft, const complex &bottomRight, bitLenInt t)
Apply a single bit transformation that only effects phase.
Definition: qunitclifford.hpp:636
bitCapInt GetMaxQPower()
Get the maximum number of basis states, namely for qubits.
Definition: qunitclifford.hpp:208
real1_f ProbPermRdm(const bitCapInt &perm, bitLenInt ancillaeStart)
Definition: qunitclifford.cpp:115
void MACInvert(const std::vector< bitLenInt > &controls, const complex &topRight, const complex &bottomLeft, bitLenInt t)
Apply a single bit transformation that reverses bit probability and might effect phase,...
Definition: qunitclifford.hpp:722
void AntiCNOT(bitLenInt c, bitLenInt t)
Apply an (anti-)CNOT gate with control and target.
Definition: qunitclifford.hpp:328
void MACMtrx(const std::vector< bitLenInt > &controls, const complex *mtrx, bitLenInt t)
Apply an arbitrary single bit unitary transformation, with arbitrary (anti-)control bits.
Definition: qunitclifford.hpp:771
void SetRandGlobalPhase(bool isRand)
Definition: qunitclifford.hpp:212
bool IsSeparableZ(const bitLenInt &t)
Returns "true" if target qubit is a Z basis eigenstate.
Definition: qunitclifford.hpp:482
void IISwap(bitLenInt c, bitLenInt t)
Inverse ISwap - Swap values of two bits in register, and apply phase factor of -i if bits are differe...
Definition: qunitclifford.hpp:437
QStabilizerPtr EntangleInCurrentBasis(std::vector< bitLenInt * >::iterator first, std::vector< bitLenInt * >::iterator last)
Definition: qunitclifford.cpp:269
bool IsSeparableY(const bitLenInt &t)
Returns "true" if target qubit is a Y basis eigenstate.
Definition: qunitclifford.hpp:501
void Decompose(bitLenInt start, QUnitCliffordPtr dest)
Definition: qunitclifford.hpp:553
bitLenInt Compose(QInterfacePtr toCopy, bitLenInt start)
Compose() a QInterface peer, inserting its qubit into index order at start index.
Definition: qunitclifford.hpp:545
std::vector< CliffordShard > shards
Definition: qunitclifford.hpp:45
std::map< bitCapInt, complex > GetQuantumState()
Convert the state to sparse ket notation.
Definition: qunitclifford.cpp:419
bool TrySeparate(bitLenInt qubit1, bitLenInt qubit2)
Two-qubit TrySeparate()
Definition: qunitclifford.hpp:821
bool isClifford(bitLenInt qubit)
Returns "true" if current qubit state is identifiably within the Clifford set, or "false" if it is no...
Definition: qunitclifford.hpp:204
void Clear()
Definition: qunitclifford.hpp:238
bitLenInt ThrowIfQubitSetInvalid(const std::vector< bitLenInt > &controls, bitLenInt t, std::string methodName)
Definition: qunitclifford.hpp:158
bool IsSeparableX(const bitLenInt &t)
Returns "true" if target qubit is an X basis eigenstate.
Definition: qunitclifford.hpp:492
void MCPhase(const std::vector< bitLenInt > &controls, const complex &topLeft, const complex &bottomRight, bitLenInt t)
Apply a single bit transformation that only effects phase, with arbitrary control bits.
Definition: qunitclifford.hpp:650
bitLenInt Compose(QUnitCliffordPtr toCopy)
Definition: qunitclifford.hpp:527
virtual bitLenInt Compose(QInterfacePtr toCopy)
Combine another QInterface with this one, after the last bit index of this one.
Definition: qinterface.hpp:364
void X(bitLenInt t)
X gate.
Definition: qunitclifford.hpp:403
bool TrySeparate(const std::vector< bitLenInt > &qubits, real1_f ignored)
Qrack::QUnit types maintain explicit separation of representations of qubits, which reduces memory us...
Definition: qunitclifford.hpp:810
bitCapInt PermCount()
Definition: qunitclifford.hpp:222
void Detach(bitLenInt start, bitLenInt length, QUnitCliffordPtr dest)
Definition: qunitclifford.cpp:200
QStabilizerPtr EntangleAll()
Definition: qunitclifford.hpp:79
QInterfacePtr CloneBody(QUnitCliffordPtr copyPtr)
Definition: qunitclifford.cpp:29
virtual void H(bitLenInt qubit)
Apply a Hadamard gate to target.
Definition: qinterface.hpp:913
void SetPermutation(const bitCapInt &perm, const complex &phaseFac=CMPLX_DEFAULT_ARG)
Set to a specific permutation of all qubits.
Definition: qunitclifford.cpp:181
real1_f Prob(bitLenInt qubit)
Direct measure of bit probability to be in |1> state.
Definition: qunitclifford.hpp:622
void OrderContiguous(QStabilizerPtr unit)
Definition: qunitclifford.cpp:334
std::map< bitCapInt, int > MultiShotMeasureMask(const std::vector< bitCapInt > &qPowers, unsigned shots)
Statistical measure of masked permutation probability.
Definition: qunitclifford.cpp:593
bitLenInt GetQubitCount()
Get the count of bits in this register.
Definition: qunitclifford.hpp:206
void Z(bitLenInt t)
Apply a phase gate (|0>->|0>, |1>->-|1>, or "Z") to qubit b.
Definition: qunitclifford.hpp:394
real1_f ExpectationBitsFactorized(const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI)
Get expectation value of bits, given an array of qubit weights.
Definition: qunitclifford.hpp:246
std::function< void(QStabilizerPtr unit, const bitLenInt &c, const bitLenInt &t, const complex *mtrx)> CGateFn
Definition: qunitclifford.hpp:100
void SetAmplitude(const bitCapInt &perm, const complex &)
Sets the representational amplitude of a full permutation.
Definition: qunitclifford.hpp:284
void CNOT(bitLenInt c, bitLenInt t)
Apply a CNOT gate with control and target.
Definition: qunitclifford.hpp:290
void IS(bitLenInt t)
Apply an inverse phase gate (|0>->|0>, |1>->-i|1>, or "S adjoint") to qubit b.
Definition: qunitclifford.hpp:386
real1_f VarianceBitsFactorized(const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI)
Get expectation value of bits, given an array of qubit weights.
Definition: qunitclifford.hpp:257
void Invert(const complex &topRight, const complex &bottomLeft, bitLenInt t)
Apply a single bit transformation that reverses bit probability and might effect phase.
Definition: qunitclifford.hpp:643
void Decompose(bitLenInt start, QInterfacePtr dest)
Minimally decompose a set of contiguous bits from the separably composed unit, into "destination".
Definition: qunitclifford.hpp:549
bool ForceM(bitLenInt t, bool result, bool doForce=true, bool doApply=true)
Measure qubit t.
Definition: qunitclifford.cpp:570
bitCapInt MAll()
Measure all qubits.
Definition: qunitclifford.hpp:447
void SwapGate(bitLenInt control, bitLenInt target, SwapGateFn ufn, const complex &phaseFac)
Definition: qunitclifford.hpp:127
void S(bitLenInt t)
Apply a phase gate (|0>->|0>, |1>->i|1>, or "S") to qubit b.
Definition: qunitclifford.hpp:378
complex GetAmplitude(const bitCapInt &perm)
Get a single basis state amplitude.
Definition: qunitclifford.cpp:453
friend std::istream & operator>>(std::istream &is, const QUnitCliffordPtr s)
Definition: qunitclifford.cpp:860
void MCMtrx(const std::vector< bitLenInt > &controls, const complex *mtrx, bitLenInt t)
Apply an arbitrary single bit unitary transformation, with arbitrary control bits.
Definition: qunitclifford.hpp:746
void AntiCY(bitLenInt c, bitLenInt t)
Apply an (anti-)CY gate with control and target.
Definition: qunitclifford.hpp:345
void Copy(QInterfacePtr orig)
Definition: qunitclifford.hpp:48
std::function< void(QStabilizerPtr unit, const bitLenInt &c, const bitLenInt &t)> SwapGateFn
Definition: qunitclifford.hpp:102
void H(bitLenInt t)
Hadamard gate.
Definition: qunitclifford.hpp:371
~QUnitClifford()
Definition: qunitclifford.hpp:188
bool SeparateBit(bool value, bitLenInt qubit)
Definition: qunitclifford.cpp:533
QUnitStateVectorPtr GetDecomposedQuantumState()
Convert the state to Schmidt-decomposed sparse ket notation.
Definition: qunitclifford.cpp:427
void Y(bitLenInt t)
Apply a Pauli Y gate to target.
Definition: qunitclifford.hpp:410
void SetDevice(int64_t dID)
Set the device index, if more than one device is available.
Definition: qunitclifford.hpp:210
void MACPhase(const std::vector< bitLenInt > &controls, const complex &topLeft, const complex &bottomRight, bitLenInt t)
Apply a single bit transformation that only effects phase, with arbitrary (anti-)control bits.
Definition: qunitclifford.hpp:674
real1_f ExpectationFloatsFactorized(const std::vector< bitLenInt > &bits, const std::vector< real1_f > &weights)
Get expectation value of bits, given a (floating-point) array of qubit weights.
Definition: qunitclifford.hpp:252
void Dispose(bitLenInt start, bitLenInt length, const bitCapInt &disposedPerm)
Dispose a a contiguous set of qubits that are already in a permutation eigenstate.
Definition: qunitclifford.hpp:564
std::vector< complex > GetAmplitudes(std::vector< bitCapInt > perms)
Get a single basis state amplitude.
Definition: qunitclifford.cpp:482
bool isClifford()
Returns "true" if current state is identifiably within the Clifford set, or "false" if it is not or c...
Definition: qunitclifford.hpp:203
void FSim(real1_f theta, real1_f phi, bitLenInt c, bitLenInt t)
The 2-qubit "fSim" gate, (useful in the simulation of particles with fermionic statistics)
Definition: qunitclifford.hpp:796
QUnitCliffordPtr CloneEmpty()
Definition: qunitclifford.hpp:197
uint8_t IsSeparable(const bitLenInt &t)
Returns: 0 if target qubit is not separable 1 if target qubit is a Z basis eigenstate 2 if target qub...
Definition: qunitclifford.hpp:514
bool CanDecomposeDispose(const bitLenInt start, const bitLenInt length)
Definition: qunitclifford.hpp:521
void GetProbs(real1 *outputProbs)
Get all probabilities corresponding to ket notation.
Definition: qunitclifford.cpp:445
real1_f VarianceFloatsFactorized(const std::vector< bitLenInt > &bits, const std::vector< real1_f > &weights)
Direct measure of variance of listed bit string probability.
Definition: qunitclifford.hpp:263
void ResetPhaseOffset()
Definition: qunitclifford.hpp:219
void CY(bitLenInt c, bitLenInt t)
Apply a CY gate with control and target.
Definition: qunitclifford.hpp:307
void Copy(QUnitCliffordPtr orig)
Definition: qunitclifford.hpp:49
void Dispose(bitLenInt start, bitLenInt length)
Minimally decompose a set of contiguous bits from the separably composed unit, and discard the separa...
Definition: qunitclifford.hpp:563
void ThrowIfQubitInvalid(bitLenInt t, std::string methodName)
Definition: qunitclifford.hpp:150
friend std::ostream & operator<<(std::ostream &os, const QUnitCliffordPtr s)
Definition: qunitclifford.cpp:839
std::function< void(QStabilizerPtr unit, const bitLenInt &t, const complex *mtrx)> GateFn
Definition: qunitclifford.hpp:101
real1_f ExpVarBitsFactorized(bool isExp, const std::vector< bitLenInt > &bits, const std::vector< bitCapInt > &perms, const bitCapInt &offset=ZERO_BCI)
Definition: qunitclifford.cpp:46
void ISwap(bitLenInt c, bitLenInt t)
Swap values of two bits in register, and apply phase factor of i if bits are different.
Definition: qunitclifford.hpp:431
void CombinePhaseOffsets(QStabilizerPtr unit)
Definition: qunitclifford.hpp:56
complex GetPhaseOffset()
Definition: qunitclifford.hpp:220
void CGate(bitLenInt control, bitLenInt target, const complex *mtrx, CGateFn cfn, GateFn fn, bool isAnti)
Definition: qunitclifford.hpp:103
QInterfacePtr Decompose(bitLenInt start, bitLenInt length)
Schmidt decompose a length of qubits.
Definition: qunitclifford.hpp:554
void AntiCZ(bitLenInt c, bitLenInt t)
Apply an (anti-)CZ gate with control and target.
Definition: qunitclifford.hpp:355
virtual real1_f SumSqrDiff(QInterfacePtr toCompare)
Calculates (1 - <\psi_e|\psi_c>) between states |\psi_c> and |\psi_e>.
Definition: qunitclifford.hpp:599
complex phaseOffset
Definition: qunitclifford.hpp:44
void UpdateRunningNorm(real1_f norm_thresh=REAL1_DEFAULT_ARG)
Force a calculation of the norm of the state vector, in order to make it unit length before the next ...
Definition: qunitclifford.hpp:594
void SortUnit(QStabilizerPtr unit, std::vector< QSortEntry > &bits, bitLenInt low, bitLenInt high)
Definition: qunitclifford.cpp:360
bitLenInt Compose(QInterfacePtr toCopy)
Combine another QInterface with this one, after the last bit index of this one.
Definition: qunitclifford.hpp:528
void CZ(bitLenInt c, bitLenInt t)
Apply a CZ gate with control and target.
Definition: qunitclifford.hpp:315
QUnitClifford(bitLenInt n, const bitCapInt &perm=ZERO_BCI, qrack_rand_gen_ptr rgp=nullptr, const complex &phasFac=CMPLX_DEFAULT_ARG, bool doNorm=false, bool randomGlobalPhase=true, bool ignored2=false, int64_t ignored3=-1, bool useHardwareRNG=true, bool ignored4=false, real1_f ignored5=REAL1_EPSILON, std::vector< int64_t > ignored6={}, bitLenInt ignored7=0U, real1_f ignored8=_qrack_qunit_sep_thresh)
Definition: qunitclifford.cpp:20
void Swap(bitLenInt qubit1, bitLenInt qubit2)
Swap values of two bits in register.
Definition: qunitclifford.hpp:418
real1_f ProbMask(const bitCapInt &mask, const bitCapInt &permutation)
Direct measure of masked permutation probability.
Definition: qunitclifford.cpp:153
bool ApproxCompare(QUnitCliffordPtr toCompare, real1_f error_tol=TRYDECOMPOSE_EPSILON)
Definition: qunitclifford.hpp:608
void SetQuantumState(const complex *inputState)
Set an arbitrary pure quantum state representation.
Definition: qunitclifford.cpp:757
QInterfacePtr Clone()
Clone this QInterface.
Definition: qunitclifford.hpp:190
QStabilizerPtr MakeStabilizer(bitLenInt length=1U, const bitCapInt &perm=ZERO_BCI, const complex &phaseFac=CMPLX_DEFAULT_ARG)
Definition: qunitclifford.hpp:274
bitLenInt Allocate(bitLenInt start, bitLenInt length)
Allocate new "length" count of |0> state qubits at specified qubit index start position.
Definition: qunitclifford.hpp:566
void NormalizeState(real1_f nrm=REAL1_DEFAULT_ARG, real1_f norm_thresh=REAL1_DEFAULT_ARG, real1_f phaseArg=ZERO_R1_F)
Apply the normalization factor found by UpdateRunningNorm() or on the fly by a single bit gate.
Definition: qunitclifford.hpp:587
bitLenInt Compose(QUnitCliffordPtr toCopy, bitLenInt start)
Definition: qunitclifford.hpp:529
void MCInvert(const std::vector< bitLenInt > &controls, const complex &topRight, const complex &bottomLeft, bitLenInt t)
Apply a single bit transformation that reverses bit probability and might effect phase,...
Definition: qunitclifford.hpp:698
real1_f ExpVarFloatsFactorized(bool isExp, const std::vector< bitLenInt > &bits, const std::vector< real1_f > &weights)
Definition: qunitclifford.cpp:80
bool ApproxCompare(QInterfacePtr toCompare, real1_f error_tol=TRYDECOMPOSE_EPSILON)
Compare state vectors approximately, to determine whether this state vector is the same as the target...
Definition: qunitclifford.hpp:604
Half-precision floating-point type.
Definition: half.hpp:2222
virtual void H(bitLenInt qubit)
Hadamard gate.
Definition: qinterface.hpp:913
virtual void X(bitLenInt qubit)
X gate.
Definition: qinterface.hpp:1084
virtual void U(bitLenInt target, real1_f theta, real1_f phi, real1_f lambda)
General unitary gate.
Definition: rotational.cpp:18
virtual void Dump()
If asynchronous work is still running, let the simulator know that it can be aborted.
Definition: qinterface.hpp:2843
virtual QInterfacePtr Copy()
Copy this QInterface.
Definition: qinterface.hpp:2965
GLOSSARY: bitLenInt - "bit-length integer" - unsigned integer ID of qubit position in register bitCap...
Definition: complex16x2simd.hpp:25
std::shared_ptr< QInterface > QInterfacePtr
Definition: qinterface.hpp:29
const real1_f _qrack_qunit_sep_thresh
Definition: qrack_functions.hpp:235
QRACK_CONST real1_f TRYDECOMPOSE_EPSILON
Definition: qrack_types.hpp:260
void U(quid sid, bitLenInt q, real1_f theta, real1_f phi, real1_f lambda)
(External API) 3-parameter unitary gate
Definition: wasm_api.cpp:1143
std::complex< real1 > complex
Definition: qrack_types.hpp:128
std::shared_ptr< QUnitStateVector > QUnitStateVectorPtr
Definition: qunitstatevector.hpp:17
QRACK_CONST real1 FP_NORM_EPSILON
Definition: qrack_types.hpp:258
bitCapInt pow2(const bitLenInt &p)
Definition: qrack_functions.hpp:136
std::shared_ptr< QUnitClifford > QUnitCliffordPtr
Definition: qunitclifford.hpp:20
double norm(const complex2 &c)
Definition: complex16x2simd.hpp:101
QRACK_CONST real1 REAL1_EPSILON
Definition: qrack_types.hpp:200
QRACK_CONST complex ONE_CMPLX
Definition: qrack_types.hpp:252
QRACK_CONST real1 ONE_R1
Definition: qrack_types.hpp:185
float real1_f
Definition: qrack_types.hpp:95
QRACK_CONST complex CMPLX_DEFAULT_ARG
Definition: qrack_types.hpp:257
std::shared_ptr< QStabilizer > QStabilizerPtr
Definition: qstabilizer.hpp:42
QRACK_CONST complex I_CMPLX
Definition: qrack_types.hpp:254
QRACK_CONST complex ZERO_CMPLX
Definition: qrack_types.hpp:253
const bitCapInt ONE_BCI
Definition: qrack_types.hpp:129
const bitCapInt ZERO_BCI
Definition: qrack_types.hpp:130
#define IS_SAME(c1, c2)
Definition: qrack_types.hpp:26
#define REAL1_DEFAULT_ARG
Definition: qrack_types.hpp:177
#define bitLenInt
Definition: qrack_types.hpp:38
#define ZERO_R1_F
Definition: qrack_types.hpp:160
#define qrack_rand_gen_ptr
Definition: qrack_types.hpp:156
#define bitCapInt
Definition: qrack_types.hpp:62
#define ONE_R1_F
Definition: qrack_types.hpp:163
Definition: qunitclifford.hpp:23
QStabilizerPtr unit
Definition: qunitclifford.hpp:25
CliffordShard(const CliffordShard &o)
Definition: qunitclifford.hpp:34
bitLenInt mapped
Definition: qunitclifford.hpp:24
CliffordShard(bitLenInt m=0U, QStabilizerPtr u=NULL)
Definition: qunitclifford.hpp:27
Definition: qunitclifford.hpp:66
bool operator>(const QSortEntry &rhs)
Definition: qunitclifford.hpp:70
bitLenInt bit
Definition: qunitclifford.hpp:67
bool operator<(const QSortEntry &rhs)
Definition: qunitclifford.hpp:69
bitLenInt mapped
Definition: qunitclifford.hpp:68