Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.opflow.converters.CircuitSampler.sample_circuits

CircuitSampler.sample_circuits(circuit_sfns=None, param_bindings=None)[ソース]

Samples the CircuitStateFns and returns a dict associating their id() values to their replacement DictStateFn or VectorStateFn. If param_bindings is provided, the CircuitStateFns are broken into their parameterizations, and a list of StateFns is returned in the dict for each circuit id(). Note that param_bindings is provided here in a different format than in convert, and lists of parameters within the dict is not supported, and only binding dicts which are valid to be passed into Terra can be included in this list.

パラメータ
  • circuit_sfns (Optional[List[CircuitStateFn]]) – The list of CircuitStateFns to sample.

  • param_bindings (Optional[List[Dict[Parameter, float]]]) – The parameterizations to bind to each CircuitStateFn.

戻り値

The dictionary mapping ids of the CircuitStateFns to their replacement StateFns.

例外

OpflowError – if extracted circuits are empty.

戻り値の型

Dict[int, List[StateFn]]