# qml.qchem.clifford¶

clifford(generators, paulixops)[source]

Compute a Clifford operator from a set of generators and Pauli-X operators.

This function computes $$U = U_0U_1...U_k$$ for a set of $$k$$ generators and $$k$$ Pauli-X operators.

Parameters
• generators (list[Hamiltonian]) – generators expressed as PennyLane Hamiltonians

• paulixops (list[Operation]) – list of single-qubit Pauli-X operators

Returns

Clifford operator expressed as a PennyLane Hamiltonian

Return type

Hamiltonian

Example

>>> t1 = qml.Hamiltonian([1.0], [qml.grouping.string_to_pauli_word('ZZII')])
>>> t2 = qml.Hamiltonian([1.0], [qml.grouping.string_to_pauli_word('ZIZI')])
>>> t3 = qml.Hamiltonian([1.0], [qml.grouping.string_to_pauli_word('ZIIZ')])
>>> generators = [t1, t2, t3]
>>> paulixops = [qml.PauliX(1), qml.PauliX(2), qml.PauliX(3)]
>>> u = clifford(generators, paulixops)
>>> print(u)
(0.3535533905932737) [Z1 Z2 X3]
+ (0.3535533905932737) [X1 X2 X3]
+ (0.3535533905932737) [Z1 X2 Z3]
+ (0.3535533905932737) [X1 Z2 Z3]
+ (0.3535533905932737) [Z0 X1 X2 Z3]
+ (0.3535533905932737) [Z0 Z1 Z2 Z3]
+ (0.3535533905932737) [Z0 X1 Z2 X3]
+ (0.3535533905932737) [Z0 Z1 X2 X3]


Using PennyLane

Development

API