This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Targetting a QPU is extremly easy | |
rigetti_aspen_m2 = create_device(location='qcs', name='Aspen-M-2', **qcs_credentials) | |
q.set_device(rigetti_aspen_m2) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openqaoa.problems.problem import NumberPartition | |
from openqaoa.devices import create_device | |
from openqaoa.workflows.optimizer import QAOA | |
# Create the problem statement | |
np_qubo = NumberPartition(numbers=[5,6,7,4]).get_qubo_problem() | |
# Set up the QAOA object and customise it | |
q = QAOA() |