Gates

Clifford Gates

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^nq where nq is the maximum qubit index in the circuit. The resulting clifford map can be added to the global clifford_map with a custom Clifford gate name. The maximum number of qubits is 4 due to current restrictions of UInt8. 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
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, partial_pstr) where sign is the sign change and partial_pstr is the new partial Pauli string.

source

Pauli Rotations

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, qind::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]). We follow the convention that those rotation are equivalent by conjugation of

\[e^{-i θ/2 P}\]

where P is the corresponding Pauli operator.

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

Noise Channels

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

An amplitude damping noise channel acting on the qubit at index qind. If gamma is provided, this returns a frozen gate with that noise strength. 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.DephasingNoiseType
DephasingNoise(qind::Int)
DephasingNoise(qind::Int, p::Real)

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

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

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

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

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

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

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

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

A Pauli-Z noise channel acting on the qubit at index qind. If p is provided, this returns a frozen gate with that noise strength. Will damp X and Y Paulis equally by a factor of 1-p. This corresponds to inserting a 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{PauliStringType,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

Frozen Gates

PauliPropagation.FrozenGateMethod
FrozenGate(gate::ParametrizedGate, parameter)

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::Vector{Gate}, parameters::Vector{Number})

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

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

Returns a FrozenGate wrapping the gate with the fixed parameter.

source