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
Attributes
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]
sq_list
returns sq list
sq_paulis
returns sq paulis
symmetries
return symmetries
tapering_values
returns tapering values
Methods
consistent_tapering
Z2Symmetries.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
find_Z2_symmetries
classmethod Z2Symmetries.find_Z2_symmetries(operator)
Finds Z2 Pauli-type symmetries of an Operator.
Returns
a z2_symmetries object contains symmetries,
single-qubit X, single-qubit list.
Return type
is_empty
Z2Symmetries.is_empty()
Check the z2_symmetries is empty or not.
Returns
empty
Return type
bool
taper
Z2Symmetries.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
two_qubit_reduction
static Z2Symmetries.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