The notebooks implement the idea in [1] (see the experiments therein) and extend the application of classical shadows to each iteration of VQE.
The notebooks are complete.
Requires the package predicting-quantum-properties from [2].
There are a total of six files that calculate the electronic structure problem:
- electronic_structure_problem_dcs.ipynb : Electronic structure problem with shadow (derandomized) applied on the optimal set of angles only. This is the original idea in [1].
- electronic_structure_problem_rcs.ipynb : Electronic structure problem with shadow (randomized) applied on the optimal set of angles only.
The below files on the other hand apply classical shadow in each cost function evaluation of VQE:
- vqe_rcs_qiskit.ipynb : Electronic structure problem using VQE with the vanilla classical shadow (i.e. randomised basis change).
- vqe_rcs_qiskit_optimized.ipynb: As above but with optimization.
- vqe_dcs_qiskit.ipynb : Electronic structure problem using VQE with ``derandomised'' classical shadow (i.e. derandomised Hamiltonian used for basis change).
- vqe_dcs_qiskit_optimized.ipynb : As above but with time optimization.
Calculations using the optimized versions take significantly less time than with the non-optimised versions.
File modified_derandomization.py contains a modified version of the file 'data_acquisition_shadow.py' in the package 'predicting-quantum-properties' [2]. This modification allows the user to specify the number of derandomised operators to be generated. In the original version [2], the user had to specify the number of evaluations per observable, which did not allow for control over the total number of generated operators.
The folder experimental-results contains the experimental results for the molecules
The notebooks are based on the theory described in [1].
The code was written by Renata Wong (https://renatawong.github.io/).
This work benefited greatly from discussions with Prof. Hsi-Sheng Goan (National Taiwan University), Prof. Hao-Chung Cheng (National Taiwan University), Prof. Jyh-Pin Chou (National Changhua University of Education), Michał Stęchły (PsiQuantum), and Hsin Yuan (Robert) Huang (California Institute of Technology). All remaining deficiencies are my own.
[1] Hsin-Yuan Huang, Richard Kueng, and John Preskill, Efficient estimation of Pauli observables by derandomization, https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.127.030503
[2] Hsin-Yuan Huang, Predicting quantum properties, https://github.com/hsinyuan-huang/predicting-quantum-properties
License Apache License 2.0