pprop.gates.simplenonclifford module

This submodule defines SimpleNonClifford, the base class for single-qubit non-parametrised non-Clifford gates, and the concrete gate T.

class pprop.gates.simplenonclifford.SimpleNonClifford(wires, qml_gate, parameter, rule)[source]

Bases: Gate

Base class for single-qubit non-parametrised non-Clifford gates.

Unlike Clifford gates, which map every Pauli word to a single Pauli word, non-Clifford gates map one Pauli word to a superposition of two Pauli words with constant float coefficients. The specific mapping is defined by a rule dict supplied by each subclass.

Parameters:
  • wires (list[int]) – Qubits on which the gate acts (single-qubit gate, so one wire).

  • qml_gate (pennylane.operation.Operator) – Corresponding PennyLane gate class, used for circuit drawing.

  • parameter (int or None) – Non-Clifford gates are non-parametrised, so this is always None.

  • rule (EvolutionRule) – Dict mapping a single-qubit Pauli label ("X", "Y", or "Z") to a pair of (output_label, phase) tuples describing the Heisenberg evolution of that Pauli through the gate. Labels absent from the dict commute with the gate and pass through unchanged.

rule

The Heisenberg evolution rule for this gate.

Type:

EvolutionRule

evolve(word, k1, k2)[source]

Heisenberg-evolve a Pauli word through this non-Clifford gate.

Looks up the single-qubit Pauli at the gate’s wire in self.rule. If no rule exists for that label the Pauli word commutes with the gate and is returned unchanged. Otherwise the word is split into two new Pauli words whose scalar coefficients are scaled by the corresponding constant phases.

Parameters:
  • word (tuple[PauliOp, CoeffTerms]) – (pauliop, coeff_terms) pair to evolve.

  • k1 (int or None) – Pauli weight cutoff (unused, non-Clifford gates do not change weight).

  • k2 (int or None) – Frequency cutoff (unused, non-Clifford gates do not change frequency).

Returns:

A PauliDict with either one entry (if the word commutes with the gate) or two entries (if it does not).

Return type:

PauliDict

class pprop.gates.simplenonclifford.T(wires, parameter=None)[source]

Bases: SimpleNonClifford

The single-qubit T gate.

\[\begin{split}T = \begin{bmatrix} 1 & 0 \\ 0 & e^{i\pi/4} \end{bmatrix}\end{split}\]

The Heisenberg evolution rules are:

\[ \begin{align}\begin{aligned}X \;\mapsto\; \tfrac{1}{\sqrt{2}} X - \tfrac{1}{\sqrt{2}} Y\\Y \;\mapsto\; \tfrac{1}{\sqrt{2}} Y + \tfrac{1}{\sqrt{2}} X\\Z \;\mapsto\; Z\end{aligned}\end{align} \]
Parameters:
  • wires (list[int]) – Qubit on which the gate acts.

  • parameter (float, int, optional) – Unused for non-parametrised gates. Defaults to None.