Disse Sied is noch nich översett. Se kiekt de engelsche Originalversion an.
Sample-based Krylov Quantum Diagonalization (SKQD)
This lesson on Sample-based Krylov quantum diagonalization (SKQD) combines methods explained in previous methods. It consists of a single example leveraging the Qiskit patterns framework:
- Step 1: Map problem to quantum circuits and operators
- Step 2: Optimize for target hardware
- Step 3: Execute using Qiskit Primitives
- Step 4: Post-process
An important step in the sample-based quantum diagonalization method is to generate quality vectors for the subspace. In the previous lesson, we used the LUCJ ansatz to generate subspace vectors for a chemistry Hamiltonian. In this lesson, we will use quantum Krylov states[1] as was discussed in lesson 2. First, we will review how to create the Krylov space on a quantum computer using time evolution operations. We will then sample from it. We will project the system Hamiltonian onto the sampled subspace and diagonalize it to estimate the ground state energy. The algorithm provably and efficiently converges to the ground state, under the assumptions described in lesson 2.
0. The Krylov space
Recall that a Krylov space of order is the space spanned by vectors obtained by multiplying higher powers of a matrix , up to , with a reference vector .
If the matrix is the Hamiltonian , the corresponding space is called the power Krylov space . In the case where is the time-evolution operator generated by the Hamiltonian , the space is referred to as the unitary Krylov space . The power Krylov subspace cannot be generated directly on a quantum computer as is not a unitary operator. Instead, we can use the time-evolution operator which can be shown to give similar convergence guarantees as the power Krylov space. Powers of then become different time steps where .
1. Map problem to quantum circuits and operators
In this lesson, we consider the Hamiltonian for the antiferromagnetic XX-Z spin-1/2 chain with sites with the periodic boundary condition:
# Added by doQumentation — required packages for this notebook
!pip install -q matplotlib numpy qiskit qiskit-addon-sqd qiskit-addon-utils qiskit-ibm-runtime
from qiskit.transpiler import CouplingMap
from qiskit_addon_utils.problem_generators import generate_xyz_hamiltonian
num_spins = 22
coupling_map = CouplingMap.from_ring(num_spins)
H_op = generate_xyz_hamiltonian(coupling_map, coupling_constants=(0.3, 0.3, 1.0))
To construct the Krylov space, we need three main ingredients:
- A choice of Krylov dimension () and time step ().
- An initial (reference) state (vector