Japanese
言語
English
Japanese
German
Korean
Portuguese, Brazilian
French
Shortcuts

qiskit.chemistry.algorithms.VQEAdapt

class VQEAdapt(operator, var_form_base, optimizer, initial_point=None, excitation_pool=None, threshold=1e-05, delta=1, max_iterations=None, max_evals_grouped=1, aux_operators=None, quantum_instance=None)[ソース]

DEPRECATED. The Adaptive VQE algorithm.

See https://arxiv.org/abs/1812.11173

パラメータ
  • operator (LegacyBaseOperator) – Qubit operator

  • var_form_base (VariationalForm) – base parameterized variational form

  • optimizer (Optimizer) – the classical optimizer algorithm

  • initial_point (Optional[ndarray]) – optimizer initial point

  • excitation_pool (Optional[List[WeightedPauliOperator]]) – list of excitation operators

  • threshold (float) – absolute threshold value for gradients, has a min. value of 1e-15.

  • delta (float) – finite difference step size for gradient computation, has a min. value of 1e-5.

  • max_iterations (Optional[int]) – maximum number of macro iterations of the VQEAdapt algorithm.

  • max_evals_grouped (int) – max number of evaluations performed simultaneously

  • aux_operators (Optional[List[LegacyBaseOperator]]) – Auxiliary operators to be evaluated at each eigenvalue

  • quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – Quantum Instance or Backend

例外
  • ValueError – if var_form_base is not an instance of UCCSD.

  • See also – qiskit/chemistry/components/variational_forms/uccsd_adapt.py

__init__(operator, var_form_base, optimizer, initial_point=None, excitation_pool=None, threshold=1e-05, delta=1, max_iterations=None, max_evals_grouped=1, aux_operators=None, quantum_instance=None)[ソース]
パラメータ
  • operator (LegacyBaseOperator) – Qubit operator

  • var_form_base (VariationalForm) – base parameterized variational form

  • optimizer (Optimizer) – the classical optimizer algorithm

  • initial_point (Optional[ndarray]) – optimizer initial point

  • excitation_pool (Optional[List[WeightedPauliOperator]]) – list of excitation operators

  • threshold (float) – absolute threshold value for gradients, has a min. value of 1e-15.

  • delta (float) – finite difference step size for gradient computation, has a min. value of 1e-5.

  • max_iterations (Optional[int]) – maximum number of macro iterations of the VQEAdapt algorithm.

  • max_evals_grouped (int) – max number of evaluations performed simultaneously

  • aux_operators (Optional[List[LegacyBaseOperator]]) – Auxiliary operators to be evaluated at each eigenvalue

  • quantum_instance (Union[QuantumInstance, Backend, BaseBackend, None]) – Quantum Instance or Backend

例外
  • ValueError – if var_form_base is not an instance of UCCSD.

  • See also – qiskit/chemistry/components/variational_forms/uccsd_adapt.py

Methods

__init__(operator, var_form_base, optimizer)

type operator

LegacyBaseOperator

cleanup_parameterized_circuits()

set parameterized circuits to None

find_minimum([initial_point, var_form, …])

Optimize to find the minimum cost value.

get_optimal_circuit()

get optimal circuit

get_optimal_cost()

get optimal cost

get_optimal_vector()

get optimal vector

get_prob_vector_for_params(…[, …])

Helper function to get probability vectors for a set of params

get_probabilities_for_counts(counts)

get probabilities for counts

run([quantum_instance])

Execute the algorithm with selected backend.

set_backend(backend, **kwargs)

Sets backend with configuration.

Attributes

backend

Returns backend.

initial_point

Returns initial point

optimal_params

returns optimal parameters

optimizer

Returns optimizer

quantum_instance

Returns quantum instance.

random

Return a numpy random.

var_form

Returns variational form

property backend

Returns backend.

戻り値の型

Union[Backend, BaseBackend]

cleanup_parameterized_circuits()

set parameterized circuits to None

find_minimum(initial_point=None, var_form=None, cost_fn=None, optimizer=None, gradient_fn=None)

Optimize to find the minimum cost value.

パラメータ
  • initial_point (Optional[ndarray]) – If not None will be used instead of any initial point supplied via constructor. If None and None was supplied to constructor then a random point will be used if the optimizer requires an initial point.

  • var_form (Union[QuantumCircuit, VariationalForm, None]) – If not None will be used instead of any variational form supplied via constructor.

  • cost_fn (Optional[Callable]) – If not None will be used instead of any cost_fn supplied via constructor.

  • optimizer (Optional[Optimizer]) – If not None will be used instead of any optimizer supplied via constructor.

  • gradient_fn (Optional[Callable]) – Optional gradient function for optimizer

戻り値

Optimized variational parameters, and corresponding minimum cost value.

戻り値の型

dict

例外

ValueError – invalid input

get_optimal_circuit()[ソース]

get optimal circuit

get_optimal_cost()[ソース]

get optimal cost

get_optimal_vector()[ソース]

get optimal vector

get_prob_vector_for_params(construct_circuit_fn, params_s, quantum_instance, construct_circuit_args=None)

Helper function to get probability vectors for a set of params

get_probabilities_for_counts(counts)

get probabilities for counts

property initial_point

Returns initial point

戻り値の型

Optional[ndarray]

property optimal_params

returns optimal parameters

property optimizer

Returns optimizer

戻り値の型

Optional[Optimizer]

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

property var_form

Returns variational form

戻り値の型

Union[QuantumCircuit, VariationalForm, None]