qml.ftqc

Warning

This module is currently experimental and will not maintain API stability between releases.

This module contains experimental features for supporting fault-tolerant workloads in PennyLane

Modules

Functions

cond_measure(condition, true_fn, false_fn)

Perform a mid-circuit measurement where the basis of the measurement is conditional on the supplied expression.

measure_arbitrary_basis(wires, angle, plane)

Perform a mid-circuit measurement in the basis defined by the plane and angle on the supplied qubit.

measure_x(wires[, reset, postselect])

Perform a mid-circuit measurement in the X basis.

measure_y(wires[, reset, postselect])

Perform a mid-circuit measurement in the Y basis.

measure_z(wires[, reset, postselect])

Perform a mid-circuit measurement in the Z basis.

diagonalize_mcms(tape)

Diagonalize any mid-circuit measurements in a parameterized basis into the computational basis.

convert_to_mbqc_formalism(tape)

Convert a circuit to the textbook MBQC formalism based on the procedures outlined in Raussendorf et al. 2003, https://doi.org/10.1103/PhysRevA.68.022312.

convert_to_mbqc_gateset(tape)

Converts a circuit expressed in arbitrary gates to the limited gate set that we can convert to the textbook MBQC formalism

generate_lattice(dims, lattice)

Generates a Lattice object with a given geometric parameters and its shape name.

make_graph_state(graph, wires[, ...])

A program-capture compatible way to create a GraphStatePrep template.

get_byproduct_corrections(tape, mid_meas, ...)

Correct sample results offline based on the executed quantum script and the mid-circuit measurement results for each shot.

Classes

GraphStatePrep(graph[, one_qubit_ops, ...])

Encode a graph state with a single graph operation applied on each qubit, and an entangling operation applied on nearest-neighbor qubits defined by the graph connectivity.

RotXZX(phi, theta, omega, wires[, id])

Arbitrary single qubit rotation with angles XZX

Lattice(lattice_shape[, graph, nodes, edges])

Represents a qubit lattice structure.

QubitGraph([graph, id])

A class to represent a hierarchical qubit memory model as nested graphs of qubits.

QubitMgr([num_qubits, start_idx])

The QubitMgr object maintains a list of active and inactive qubit wire indices used and for use during execution of a workload.

ParametricMidMeasureMP(wires, *, angle, plane)

Parametric mid-circuit measurement.

XMidMeasureMP(wires[, reset, postselect, id])

A subclass of ParametricMidMeasureMP that uses the X measurement basis (angle=0, plane="XY").

YMidMeasureMP(wires[, reset, postselect, id])

A subclass of ParametricMidMeasureMP that uses the Y measurement basis (angle=pi/2, plane="XY").

Overview

Pauli Tracker

This module contains functions for tracking, commuting Pauli operations in a Clifford circuit as well as getting measurement corrections.

pauli_to_xz(op)

Convert a Pauli operator to its xz representation up to a global phase, i.e., \(encode_{xz}(Pauli)=(x,z)=X^xZ^z\), where \(x\) is the exponent of the X and \(z\) is the exponent of the Z, meaning \(encode_{xz}(I) = (0, 0)\), \(encode_{xz}(X) = (1, 0)\), \(encode_{xz}(Y) = (1, 1)\) and \(encode_{xz}(Z) = (0, 1)\).

xz_to_pauli(x, z)

Convert x, z to a Pauli operator class.

pauli_prod(ops)

Get the result of a product of a list of Pauli operators.

commute_clifford_op(clifford_op, xz)

Gets the list of xz-encoded bits representing the list of input Pauli ops after being commuted through the given Clifford op.

get_byproduct_corrections(tape, mid_meas, ...)

Correct sample results offline based on the executed quantum script and the mid-circuit measurement results for each shot.

Using PennyLane

Release news

Development

API

Internals