-
Notifications
You must be signed in to change notification settings - Fork 4
GA‐QAS: folder result
Vu Tuan Hai edited this page May 20, 2024
·
1 revision
The result of the GA-QAS algorithm will be saved automatically per generation with the below structure:
folder_name
│ best_circuit_0.qpy
│ best_circuit_1.qpy
│ ...
| best_circuit_n.qpy
| circuit_0_1.qpy
| circuit_0_2.qpy
| ...
| circuit_n_m.qpy
| funcs.json
| metadata.json
-
best_circuit_i.qpy
is the best circuit at generation$i^{th}$ . -
circuit_i_j.qpy
is the$j^{th}$ circuit at generation$i^{th}$ . -
funcs.json
save:
{
"fitness_func",
"crossover_func",
"mutate_func",
"selection_func",
"threshold_func"
}
-
metadata.json
save:
{
"num_qubits",
"depth",
"num_circuit",
"num_generation",
"current_generation",
"fitnessss": [[...]],
"best_fitnesss": [...],
"prob_mutate"
}
Where qpy
files can be loaded by the qoop.utilities.load_circuit()
method, metadata.json
saves all important information. Others file serve for loading EEnvironment object.
GA-QAS will consume much time in case of a high number of qubits/generation/circuit because it needs to run fitness function
env = EEnvironment.load("folder name")
env.evol()
In case you want to run in more generations, you must set a new number of generations, then call evol()
method:
env.set_num_generation(100)
env.evol()
Copyright @ 2024 Hai et al
- Home
- Contribute guideline
- Installation guideline
- Package requirements
- Core
- GA-QAS
- Example
- Advanced