Skip to content
This repository was archived by the owner on Aug 19, 2026. It is now read-only.

Repository files navigation

Platformgithub repo badgegithub license badgePythonCode style: BlackTestsCoverage Status

Quantum Newton Raphson

The QuantunNewtonRaphson allows to offload the gradient calculation of the Newton-Raphson algorithm to a variety of quantum linear solvers.

Installation

To install quantum_newton_raphson from GitHub repository, do:

git clone git@github.com:QuantumApplicationLab/quantumnewtonraphson.gitcd quantumnewtonraphsonpython -m pip install .

Example

fromqiskit.primitivesimportEstimator, Samplerfromquantum_newton_raphson.newton_raphsonimportnewton_raphsonfromquantum_newton_raphson.hhl_solverimportHHL_SOLVERdeffunc(input):
"""non linear function to be solved: func(x) = 0."""
...
returnoutputestimator=Estimator()
sampler=Sampler()
# define the linear solver with the reorder solversolver=HHL_SOLVER(estimator=estimator, sampler=sampler)
# Solve the newton raphson problemres=newton_raphson(
func, np.random.rand(2), linear_solver=solver, verbose=True, max_iter=25
)

Contributing

If you want to contribute to the development of quantum_newton_raphson, have a look at the contribution guidelines.

Credits

This package was created with Cookiecutter and the NLeSC/python-template.

About

Quantum Newton Raphson Solver

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages