qml.symmetry_generators

symmetry_generators(h)[source]

Compute the generators \(\{\tau_1, \ldots, \tau_k\}\) for a Hamiltonian over the binary field \(\mathbb{Z}_2\).

These correspond to the generator set of the \(\mathbb{Z}_2\)-symmetries present in the Hamiltonian as given in arXiv:1910.14644.

Parameters

h (Operator) – Hamiltonian for which symmetries are to be generated to perform tapering

Returns

list of generators of symmetries, \(\tau\)’s, for the Hamiltonian

Return type

list[Operator]

Example

>>> symbols = ["H", "H"]
>>> coordinates = np.array([[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]])
>>> H, qubits = qml.qchem.molecular_hamiltonian(symbols, coordinates)
>>> t = symmetry_generators(H)
>>> t
[Z(0) @ Z(1), Z(0) @ Z(2), Z(0) @ Z(3)]

Contents

Using PennyLane

Release news

Development

API

Internals