This repository contains the code to compute the cost of implementing quantum simulation using Commutator-free quasi-Magnus (CFQM) operators, originally introduced in Fourth- and sixth-order commutator-free Magnus integrators for linear and non-linear dynamical systems (see pdf here) such as:
with
This repository has the following structure
- The cost estimation cost is found in folder
CFQMagnus/
, - while
coefficients/
contains the coefficients of the CFQMs (seeCFQMagnus/compute_coefficients.py
for their preparation), - and
results/
saves the error-per-step incurred simulating the CFQM when using time steph
.
The main files can are magnus_errors.py
, containing the primitives that we need to compute their cost; and main.py
, where we compute the error-per-step of each CFQM, which are saved to results/
.
The cost minimizaton and associated paper figure generation can be implemented using the figure generation files in CFQMagnus/figure_generation/
.
We additionally included a file CFQMagnus/pennylane_simulation.py
providing an example of how to implement time simulation of a CFQM in Pennylane, using a Heisenberg model for the sake of an example.
Navigate to the root directory of this repository and run
pip install -e .
You may also create a new conda environment before this, though the packages we use are standard ones and can be found in the requirements.txt
.
Find the article in Quantum simulation of time-dependent Hamiltonians via commutator-free quasi-Magnus operators
@misc{casares2024quantum,
title={Quantum simulation of time-dependent Hamiltonians via commutator-free quasi-Magnus operators},
author={Pablo Antonio Moreno Casares and Modjtaba Shokrian Zini and Juan Miguel Arrazola},
year={2024},
eprint={2403.13889},
archivePrefix={arXiv},
primaryClass={quant-ph}
}