Korean
언어
English
Japanese
German
Korean
Portuguese, Brazilian
French
Shortcuts

qiskit.aqua.algorithms.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.

abstract __init__(quantum_instance)[소스]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(quantum_instance)

Initialize self.

run([quantum_instance])

Execute the algorithm with selected backend.

set_backend(backend, **kwargs)

Sets backend with configuration.

Attributes

backend

Returns backend.

quantum_instance

Returns quantum instance.

random

Return a numpy random.

property backend

Returns backend.

반환 형식

Union[Backend, BaseBackend]

property quantum_instance

Returns quantum instance.

반환 형식

Optional[QuantumInstance]

property random

Return a numpy random.

run(quantum_instance=None, **kwargs)[소스]

Execute the algorithm with selected backend.

매개변수
  • quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – the experimental setting.

  • kwargs (dict) – kwargs

반환값

results of an algorithm.

반환 형식

dict

예외

AquaError – If a quantum instance or backend has not been provided

set_backend(backend, **kwargs)[소스]

Sets backend with configuration.

반환 형식

None