Here contains code about optimizing quantum circuit for quantum metrology.
Below is an example of 1-qubit circuit to be optimized.
This repository is the revised version of original source code written by iridescent0923
Currently fixing about multi-qubit optimization.
git clone https://github.com/kist-qeg/revised_optimization.git
pip install -r requirements.txt
-
num_qubit: Determines number of qubits in the circuit.
-
freq: Detuning frequency. This argument determines CFI's speed of oscillation, while vanished by parameter optimization.
-
t2: Dephasing time. This argument determines the speed of dephasing. The smaller, the faster.
-
gamma: Post-selection factor, ranged from 0 to 1, which determines rate of post-selection.
-
t_obs: Time length to observe.
-
num_points: number of time points in t_obs to observe
-
opt: Optimization method. Currently 'LBFGS' and 'Adam' are available.
-
steps_per_point: Maximum optimization steps per time point.
-
patience: Maximum patience count of optimization. Early stopping is activated if CFI's amount of change is consecutively smaller than threshold for "patience count" times
-
threshold: Determines precision of optimization. The smaller threshold is, the better it optimizes, but it could lengthen the total running time.
-
save_to: File path to save result data.
python main.py [config file's name (.yaml)]
- There is a close relationship between the threshold and patience. Patience determines number of iteration to move on to the next timepoint if loss function value has not changed larger than threshold. If you set the threshold value low, it is recommended not to set the patience value too high. Otherwise, it may lead to longer execution times.
Here is single qubit optimization result with post-selection gamma = 0.5 dotted line labeled "Reference" is optimized result with gamma = 0
Improvements of data visualization2,3,4-qubit circuit updateAdd test results in READMEAdd notebook tutorial

