Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
**This notebook implements the same model that appears under vlasov_ampere.ipynb example, using qiskit. This is the code used to collect the benchmarking data in the paper**. In particular, it contains: Definition of a qiskit code for the block-encoding, verification of the block-encoding functionality, and definition of QSVT step with qiskit, operating on the block-encoding unitary. The results were obtained using Qiskit version 2.1.

Adding inplace adder and assign_amplitudes with Qiskit

These are missing in Qiskit library.

Setting problem parameters

Functions for getting quantum circuits (“gates”) to construct the block encoding

Circuits for the Advective part

Circuits for off-diagonal terms

Block-encoding of the full matrix

Verification

For the given problem size, N_X, N_V= 3, 3, we construct the classical matrix A+iωA+i\omega that we block-encoded via a quantum circuit UA+iωU_{A+i\omega}. Then for some random initial state ψ|\psi\rangle we verify that indeed: UA+iωψ0block=(A+iω)ψ0block+garbageU_{A+i\omega} |\psi\rangle |0\rangle_{\rm block} = (A+i\omega)|\psi\rangle|0\rangle_{\rm block}+{\rm garbage}

Classical matrix

Output:
We compare the projected state on 0block|0\rangle_{\rm block} with the expected classical result (in absolute value)
output We also compute the norm for the difference between the results
Output:

QSVT step

Output: