View on GitHub
Open this notebook in GitHub to run it yourself
Defining the Problem
- Input: a system of linear homogenous linear equations (ODEs):
- Output: a state that is proportional to the solution at time , .
Describing the Algorithm
The algorithm divides the timeline into long timesteps and short timesteps. In each long timestep, some approximation of evolution of the short timesteps is done, such as the Truncated Dyson series [2] or Magnus series [3]. These are applied as block-encodings on the state, where the following matrix is block-encoded in each long timestep:
Implementing the Algorithm Using Classiq

- The first-order Magnus expansion will be exact.
- The QSVT and QET (quantum eigenvalue transform) will coincide, and we use it to exponentiate the block-encoding.
Classical Simulation
This is how the evolution looks classically:
Time-dependent Block-encoding
The time-dependent block-encoding of : For a given timeslice, we get this: We accomplish this easily with a sequence of two Pauli rotations:Short Time Evolution
We use a first-order Magnus expansion, which is exact in this case: It is built in two steps.- Riemannian Summation of Short Timesteps

- Block-Encoding of the Summation Exponential
Output:

qsvt_phases function, and plug them into the qsvt_lcu function, which is optimized for implementing a linear combination of two QSVT sequences:
Amplification of a Single Long Timestep
At the climax of the algorithm, we wrap the Magnus evolution in an amplification step. The prefactor of the exponential block-encoding is 2, so we want to approximate the function in the interval . We use Classiq’s qsp_approximate to obtain the polynomial approximation. Our built-in routine is inspired by the paper’s approach: it solves a minimax problem to determine the Chebyshev coefficients on a subinterval of , while ensuring the resulting polynomial remains bounded on the entire interval.Singular Value Amplification ()

Long Time Evolution
Lastly, we sequentially apply the block-encodings of each timeslice. To have a quantum variable that is when all the block encodings are applied to the state, we use a counter. A further amplitude amplification step is possible using the counter; however, we do not do it here.
Output:
Comparing to the Naive Case: Without Uniform Amplification
Here we do not use the amplification step. We see that the measured amplitudes are much smaller than in the amplified case.Output:
Post-processing
Output: