qiskit.aqua.operators.legacy.Z2Symmetries
class Z2Symmetries(symmetries, sq_paulis, sq_list, tapering_values=None)
Z2 Symmetries
Parameters
- 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.
Raises
AquaError – Invalid paulis
__init__
__init__(symmetries, sq_paulis, sq_list, tapering_values=None)
Parameters
- 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.
Raises
AquaError – Invalid paulis
Methods
__init__ (symmetries, sq_paulis, sq_list[, …]) | param symmetriesthe 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. |
copy () | Get a copy of self. |
find_Z2_symmetries (operator) | Finds Z2 Pauli-type symmetries of an Operator. |
is_empty () | 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 |
cliffords
Get clifford operators, build based on symmetries and single-qubit X.
Returns
a list of unitaries used to diagonalize the Hamiltonian.
Return type
list[WeightedPauliOperator]
consistent_tapering
consistent_tapering(operator)
Tapering the operator with the same manner of how this tapered operator is created. i.e., using the same Cliffords and tapering values.
Parameters
operator (WeightedPauliOperator) – the to-be-tapered operator
Returns
the tapered operator
Return type
TaperedWeightedPauliOperator
Raises
AquaError – The given operator does not commute with the symmetry
copy
copy()
Get a copy of self.
Return type
Z2Symmetries
Returns
copy
find_Z2_symmetries
classmethod find_Z2_symmetries(operator)
Finds Z2 Pauli-type symmetries of an Operator.
Return type
Z2Symmetries
Returns
a z2_symmetries object contains symmetries, single-qubit X, single-qubit list.
is_empty
is_empty()
Check the z2_symmetries is empty or not.
Returns
empty
Return type
bool
sq_list
returns sq list
sq_paulis
returns sq paulis
symmetries
return symmetries
taper
taper(operator, tapering_values=None)
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.
Parameters
- 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.
Returns
If
tapering_values is None: [:class`WeightedPauliOperator`]; otherwise, WeightedPauliOperator
Return type
list[WeightedPauliOperator] or WeightedPauliOperator
Raises
AquaError – Z2 symmetries, single qubit pauli and single qubit list cannot be empty
tapering_values
returns tapering values
two_qubit_reduction
static 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
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.
Parameters
- 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.
Returns
a new operator whose qubit number is reduced by 2.
Return type