pyriemann_qiskit.optimization.docplex.QAOACVOptimizer¶
- class pyriemann_qiskit.optimization.docplex.QAOACVOptimizer(create_mixer=<function create_mixer_rotational_X_gates.<locals>.mixer_X>, n_reps=3, quantum_instance=None, optimizer=<qiskit_algorithms.optimizers.spsa.SPSA object>)[source]¶
QAOA with continuous variables.
- 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=SPSA()) – An instance of a scipy optimizer to find the optimal weights for the parametric circuit (ansatz).
Notes
Added in version 0.4.0.
- state_vector_¶
State vector of the optimized quantum circuit (optimal parameters assigned to the parametric gates).
- Type:
StateVector
See also
pyQiskitOptimizer,create_mixer_rotational_X_gates- __init__(create_mixer=<function create_mixer_rotational_X_gates.<locals>.mixer_X>, n_reps=3, quantum_instance=None, optimizer=<qiskit_algorithms.optimizers.spsa.SPSA object>)[source]¶
Methods
__init__([create_mixer, n_reps, ...])convert_spdmat(X)Convert a SPD matrix
get_weights(prob, classes)Get weights variable
prepare_model(qp)solve(prob[, reshape])Solve the docplex problem.
spdmat_var(prob, channels, name)Create docplex matrix variable