MCPcopy Create free account
hub / github.com/ResearchCodesHub/QuantumGeneticAlgorithms / Measure

Function Measure

QGA.py:101–111  ·  view source on GitHub ↗
(p_alpha)

Source from the content-addressed store, hash-verified

99#########################################################
100# p_alpha: probability of finding qubit in alpha state
101def Measure(p_alpha):
102 for i in range(1,popSize):
103 print()
104 for j in range(1,genomeLength):
105 if p_alpha<=qpv[i, j, 0]:
106 chromosome[i,j]=0
107 else:
108 chromosome[i,j]=1
109 print(chromosome[i,j]," ",end="")
110 print()
111 print()
112
113#########################################################
114# FITNESS EVALUATION #

Callers 1

Q_GAFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected