Gates

Cliffords

PauliPropagation.clifford_mapConstant
clifford_map

Global dictionary of Clifford gates and their action on Pauli strings. Currently supported Clifford gates are :H, :X, :Y, :Z, :SX, :SY, :S (:SZ) , :CNOT, :CZ, :ZZpihalf, and:SWAP. If one indexes into the returned arrays with the integer that corresponds to the partial Pauli string, the returned tuple is(sign, partialpstr)wheresignis the sign change andpartialpstr` is the new partial Pauli string.

source
PauliPropagation.CliffordGateMethod
CliffordGate(symbol::Symbol, qinds::Vector{Int})
CliffordGate(symbol::Symbol, qinds::Int)

A Clifford gate with the name symbol acting on the qubits qinds. symbol needs to match any of the implemented Clifford gates in the global clifford_map. qinds can be a single integer, a vector of integers, or anything that transforms into a vector via vec(collect(qinds)).

source
PauliPropagation.composecliffordmapsMethod
composecliffordmaps(circuit::Vector{CliffordGate})

Compose a circuit of Clifford gates into a single Clifford map. The length of the map is 4^nqwherenqis the maximum qubit index in the circuit. The resulting clifford map can be added to the globalclifford_mapwith a custom Clifford gate name. The maximum number of qubits is 4 due to current restrictions ofUInt8`. Even if all gates only act on one qubit, that qubit index will determine the dimensionality of the map.

source
PauliPropagation.createcliffordmapMethod
createcliffordmap(gate_relations::Dict)

Create a Clifford gate map from a dictionary of gate relations which can then be pushed to the global clifford_map. gate_relations is a dictionary with pairs like (:X, :X) => (:Z, :X, -1), describing the action of the Clifford gate on symbols (including the sign change).

source
PauliPropagation.transposecliffordmapMethod
transposecliffordmap(map_array::Vector{Tuple{UInt8,Int}})

Transpose the Clifford gate maparray so that the output map is the inverse of the input map. For example, transposecliffordmap(clifford_map[:H]) returns the map for the inverse of the Hadamard gate, which is the same map.

source

Pauli rotations

PauliPropagation.MaskedPauliRotationType
MaskedPauliRotation(symbols::Vector{Symbol}, qinds::Vector{Int}, term::PauliStringType)

A parametrized Pauli rotation gate acting on the qubits qinds with the Pauli string symbols. The term is the integer representation of the Pauli string with the correct integer type for the total number of qubits. This allows for faster application of the gate. See tomaskedpaulirotation for conversion from PauliRotation, which is the easiest way to construct a MaskedPauliRotation.

source
PauliPropagation.PauliRotationMethod
PauliRotation(symbols, qinds, theta)

Constructor for a frozen PauliRotation generated by the Pauli string symbols acting on the qubits qinds, and with fixed parameter theta.

source
PauliPropagation.PauliRotationMethod
PauliRotation(symbols::Vector{Symbol}, qinds::Vector{Int})
PauliRotation(symbol::Symbol, qinds::Int)

A parametrized Pauli rotation generated by the Pauli string symbols acting on the qubits qinds. For example PauliRotation(:X, 2) or PauliRotation([:X, :Y], [1, 2]).

source
PauliPropagation._tomaskedpaulirotationMethod
_tomaskedpaulirotation(frozen_gate::FrozenGate, nqubits::Integer)

Transforms a FrozenGate with a PauliRotation to a MaskedPauliRotation which carries the integer representation of the gate generator.

source
PauliPropagation._tomaskedpaulirotationMethod
_tomaskedpaulirotation(pauli_gate::PauliRotation, nqubits::Integer)

Transforms a PauliRotation to a MaskedPauliRotation which carries the integer representation of the gate generator. This allows for significantly faster computation with the gate.

source
PauliPropagation._tomaskedpaulirotationMethod
_tomaskedpaulirotation(circ::Vector{Gate})

Returns a circuit where PauliRotation gates are transformed to MaskedPauliRotation gates. This allows for significantly faster computation with the gate.

source
PauliPropagation._tomaskedpaulirotationMethod
_tomaskedpaulirotation(circ::Vector{Gate})

Returns a circuit where PauliRotation gates are transformed to MaskedPauliRotation gates. This allows for significantly faster computation with the gate.

source
PauliPropagation._tomaskedpaulirotationMethod
_tomaskedpaulirotation(pauli_gate::PauliRotation, ::TermType)

Transforms a PauliRotation to a MaskedPauliRotation which carries the integer representation of the gate generator. This allows for significantly faster computation with the gate.

source
PauliPropagation.commutesMethod
commutes(gate::MaskedPauliRotation, pstr::PauliStringType)

Check if a MaskedPauliRotation commutes with an integer Pauli string.

source
PauliPropagation.tomatrixMethod
tomatrix(gate::PauliRotation, theta)

Compute the unitary matrix for the PauliRotation gate with parameter theta in the computational 0/1 basis. This is done by computing the matrix U = cos(θ/2) I - i sin(θ/2) P where P is the Pauli matrix corresponding to the symbols. The returned unitary is returned in Schrödinger picture form.

source

Frozen

PauliPropagation.FrozenGateType
FrozenGate(gate::ParametrizedGate, parameter::Number)

A StaticGate that wraps a ParametrizedGate with a fixed parameter. These are used to fix the parameter of ParametrizedGate at the time of circuit construction. This can be convenient but might exclude this parameter from being, e.g., differentiated by external libraries.

source
PauliPropagation.freezeMethod
freeze(gates, parameters)

Returns a vector of Gates where ParametrizedGates are frozen with their parameters.

source
PauliPropagation.freezeMethod
freeze(gate::ParametrizedGate, parameter::Number)

Returns a FrozenGate wrapping the gate with the fixed parameter.

source

Noise

PauliPropagation.AmplitudeDampingNoiseType
AmplitudeDampingNoise(qind::Int)

An amplitude damping noise channel acting on the qubit at index qind. Damps X and Y Paulis by a factor of sqrt(1-gamma) and splits Z into and gamma * I and (1-gamma) * Z component (in the transposed Heisenberg picture).

source
PauliPropagation.AmplitudeDampingNoiseMethod
AmplitudeDampingNoise(qind::Int, gamma::Real)

A frozen amplitude damping noise channel acting on the qubit at index qind with noise strength gamma. Damps X and Y Paulis, and splits Z into and I and Z component (in the transposed Heisenberg picture).

source
PauliPropagation.DephasingNoiseType
DephasingNoise(qind::Int)
DephasingNoise(qind::Int, p::Real)

This is an alias for PauliZNoise. A dephasing noise channel acting on the qubit at index qind. Will damp X and Y Paulis equally by a factor of 1-p. If p is provided, this returns a frozen gate with that noise strength.

source
PauliPropagation.DepolarizingNoiseMethod
DepolarizingNoise(qind::Int, p::Real)

A frozen depolarizing noise channel acting on the qubit at index qind with noise strength p. Will damp X, Y, and Z Paulis equally by a factor of 1-p.

source
PauliPropagation.PauliXDampingMethod
PauliXDamping(qind::Int, p::Real)

A frozen Pauli-X noise damping acting on the qubit at index qind with noise strength p. Will damp X Paulis by a factor of 1-p. This alone is not a valid quantum channel.

source
PauliPropagation.PauliXDampingMethod
PauliXDamping(qind::Int)

A Pauli-X noise damping acting on the qubit at index qind. Will damp X Paulis by a factor of 1-p. This alone is not a valid quantum channel.

source
PauliPropagation.PauliXNoiseMethod
PauliXNoise(qind::Int, p::Real)

A frozen Pauli-X noise channel acting on the qubit at index qind with noise strength p. Will damp Y and Z Paulis equally by a factor of 1-p. This corresponds to inserting a random Pauli X operator into the circuit with probability p/2.

source
PauliPropagation.PauliXNoiseMethod
PauliXNoise(qind::Int)

A Pauli-X noise channel acting on the qubit at index qind. Will damp Y and Z Paulis equally by a factor of 1-p. This corresponds to inserting a random Pauli X operator into the circuit with probability p/2.

source
PauliPropagation.PauliYDampingMethod
PauliYDamping(qind::Int, p::Real)

A frozen Pauli-Y damping acting on the qubit at index qind with noise strength p. Will damp Y Paulis by a factor of 1-p. This alone is not a valid quantum channel.

source
PauliPropagation.PauliYDampingMethod
PauliYDamping(qind::Int)

A Pauli-Y noise damping acting on the qubit at index qind. Will damp Y Paulis by a factor of 1-p. This alone is not a valid quantum channel.

source
PauliPropagation.PauliYNoiseMethod
PauliYNoise(qind::Int, p::Real)

A frozen Pauli-Y noise channel acting on the qubit at index qind with noise strength p. Will damp X and Z Paulis equally by a factor of 1-p. This corresponds to inserting a random Pauli Y operator into the circuit with probability p/2.

source
PauliPropagation.PauliYNoiseMethod
PauliYNoise(qind::Int)

A Pauli-Y noise channel acting on the qubit at index qind. Will damp X and Z Paulis equally by a factor of 1-p. This corresponds to inserting a random Pauli Y operator into the circuit with probability p/2.

source
PauliPropagation.PauliZDampingMethod
PauliZDamping(qind::Int, p::Real)

A frozen Pauli-Z noise damping acting on the qubit at index qind with noise strength p. Will damp Z Paulis by a factor of 1-p. This alone is not a valid quantum channel.

source
PauliPropagation.PauliZDampingMethod
PauliZDamping(qind::Int)

A Pauli-Z noise damping acting on the qubit at index qind. Will damp Z Paulis by a factor of 1-p. This alone is not a valid quantum channel.

source
PauliPropagation.PauliZNoiseMethod
PauliZNoise(qind::Int, p::Real)

A frozen Pauli-Z noise channel acting on the qubit at index qind with noise strength p. Will damp X and Y Paulis equally by a factor of 1-p. This corresponds to inserting a random Pauli Z operator into the circuit with probability p/2.

source
PauliPropagation.PauliZNoiseMethod
PauliZNoise(qind::Int)

A Pauli-Z noise channel acting on the qubit at index qind. Will damp X and Y Paulis equally by a factor of 1-p. This corresponds to inserting a random Pauli Z operator with probability p/2.

source

Misc

PauliPropagation.TGateMethod
TGate(qind::Integer)

Returns a T gate acting on qubit qind. It acts on qubit qind like a PauliRotation(:Z, qind) with angle π/4.

source
PauliPropagation.TransferMapGateType
TransferMapGate(transfer_map::Vector{Vector{Tuple{TermType,CoeffType}}}, qinds::Vector{Int})

A non-parametrized StaticGate defined by a transfer map acting on the qubits qinds. Transfer maps can be constructed manually or generated via totransfermap().

source
PauliPropagation.tomatrixMethod
tomatrix(gate::TGate)

Compute the unitary matrix for a TGate. The returned unitary is returned in Schrödinger picture form.

source