Z2Symmetries¶
- class Z2Symmetries(symmetries, sq_paulis, sq_list, tapering_values=None, *, tol=1e-14)[source]¶
Bases:
object
The $Z_2$ symmetry converter identifies symmetries from the problem hamiltonian and uses them to provide a tapered - more efficient - representation of operators as Paulis for this problem. For each identified symmetry, one qubit can be eliminated in the Pauli representation at the cost of having to test two symmetry sectors (for the two possible eigenvalues - tapering values - of the symmetry). In certain problems such as the finding of the main operator’s ground state, one can a priori identify the symmetry sector of the solution and thus effectively reduce the computational overhead.
The following attributes can be read and updated once the
Z2Symmetries
object has been constructed.- tapering_values¶
Values determining the sector.
- Type
list[int] or None
- tol¶
The tolerance threshold for ignoring real and complex parts of a coefficient.
- Type
float
References
- [1]: Bravyi, S., et al, “Tapering off qubits to simulate fermionic Hamiltonians”
- Parameters
symmetries (Iterable[Pauli]) – Object representing the list of $Z_2$ symmetries. These correspond to the generators of the symmetry group $langle tau_1, tau_2dots rangle>$.
sq_paulis (Iterable[Pauli]) – Object representing the list of single-qubit Pauli $sigma^x_{q(i)}$ anti-commuting with the symmetry $tau_i$ and commuting with all the other symmetries $tau_{jneq i}$. These operators are used to construct the unitary Clifford operators.
sq_list (Iterable[int]) – The list of indices $q(i)$ of the single-qubit Pauli operators used to build the Clifford operators.
tapering_values (Iterable[int] | None) – List of eigenvalues determining the symmetry sector for each symmetry.
tol (float) – Tolerance threshold for ignoring real and complex parts of a coefficient.
- Raises
QiskitError – Invalid paulis. The lists of symmetries, single-qubit paulis support paulis and tapering values must be of equal length. This length is the number of applied symmetries and translates directly to the number of eliminated qubits.
Methods
This method operates the first part of the tapering.
Finds Z2 Pauli-type symmetries of a
SparsePauliOp
.Check the z2_symmetries is empty or not.
Taper an operator based on the z2_symmetries info and sector defined by tapering_values.
Operate the second part of the tapering.
Attributes
- cliffords¶
Get clifford operators, built based on symmetries and single-qubit X.
- Returns
A list of unitaries used to diagonalize the Hamiltonian.
- settings¶
Return operator settings.
- sq_list¶
Return sq list.
- sq_paulis¶
Return sq paulis.
- symmetries¶
Return symmetries.