hqs_quantum_solver.interface

hqs_quantum_solver.interface#

Implementations of interface functions to allow quick use of the internal classes.

This submodule aims to provide interfaces so that hqs_quantum_solver can be slotted into other packages or vice versa.

Copyright © 2023-2024 HQS Quantum Simulations GmbH. All Rights Reserved.

Functions

scipy_linear_operator_helper(operator)

Create a SciPy LinearOperator from a Quantum Solver operator (Deprecated).

scipy_operator_adapter(operator)

Create a SciPy LinearOperator from a Quantum Solver operator.

scipy_linear_operator_helper(operator: OperatorProtocol) LinearOperator#

Create a SciPy LinearOperator from a Quantum Solver operator (Deprecated).

Attention

Function is Deprecated: Use scipy_operator_adapter() instead.

scipy_operator_adapter(operator: OperatorProtocol) LinearOperator#

Create a SciPy LinearOperator from a Quantum Solver operator.

This is a simple wrapper function to allow direct use with SciPy’s LinearOperator.

Parameters:

operator (OperatorProtocol) – Any operator satisfying the OperatorProtocol.

Returns:

The operator as a SciPy LinearOperator.

Return type:

LinearOperator