Z2Symmetries#

class qiskit.opflow.primitive_ops.Z2Symmetries(symmetries, sq_paulis, sq_list, tapering_values=None, tol=1e-14)[fuente]#

Bases: object

Deprecated: Z2 Symmetries

Obsoleto desde la versi贸n 0.24.0: The class qiskit.opflow.primitive_ops.tapered_pauli_sum_op.Z2Symmetries 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.

Par谩metros:
  • symmetries (List[Pauli]) 鈥 the list of Pauli objects representing the Z_2 symmetries

  • sq_paulis (List[Pauli]) 鈥 the list of single - qubit Pauli objects to construct the Clifford operators

  • sq_list (List[int]) 鈥 the list of support of the single-qubit Pauli objects used to build the Clifford operators

  • tapering_values (List[int] | None) 鈥 values determines the sector.

  • tol (float) 鈥 Tolerance threshold for ignoring real and complex parts of a coefficient.

Muestra:

OpflowError 鈥 Invalid paulis

Attributes

cliffords#

Get clifford operators, build based on symmetries and single-qubit X. :returns: a list of unitaries used to diagonalize the Hamiltonian.

settings#

Return operator settings.

sq_list#

returns sq list

sq_paulis#

returns sq paulis

symmetries#

return symmetries

tapering_values#

returns tapering values

tol#

Tolerance threshold for ignoring real and complex parts of a coefficient.

Methods

consistent_tapering(operator)[fuente]#

Tapering the operator with the same manner of how this tapered operator is created. i.e., using the same Cliffords and tapering values.

Par谩metros:

operator (PauliSumOp) 鈥 the to-be-tapered operator

Devuelve:

The tapered operator

Muestra:

OpflowError 鈥 The given operator does not commute with the symmetry

Tipo del valor devuelto:

OperatorBase

convert_clifford(operator)[fuente]#

This method operates the first part of the tapering. It converts the operator by composing it with the clifford unitaries defined in the current symmetry.

Par谩metros:

operator (PauliSumOp) 鈥 to-be-tapered operator

Devuelve:

PauliSumOp corresponding to the converted operator.

Muestra:

OpflowError 鈥 Z2 symmetries, single qubit pauli and single qubit list cannot be empty

Tipo del valor devuelto:

OperatorBase

copy()[fuente]#

Get a copy of self. :returns: copy

Tipo del valor devuelto:

Z2Symmetries

classmethod find_Z2_symmetries(operator)[fuente]#

Finds Z2 Pauli-type symmetries of an Operator.

Devuelve:

a z2_symmetries object contains symmetries, single-qubit X, single-qubit list.

Tipo del valor devuelto:

Z2Symmetries

is_empty()[fuente]#

Check the z2_symmetries is empty or not. :returns: Empty or not

Tipo del valor devuelto:

bool

taper(operator)[fuente]#

Taper an operator based on the z2_symmetries info and sector defined by tapering_values. The tapering_values will be stored into the resulted operator for a record.

The tapering is a two-step algorithm which first converts the operator into a PauliSumOp with same eigenvalues but where some qubits are only acted upon with the Pauli operators I or X. The number M of these redundant qubits is equal to the number M of identified symmetries.

The second step of the reduction consists in replacing these qubits with the possible eigenvalues of the corresponding Pauli X, giving 2^M new operators with M less qubits. If an eigenvalue sector was previously identified for the solution, then this reduces to 1 new operator with M less qubits.

Par谩metros:

operator (PauliSumOp) 鈥 the to-be-tapered operator

Devuelve:

[PauliSumOp]; otherwise, PauliSumOp

Tipo del valor devuelto:

If tapering_values is None

Muestra:

OpflowError 鈥 Z2 symmetries, single qubit pauli and single qubit list cannot be empty

taper_clifford(operator)[fuente]#

This method operates the second part of the tapering. This function assumes that the input operators have already been transformed using convert_clifford(). The redundant qubits due to the symmetries are dropped and replaced by their two possible eigenvalues. The tapering_values will be stored into the resulted operator for a record.

Par谩metros:

operator (PauliSumOp) 鈥 Partially tapered operator resulting from a call to convert_clifford()

Devuelve:

[PauliSumOp]; otherwise, PauliSumOp

Tipo del valor devuelto:

If tapering_values is None

Muestra:

OpflowError 鈥 Z2 symmetries, single qubit pauli and single qubit list cannot be empty