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

qiskit.aqua.components.initial_states.VarFormBased

class VarFormBased(var_form, params)[ソース]

The variational form based initial state.

This can been useful, say for example, if you have been doing experiments using a VariationalForm and have parameters for a state of interest of that form. Using this class it can then be turned into an initial state for use elsewhere.

As an example this notebook shows where the variational form’s state, from a VQE run, is then used as an initial state for IQPE by using this class.

パラメータ
  • var_form (Union[VariationalForm, QuantumCircuit]) – The variational form.

  • params (Union[List[float], ndarray, Dict[Parameter, float]]) – Parameters for the variational form.

例外

ValueError – Invalid input

__init__(var_form, params)[ソース]
パラメータ
  • var_form (Union[VariationalForm, QuantumCircuit]) – The variational form.

  • params (Union[List[float], ndarray, Dict[Parameter, float]]) – Parameters for the variational form.

例外

ValueError – Invalid input

Methods

__init__(var_form, params)

type var_form

Union[VariationalForm, QuantumCircuit]

construct_circuit([mode, register])

Construct the statevector of desired initial state.

construct_circuit(mode='circuit', register=None)[ソース]

Construct the statevector of desired initial state.

パラメータ
  • mode (string) – vector or circuit. The vector mode produces the vector. While the circuit constructs the quantum circuit corresponding that vector.

  • register (QuantumRegister) – qubits for circuit construction.

戻り値

statevector.

戻り値の型

QuantumCircuit or numpy.ndarray

例外
  • RuntimeError – invalid input for mode

  • AquaError – when mode is not 『vector』 or 『circuit』.