View on GitHub
Open this notebook in GitHub to run it yourself
The Vlasov-Ampère System
We consider a linearized 1D Vlasov-Ampère system with an external driving current. This system governs how perturbations to a background plasma evolve in phase space under the influence of electric fields. The equations are:Physical Meaning and Assumptions
- is the first-order perturbation of the distribution function from equilibrium. It captures how particles deviate from their steady-state behavior: .
- is the (complex) electric field.
- is a known source term (e.g. external driving or antenna).
- encodes non-reflecting boundary conditions:
- for outgoing waves.
- for incoming waves.
- All variables in the equation were normalized such that we get dimensionless equations (see more details in the paper).
Discretizing the variables and leads to very large linear systems. Upon discretization, they form a structured linear system suitable for block encoding, making them compatible with quantum linear solvers. In the next sections, we will show how to construct block encoding for the equations using classiq, then plug it to a linear solver (QSVT in this case) to solve a certain toy problem. We emphasize that due to the dependence of the linear system solver on the condition number - , and the dependece of the condition number in the grid size, we don’t expect any quantum advantage for the 1D system. However, generalizing for higher dimensional systems should be straightforward thanks to the high level modeling approach.
Block Encoding of the Linear System

Data Encoding
We define a quantum struct that will define the mapping of the coordinates to the effective block-encoded matrix of the problem:v holds the velocity coordinate as a signed number, as the velocity can hold negative values as well.
x holds the position coordinates. It will encode a non-negative number in the range
The value E switches between the encoding of (for E=0) and (for E=1, v=0).
Notice that the values E=1, v!=0 are redundant (in fact we could eliminate them through the projector of the block encoding, but we keep them as they don’t change the reuslt).
The block variable needed by each block encoding is managed automatically by the BlockEncoding combinators (+, @, weighted_sum, tensor_product) as we compose them below.
Now we are ready to block encode all parts of the equation. We show how to block encode each part, as well as the final matrix, using block encoding built-in implementations and block encoding arithmetics. Let us look again on the equations: The matrix we encode will have a row for each ‘s degree of freedom, and a row for each dof. The columns represent the participating terms in each equation.
Block Encoding: Advective Term
Notice that the advective term is in the upper left corner of the block encoded matrix (as it only involves ). Ignoring part, the term is a tensor product of 2 block encodings - a diagonal encoding, and a derivative term.Derivative Term
The derivative term consists of normal finite-difference rule intermediate x points. At the boundaries of , the derivative is according to a 2nd order interpolating polynomial (as described in the paper Eqs.19). We decompose it as a sum of 2 matrices: The first matrix is a 1D x-derivative with dirichlet boundary conditions, a matrix composed by constant diagonals.x variable to take care for both edges of the system.
It is assumed that the size of x in qubits is at least
Diagonal Term
The velocity coordinate (scaled by and signed) is a diagonal matrix in the basis.BlockEncoding.from_dense_diagonals builds this directly from the array of diagonal values.
Non-Reflecting Boundary Conditions
The term is enforcing non-reflecting boundary conditions, not allowing incoming waves to the system:v_encoding and derivative_be, then multiply by zeta_be to enforce the non-reflecting boundary conditions.
Since the action factors into an operation on (, from v_encoding) and one on (, from derivative_be), i.e. , we combine them with BlockEncoding.tensor_product(v_encoding, derivative_be).
Throughout this notebook we write for tensor_product(be_A, be_B), with acting on the low-order (least-significant) qubits and on the high-order qubits - matching BEData’s bit order.
Multiplying by zeta_be (diagonal in ) then gives
Eliminating the Lower-Right Block (E = 1)
SinceE distinguishes between the block (E=0) and the -field block (E=1), and the advective term only acts on , we need to zero out the E=1 rows and columns. e0_encoding is the block encoding of the projector onto E=0, i.e. .
Taking its tensor product with advective_encoding (as the low-order factor, matching BEData’s (v, x, E) bit order) gives the block encoding of the full advective term:
Block Encoding: Off Diagonal Terms
Block encode the force and current terms, corresponding to the upper right and lower left blocks.Loading the Force Term
In our setting It is a column vector in the matrix, and to load it we have several options. One is to first load one of them ( or as a state, then use amplitude loading of the other one to create a block encoding of the multiplication. A second option that we use here is to directly prepare the state of the multiplication. The advantage is a better scaling factor. It can be performed as suggested here [3] (though for this specific method there would still be a scaling factor issue). For simplicity we use here the general state preparation method (which is not scallable). Finally, we zero the columns for whichv != 0, beacuse we want only columns that encode the field .
Current Term
The current term is an integration, represented by row multiplication: To load v, a linear state-preparation is enough. This can be done using the method in [4]. Because we only have equations with this term for the degrees of freedom, we zero columns wherev != 0.
control/else on the E qubit.
Since each term is normalized to its own scale, we also rebalance them to a common scale using a diagonal block encoding of diag(force_be.alpha, current_be.alpha) on the E qubit.
We first define a helper function that encodes two block encodings on the upper-right and lower-left of a bigger matrix.
The bigger matrix is defined by the MSB of the data variable (the E field in our case).
BEData’s bit order) builds it directly:
where and are the (rank-1, column/row) operators encoded by force_term_be/current_term_be.
Full Block Encoding
The full block encoding is just a combination of all the terms. Notice that apart from the upper-left and off-diagonal blocks, we have a diagonal term .Output:
Inspecting the Block Encoding
BlockEncoding.to_matrix() reconstructs the encoded matrix directly via statevector simulation.
show the resulting block encoding:
Output:
Output:

Linear Solver Using QSVT Matrix Inversion
Now we use the block encoding to solve the equation. We only left to encode the external source we want to solve for as initial state, and apply matrix inversion on the it. Because the condition number of the resulting matrix is high for our simulation, we limitied ourselves for small grid size, on which the problem solution is not physical, though we show it for educational purposes.Initial State Loading
We solve for a source term localized at , according to the following formula:Matrix Inversion via QSVT
BlockEncoding.inverse() builds the QSVT-based matrix inversion directly from full_be_encoding, given the matrix’s condition number (kappa) and a target polynomial degree.
Output:
Full QSVT Circuit

inv_be.unitary() already wraps the QSVT projector and phase sequence internally, so main only needs to prepare the source term and call it.
Output:
Output:
Post-Process
Here we plot the resulting vector.
Output:

Compare to a Classical Solver
Output:
