QuantumAlgorithm
class QuantumAlgorithm(quantum_instance)
Base class for Quantum Algorithms.
This method should initialize the module and use an exception if a component of the module is available.
Attributes
backend
quantum_instance
Type: Union[None, qiskit.aqua.quantum_instance.QuantumInstance]
Returns quantum instance.
Return type
Optional
[QuantumInstance
]
random
Return a numpy random.
Methods
run
QuantumAlgorithm.run(quantum_instance=None, **kwargs)
Execute the algorithm with selected backend.
Parameters
- quantum_instance (
Union
[QuantumInstance
,BaseBackend
,None
]) – the experimental setting. - kwargs (dict) – kwargs
Returns
results of an algorithm.
Return type
dict
Raises
AquaError – If a quantum instance or backend has not been provided
set_backend
QuantumAlgorithm.set_backend(backend, **kwargs)
Sets backend with configuration.
Return type
None