# estimated_krylov_subspace_dimension¶

static OperationNamespace.estimated_krylov_subspace_dimension(spectral_range, duration, maximum_segment_duration, error_tolerance=1e-06, *, name=None)

Estimates the dimension of the Krylov subspace to be used in the Lanczos integrator for a given bound on the total error in the integration.

You can use this function to find a proper dimension of the Krylov subspace for state propagation using the Lanczos algorithm. Note that you can provide your own estimation of the Hamiltonian spectral range or use the spectral_range operation to perform that calculation.

Parameters
• spectral_range (Union[Tensor, float]) – Estimated order of magnitude of Hamiltonian spectral range (difference between largest and smallest eigenvalues).

• duration (float) – The total evolution time.

• maximum_segment_duration (float) – The maximum duration of the piecewise-constant Hamiltonian segments.

• error_tolerance (float, optional) – Tolerance for the error in the integration, defined as the Frobenius norm of the vectorial difference between the exact state and the estimated state. Defaults to 1e-6.

• name (str, optional) – The name of the node.

Returns

Estimated dimension of the Krylov subspace for integration.

Return type

Tensor