pyriemann_qiskit.optimization.docplex.QAOACVAngleOptimizer¶
- class pyriemann_qiskit.optimization.docplex.QAOACVAngleOptimizer(create_mixer=None, n_reps=3, quantum_instance=None, optimizer=None)[source]¶
QAOA with continuous variables encoded in state vector angles.
This optimizer encodes continuous variables directly in the angles/phases of the quantum state vector, rather than converting them to binary variables and using probability distributions.
- Parameters:
create_mixer (Callable[int, QuantumCircuit], default=create_mixer_rotational_X_gates(0)) – A delegate that takes into input an angle and returns a QuantumCircuit.
n_reps (int, default=3) – The number of repetitions for the QAOA ansatz. It defines how many time Mixer and Cost operators will be repeated in the circuit.
quantum_instance (QuantumInstance, default=None) – A quantum backend instance. If None, AerSimulator will be used.
optimizer (SciPyOptimizer, default=L_BFGS_B(maxiter=100, maxfun=200)) – An instance of a scipy optimizer to find the optimal weights for the parametric circuit (ansatz).
Notes
Added in version 0.5.0.
- state_vector_¶
State vector of the optimized quantum circuit (optimal parameters assigned to the parametric gates).
- Type:
StateVector
See also
pyQiskitOptimizer,QAOACVOptimizer,create_mixer_rotational_X_gatesMethods
__init__([create_mixer, n_reps, ...])convert_spdmat(X)Convert a SPD matrix
get_weights(prob, classes)Get weights variable
prepare_model(qp)Prepare model by storing variable bounds.
solve(prob[, reshape])Solve the docplex problem.
spdmat_var(prob, channels, name)Create docplex matrix variable