DictToCircuitSum#

class qiskit.opflow.converters.DictToCircuitSum(traverse=True, convert_dicts=True, convert_vectors=True)[소스]#

기반 클래스: ConverterBase

Deprecated: Converts DictStateFns or VectorStateFns to equivalent CircuitStateFns or sums thereof. The behavior of this class can be mostly replicated by calling to_circuit_op on an Operator, but with the added control of choosing whether to convert only DictStateFns or VectorStateFns, rather than both.

버전 0.24.0부터 폐지됨: The class qiskit.opflow.converters.dict_to_circuit_sum.DictToCircuitSum is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. For code migration guidelines, visit https://qisk.it/opflow_migration.

매개변수:
  • traverse (bool) – Whether to recurse down into Operators with internal sub-operators for conversion.

  • convert_dicts (bool) – Whether to convert VectorStateFn.

  • convert_vectors (bool) – Whether to convert DictStateFns.

Methods

convert(operator)[소스]#

Convert the Operator to CircuitStateFns, recursively if traverse is True.

매개변수:

operator (OperatorBase) – The Operator to convert

반환:

The converted Operator.

반환 형식:

OperatorBase