qml.paulix_ops

paulix_ops(generators, num_qubits)[source]

Generate the single qubit Pauli-X operators \(\sigma^{x}_{i}\) for each symmetry \(\tau_j\), such that it anti-commutes with \(\tau_j\) and commutes with all others symmetries \(\tau_{k\neq j}\). These are required to obtain the Clifford operators \(U\) for the Hamiltonian \(H\).

Parameters
  • generators (list[Operator]) – list of generators of symmetries, \(\tau\)’s, for the Hamiltonian

  • num_qubits (int) – number of wires required to define the Hamiltonian

Returns

list of single-qubit Pauli-X operators which will be used to build the Clifford operators \(U\).

Return type

list[Observable]

Example

>>> generators = [qml.Hamiltonian([1.0], [qml.Z(0) @ qml.Z(1)]),
...               qml.Hamiltonian([1.0], [qml.Z(0) @ qml.Z(2)]),
...               qml.Hamiltonian([1.0], [qml.Z(0) @ qml.Z(3)])]
>>> paulix_ops(generators, 4)
[X(1), X(2), X(3)]

Contents

Using PennyLane

Release news

Development

API

Internals