# qiskit.aqua.operators.legacy.Z2Symmetries¶

class Z2Symmetries(symmetries, sq_paulis, sq_list, tapering_values=None)[código fonte]

Z2 Symmetries

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], optional) – values determines the sector.

Levanta

AquaError – Invalid paulis

__init__(symmetries, sq_paulis, sq_list, tapering_values=None)[código fonte]
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], optional) – values determines the sector.

Levanta

AquaError – Invalid paulis

Methods

 __init__(symmetries, sq_paulis, sq_list[, …]) param symmetries the list of Pauli objects representing the Z_2 symmetries consistent_tapering(operator) Tapering the operator with the same manner of how this tapered operator is created. Get a copy of self. find_Z2_symmetries(operator) Finds Z2 Pauli-type symmetries of an Operator. Check the z2_symmetries is empty or not. taper(operator[, tapering_values]) Taper an operator based on the z2_symmetries info and sector defined by tapering_values. two_qubit_reduction(operator, num_particles) Eliminates the central and last qubit in a list of Pauli that has diagonal operators (Z,I) at those positions

Attributes

 cliffords Get clifford operators, build based on symmetries and single-qubit X. sq_list returns sq list sq_paulis returns sq paulis symmetries return symmetries tapering_values returns tapering values
property cliffords

Get clifford operators, build based on symmetries and single-qubit X.

Retorna

a list of unitaries used to diagonalize the Hamiltonian.

Tipo de retorno

list[WeightedPauliOperator]

consistent_tapering(operator)[código fonte]

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 (WeightedPauliOperator) – the to-be-tapered operator

Retorna

the tapered operator

Tipo de retorno

TaperedWeightedPauliOperator

Levanta

AquaError – The given operator does not commute with the symmetry

copy()[código fonte]

Get a copy of self.

Tipo de retorno

Z2Symmetries

Retorna

copy

classmethod find_Z2_symmetries(operator)[código fonte]

Finds Z2 Pauli-type symmetries of an Operator.

Tipo de retorno

Z2Symmetries

Retorna

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

is_empty()[código fonte]

Check the z2_symmetries is empty or not.

Retorna

empty

Tipo de retorno

bool

property sq_list

returns sq list

property sq_paulis

returns sq paulis

property symmetries

return symmetries

taper(operator, tapering_values=None)[código fonte]

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.

Parâmetros
• operator (WeightedPauliOperator) – the to-be-tapered operator.

• tapering_values (list[int], optional) – if None, returns operators at each sector; otherwise, returns the operator located in that sector.

Retorna

If

tapering_values is None: [:classWeightedPauliOperator]; otherwise, WeightedPauliOperator

Tipo de retorno
Levanta

AquaError – Z2 symmetries, single qubit pauli and single qubit list cannot be empty

property tapering_values

returns tapering values

static two_qubit_reduction(operator, num_particles)[código fonte]

Eliminates the central and last qubit in a list of Pauli that has diagonal operators (Z,I) at those positions

Chemistry specific method: It can be used to taper two qubits in parity and binary-tree mapped fermionic Hamiltonians when the spin orbitals are ordered in two spin sectors, (block spin order) according to the number of particles in the system.

Parâmetros
• operator (WeightedPauliOperator) – the operator

• num_particles (Union(list, int)) – number of particles, if it is a list, the first number is alpha and the second number if beta.

Retorna

a new operator whose qubit number is reduced by 2.

Tipo de retorno

WeightedPauliOperator