qiskit-documentation/docs/api/qiskit/0.43/qiskit.opflow.primitive_ops...

125 lines
4.1 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: TaperedPauliSumOp
description: API reference for qiskit.opflow.primitive_ops.TaperedPauliSumOp
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.opflow.primitive_ops.TaperedPauliSumOp
---
# TaperedPauliSumOp
<Class id="qiskit.opflow.primitive_ops.TaperedPauliSumOp" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/opflow/primitive_ops/tapered_pauli_sum_op.py" signature="TaperedPauliSumOp(*args, **kwargs)" modifiers="class">
Bases: [`PauliSumOp`](qiskit.opflow.primitive_ops.PauliSumOp "qiskit.opflow.primitive_ops.pauli_sum_op.PauliSumOp")
Deprecated: Class for PauliSumOp after tapering
<Admonition title="Deprecated since version 0.24.0" type="danger">
The class `qiskit.opflow.primitive_ops.tapered_pauli_sum_op.TaperedPauliSumOp` 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](https://qisk.it/opflow_migration).
</Admonition>
**Parameters**
* **primitive** The SparsePauliOp which defines the behavior of the underlying function.
* **z2\_symmetries** Z2 symmetries which the Operator has.
* **coeff** A coefficient multiplying the primitive.
**Raises**
**TypeError** invalid parameters.
## Methods Defined Here
<span id="qiskit-opflow-primitive-ops-taperedpaulisumop-assign-parameters" />
### assign\_parameters
<Function id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.assign_parameters" signature="TaperedPauliSumOp.assign_parameters(param_dict)">
Binds scalar values to any Terra `Parameters` in the coefficients or primitives of the Operator, or substitutes one `Parameter` for another. This method differs from Terras `assign_parameters` in that it also supports lists of values to assign for a give `Parameter`, in which case self will be copied for each parameterization in the binding list(s), and all the copies will be returned in an `OpList`. If lists of parameterizations are used, every `Parameter` in the param\_dict must have the same length list of parameterizations.
**Parameters**
**param\_dict** (*dict*) The dictionary of `Parameters` to replace, and values or lists of values by which to replace them.
**Returns**
The `OperatorBase` with the `Parameters` in self replaced by the values or `Parameters` in param\_dict. If param\_dict contains parameterization lists, this `OperatorBase` is an `OpList`.
**Return type**
[*OperatorBase*](qiskit.opflow.OperatorBase "qiskit.opflow.operator_base.OperatorBase")
</Function>
## Attributes
### INDENTATION
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.INDENTATION" attributeValue="'  '" />
### coeff
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.coeff">
The scalar coefficient multiplying the Operator.
**Returns**
The coefficient.
</Attribute>
### coeffs
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.coeffs">
Return the Pauli coefficients.
</Attribute>
### grouping\_type
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.grouping_type">
Type of Grouping
**Type**
Returns
</Attribute>
### instance\_id
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.instance_id">
Return the unique instance id.
</Attribute>
### num\_qubits
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.num_qubits" />
### parameters
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.parameters" />
### primitive
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.primitive" attributeTypeHint="SparsePauliOp">
The primitive defining the underlying function of the Operator.
**Returns**
The primitive object.
</Attribute>
### settings
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.settings">
Return operator settings.
</Attribute>
### z2\_symmetries
<Attribute id="qiskit.opflow.primitive_ops.TaperedPauliSumOp.z2_symmetries">
Z2 symmetries which the Operator has.
**Returns**
The Z2 Symmetries.
</Attribute>
</Class>