quantum_launcher.routines.qiskit_routines.algorithms.qiskit_native#
Algorithms for Qiskit routines
Summary#
Classes:
Algorithm class with FALQON. |
|
Algorithm class with QAOA. |
|
Abstract class for Qiskit optimization algorithms |
Functions:
Commutator |
Reference#
- class quantum_launcher.routines.qiskit_routines.algorithms.qiskit_native.QiskitOptimizationAlgorithm(**alg_kwargs)[source]#
Bases:
Algorithm
Abstract class for Qiskit optimization algorithms
- make_tag(problem: Problem, backend: IBMBackend) str [source]#
- quantum_launcher.routines.qiskit_routines.algorithms.qiskit_native.commutator(op_a: SparsePauliOp, op_b: SparsePauliOp) SparsePauliOp [source]#
Commutator
- class quantum_launcher.routines.qiskit_routines.algorithms.qiskit_native.QAOA(p: int = 1, alternating_ansatz: bool = False, aux=None, **alg_kwargs)[source]#
Bases:
QiskitOptimizationAlgorithm
Algorithm class with QAOA.
- Parameters:
p (int) – The number of QAOA steps. Defaults to 1.
alternating_ansatz (bool) – Whether to use an alternating ansatz. Defaults to False. If True, it’s recommended to provide a mixer_h to alg_kwargs.
aux – Auxiliary input for the QAOA algorithm.
**alg_kwargs – Additional keyword arguments for the base class.
- name#
The name of the algorithm.
- Type:
str
- aux#
Auxiliary input for the QAOA algorithm.
- p#
The number of QAOA steps.
- Type:
int
- alternating_ansatz#
Whether to use an alternating ansatz.
- Type:
bool
- parameters#
List of parameters for the algorithm.
- Type:
list
- mixer_h#
The mixer Hamiltonian.
- Type:
SparsePauliOp | None
- property setup: dict#
- run(problem: Problem, backend: IBMBackend, formatter=typing.Callable) Result [source]#
Runs the QAOA algorithm
- class quantum_launcher.routines.qiskit_routines.algorithms.qiskit_native.FALQON(driver_h=None, delta_t=0, beta_0=0, n=1)[source]#
Bases:
QiskitOptimizationAlgorithm
Algorithm class with FALQON.
- Parameters:
driver_h (Optional[Operator]) – The driver Hamiltonian for the problem.
delta_t (float) – The time step for the evolution operators.
beta_0 (float) – The initial value of beta.
n (int) – The number of iterations to run the algorithm.
**alg_kwargs – Additional keyword arguments for the base class.
- driver_h#
The driver Hamiltonian for the problem.
- Type:
Optional[Operator]
- delta_t#
The time step for the evolution operators.
- Type:
float
- beta_0#
The initial value of beta.
- Type:
float
- n#
The number of iterations to run the algorithm.
- Type:
int
- cost_h#
The cost Hamiltonian for the problem.
- Type:
Optional[Operator]
- n_qubits#
The number of qubits in the problem.
- Type:
int
- parameters#
The list of algorithm parameters.
- Type:
List[str]
- property setup: dict#
- run(problem: Problem, backend: IBMBackend)[source]#
Runs the FALQON algorithm