Repository to run real experiments, simulated experiments, and purely numerical calculations for QuEra's Aquila device for our paper (arXiv:https://arxiv.org/abs/2604.24854)
This code is not yet refined enough to contain a tutorial for using AWS Braket, so if you have any questions about that in particular or want to discuss other parts of the code, please contact me at oscar.scholin@physics.ox.ac.uk or orsa2020@mymail.pomona.edu.
For AWS, we enforce Python 3.10.20 (this is handled in the S3 environment creation during hybrid job; otherwise we run into errors submitting programs to Aquila). For classical backend simulation, we use Python 3.12.2.
main_expt_plot.py- I use a hash code to reference the input configuration to bloqade -- this is denoted by files with the name structure
task_{uid}.json, which are stored insidedir_main/tasks/*subdirectory. Tasks have corresponding stem_tasks which record the overall structure of the hamiltonian but not the specifich_ivalues orseq_lsthat are actually executed. - Task and stem ids can be generated using
_get_task run_for_N_protocolis the lowest level of the plotting functions -- it callsprocess_rbp.pyafter reading the taskstime_disorder_protocolis the next-highest level plotting function we use that actually creates the figures- the main function to call that specifies all the tasks and experimental timestamps to pass to
time_disorder_protocolismain_expt_figswhich takes as argumentsopt=='sim'for simulated bloqade andopt=='expt'for experimental tasks. - to run parallelised T2star simulations use
main_T2star_paralleland thencompile_T2starto recombine the data into the main directory
- I use a hash code to reference the input configuration to bloqade -- this is denoted by files with the name structure
task_submission_main.py-schedule_run_all_chunksis the main, high level function to run experiments on Aquila. automatically checks to avoid submitting during the calibration period so all data can be run together - First in an AWS environment, runoption=="RUN"with_FORCE_TRY_HYBRID == Trueto initialise hybrid job and submit quantum tasks via braket. Then, runoption=="SAVE"but_FORCE_TRY_HYBRID == Truewhile still in the AWS environment to fetch the.jsonand return results as.npy. The directory now may be zipped and downloaded to your local machine for further processing. -requirements_revised.txtis used to setup the- helpers
cancel_all_tasks.py- terminates all actively queued tasks in amazon braket
cancel_task_arn.py- terminates specific hybrid task given arn
make_tasks_table.py- compile results of quantum tasks submitted to braket
parse_majd_calib.py- compile QuEra calibrations and compare against our own
manual_download.py- download the S3 bucket containing the hybrid task result
chain_benchmark.py,diagnose_driver.pyare helper functions for the Rabi oscillation calibration which is called inrun_for_N_protocol
master_params_rbp.py- called by
task_submission_main.py: contains funcs to create task uids (read_expt_taskhashes the input parameters to the Hamiltonian and other input configs; the hashing is done byQuEraToolbox.expt_file_manager.py), and to execute these tasks on simulated backend or on AWS hardware (execute_bloqade_task)
- called by
process_rbp.pyprocess_bitstringsis the main function of this file: tasks a list ofh_lsandseq_lsextracted from the task by functions inmain_expt_plot(run_for_N_protocol); first calls the respective functions to gather simulated or experimental bitstrings and then in lines 1965 - 1974 will helper functions to actually calculate the purity (est_purity). Includes support for T2* uncertainty (bloqade simulator and qutip) and T2 dephasing noise (qutip only).get_all_qutip_probsis the main function for qutip emulation tasksget_all_single_hams_randis the main function for bloqade (emulation and simulation) tasks; callsget_single_ham_randfor individualh_ilist, which calls
numericalcomputes numerically the second order renyi entropy including the time dependent ramp structure of the experiment but excluding the randomised measurements
random_bp_prep.py- lowest level file to run experiments (or emulate) on Aquila. (!!!!!)
expt_runis the main function of this file: data is either loaded if the corresponding files exist (either the.jsonfrom Braket or the.npyfrom our processing) or the program is compiled usingcompile_program_oneUwhich gets the initial ramp up, plateau, ramp down andcompile_rand_seqwhich intersplices the randomised phi-flip sequence.random_bp_qutip.pyemulates this function but also includes option for T2 modeling
expt_file_manager.py- hashes an input dict with json-friendly keys and values through the object
ExptStore
- hashes an input dict with json-friendly keys and values through the object
hamiltonian.py- defines the Aquila hamiltonian in QuTip with helpers for ramp structures -- main function is the function factory
drive_main
- defines the Aquila hamiltonian in QuTip with helpers for ramp structures -- main function is the function factory
helper_rbp.py- contains the functions to estimate purity using the randomised measurement toolbox formula (
est_purity) and apply readout error to numerical probability vectors (apply_readout_channel)
- contains the functions to estimate purity using the randomised measurement toolbox formula (
-
fig_supplemental_signatures.py- all figures shown in the Supplemental Information, which focus on the ergodicity to localisation transition
-
fig1_single_qubit_chain.py- illustrative figure to show the growth of entanglement for Fig 1 in paper
-
fig2_randmeas.py- Fig 2 in the paper to illustrate the behavior of the
$phi$ -quench gates at single qubit level.
- Fig 2 in the paper to illustrate the behavior of the
-
appendix_spectrum.py- computes the median eigenvalue as a function of the mean local detuning
DOI 10.5287/ora-dow5oapxe contains all the data needed to reproduce the figures in the main text of the paper. Due to upload size constraints we have to separate the main directory paper_main_data into two .zip files: data.zip and paper_main_data_rest.zip.
Inside data/, the following files can be found:
-
full_expt_{task_id}_{timestamp}: experimental data from Aquila for the hash identifiertask_id(seetasks/task_{task_id}.json) and the integer timestamp -
bloqade-sim-no-rc_{task_id}_{0}: simulated data for the tasktask_idfor the noiseless emulation of experimental protocol -
avg_{uid}.npyandresult_{uid}.npy: simulated data for the tasktask_idfor noisy emulation of experimental protocol including readout error and$T_2^*$ effects. Note, the meaning of the uid can be determined by accessing the corresponding{uid}.jsonfile inpaper_main_data_rest/combos/
In paper_main_data_rest are subdirectories that specify:
- the tasks/* for all tasks and stem tasks needed for the experiments, as called in main_expt_plot.py
- the combos/* which explain the input dict to generate the hashes
- the supporting mdata and ndata for the plots,
- and the results/* themselves
expt_tasks.zip contains the expt_tasks directory needed to run main_T2star_parallel