Skip to main content
IBM Quantum Platform
Diese Seite stammt aus einer alten Version von Qiskit SDK und ist in der aktuellen Version nicht mehr vorhanden. Wir empfehlen Ihnen, auf die neueste Version umzusteigen. Weitere Informationen finden Sie in den Versionshinweisen.

DictToCircuitSum

class qiskit.opflow.converters.DictToCircuitSum(traverse=True, convert_dicts=True, convert_vectors=True)

GitHub

Bases: 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.

Deprecated since version 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 in the Qiskit 1.0 release. For code migration guidelines, visit https://qisk.it/opflow_migration.

Parameters

  • 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

convert(operator)

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

Parameters

operator (OperatorBase) – The Operator to convert

Returns

The converted Operator.

Return type

OperatorBase

War diese Seite hilfreich?
Melden Sie auf GitHub einen Fehler, einen Tippfehler oder fordern Sie Inhalte an.