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

qubops

QUBOPS

qubops allows solving polynomial system of equations using a QUBO formalism. An example can be found here

Installation

To install qubops from GitHub repository, do:

git clone https://github.com/QuantumApplicationLab/qubops.gitcd qubopspython3 -m pip install .

Example

fromqubops.qubops_mixed_varsimportQUBOPS_MIXEDfromqubops.encodingsimportPositiveQbitEncodingfromqubops.solution_vectorimportSolutionVector_V2asSolutionVectorfromqubops.mixed_solution_vectorimportMixedSolutionVector_V2asMixedSolutionVectorfromdwave.samplersimportSteepestDescentSolverdefdefine_matrices():
"""function that creates the polynom matrices for the system."""# see documentation for more informationreturnmatrices# define the encoding for the first two varialbesnqbit=5step=0.05encoding1=PositiveQbitEncoding(nqbit=nqbit, step=step, offset=0, var_base_name='x')
sol_vec1=SolutionVector(2, encoding=encoding1)
# define the encoding for the alst two variables nqbit=4step=0.05encoding2=PositiveQbitEncoding(nqbit=nqbit, step=step, offset=0, var_base_name='x')
sol_vec2=SolutionVector(2, encoding=encoding2)
# define the solution vectorsol_vec=MixedSolutionVector([sol_vec1,sol_vec2])
# instantiat the QUBOPS solveroptions= {'num_reads':10000, 'sampler':SteepestDescentSolver()}
qubo=QUBOPS_MIXED(sol_vec, options)
sol=qubo.solve(define_matrices(), strength=1E5)

Contributing

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

Credits

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

About

Polynomial System Solver using QUBO

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages