From 41e7e8be4faa6f1a96f217562b66844d534bf43f Mon Sep 17 00:00:00 2001 From: Pedro Ripper Date: Tue, 28 May 2024 23:40:12 -0300 Subject: [PATCH] Update readme [no ci] --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index cb18556..2da1001 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,22 @@ for i = 1:result_count(model) end ``` +## Updating optimization parameters + +```julia +# Number of shots +MOI.set(model, VQE.NumberOfReads(), 1000) # or QAOA.NumberOfReads + +# Maximum optimizer iterations +MOI.set(model, VQE.MaximumIterations(), 100) # or QAOA.MaximumIterations + +# Ansatz +MOI.set(model, VQE.Ansatz(), QiskitOpt.qiskit.circuit.library.EfficientSU2) # or QAOA.Ansatz + +# Number of QAOA ansatz repetitions (for QAOA only) +MOI.set(model, QAOA.NumberOfLayers(), 5) +``` + ## Changing the backend and instance @@ -53,6 +69,8 @@ MOI.set(model, VQE.IBMFakeBackend(), QiskitOpt.qiskit_ibm_runtime.fake_provider. ``` +List of fake backends available: [Qiskit Documentation](https://docs.quantum.ibm.com/api/qiskit-ibm-runtime/fake_provider#fake-backends) + ## API Token To access IBM's Quantum Computers, it is necessary to create an account at [IBM Q](https://quantum-computing.ibm.com/) to obtain an API Token and run the following python code: