MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / initPlusState

Function initPlusState

quest/src/api/initialisations.cpp:59–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58
59void initPlusState(Qureg qureg) {
60 validate_quregFields(qureg, __func__);
61
62 // |+> = sum_i 1/sqrt(2^N) |i> where 2^N = numAmps
63 // |+><+| = sum_ij 1/2^N |i><j| where 2^N = sqrt(numAmps)
64 qcomp amp = 1.0 / std::sqrt(qureg.numAmps);
65 localiser_statevec_initUniformState(qureg, amp);
66}
67
68
69void initPureState(Qureg qureg, Qureg pure) {

Callers 5

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

validate_quregFieldsFunction · 0.85

Tested by

no test coverage detected