Skip to content

Quantum

Tenet.Lane Type
julia
Lane(id)
Lane(i, j, ...)
lane"i,j,..."

Represents the location of a physical index.

See also: Site, lanes

source

Tenet.Site Type
julia
Site(id[; dual = false])
Site(i, j, ...[; dual = false])
site"i,j,...[']"

Represents a Lane with an annotation of input or output. Site objects are used to label the indices of tensors in a Quantum Tensor Network.

See also: Lane, sites, isdual

source

Base.adjoint Method
julia
adjoint(site::Site)

Returns the adjoint of site, i.e. a new Site object with the same coordinates as site but with the dual flag flipped (so an input site becomes an output site and vice versa).

source

Tenet.id Function
julia
id(lane::AbstractLane)

Returns the coordinate location of the lane.

See also: lanes

source

Tenet.isdual Method
julia
isdual(site::Site)

Returns true if site is a dual site (i.e. is a "input"), false otherwise (i.e. is an "output").

See also: adjoint(::Site)

source

Tenet.@lane_str Macro
julia
lane"i,j,..."

Constructs a Lane object with the given coordinates. The coordinates are given as a comma-separated list of integers.

See also: Lane, @site_str

source

Tenet.@site_str Macro
julia
site"i,j,...[']"

Constructs a Site object with the given coordinates. The coordinates are given as a comma-separated list of integers. Optionally, a trailing ' can be added to indicate that the site is a dual site (i.e. an "input").

See also: Site, @lane_str

source

Tenet.AbstractQuantum Type
julia
AbstractQuantum

Abstract type for Quantum-derived types. Its subtypes must implement conversion or extraction of the underlying Quantum by overloading the Quantum constructor.

source

Tenet.Operator Type
julia
Operator <: Socket

Socket representing an operator; i.e. a Tensor Network with both input and output sites.

source

Tenet.Quantum Type
julia
Quantum

Tensor Network with a notion of "causality". This leads to the concept of sites and directionality (input/output).

Notes

  • Indices are referenced by Sites.

source

Tenet.Scalar Type
julia
Scalar <: Socket

Socket representing a scalar; i.e. a Tensor Network with no open sites.

source

Tenet.Socket Type
julia
Socket

Abstract type representing the socket trait of a AbstractQuantum Tensor Network.

source

Tenet.State Type
julia
State <: Socket

Socket representing a state; i.e. a Tensor Network with only input sites (or only output sites if dual = true).

source

Tenet.TensorNetwork Method
julia
TensorNetwork(q::AbstractQuantum)

Return the underlying TensorNetwork of an AbstractQuantum.

source

Base.adjoint Method
julia
Base.adjoint(::AbstractQuantum)

Return the adjoint of a Quantum Tensor Network; i.e. the conjugate Tensor Network with the inputs and outputs swapped.

source

Base.merge! Method
julia
Base.merge!(::AbstractQuantum...; reset=true)

Merge in-place multiple AbstractQuantum Tensor Networks. If reset=true, then all indices are renamed. If reset=false, then only the indices of the input/output sites are renamed.

See also: merge, @reindex!.

source

Base.merge Method
julia
Base.merge(a::AbstractQuantum, b::AbstractQuantum; reset=true)

Merge multiple AbstractQuantum Tensor Networks. If reset=true, then all indices are renamed. If reset=false, then only the indices of the input/output sites are renamed.

See also: merge!, @reindex!.

source

LinearAlgebra.adjoint! Method
julia
LinearAlgebra.adjoint!(::AbstractQuantum)

Like adjoint, but in-place.

source

LinearAlgebra.norm Function
julia
LinearAlgebra.norm(::AbstractQuantum, p=2; kwargs...)

Return the Lp-norm of a AbstractQuantum Tensor Network.

Warning

Only L2-norm is implemented yet.

source

Tenet.isconnectable Method
julia
isconnectable(a::AbstractQuantum, b::AbstractQuantum)

Return true if two AbstractQuantum Tensor Networks can be connected. This means:

  1. The outputs of a are a superset of the inputs of b.

  2. The outputs of a and b are disjoint except for the sites that are connected.

source

Tenet.lanes Method
julia
lanes(q::AbstractQuantum)

Return the lanes of a AbstractQuantum Tensor Network.

source

Tenet.nlanes Method
julia
nlanes(q::AbstractQuantum)

Return the number of lanes of a AbstractQuantum Tensor Network.

source

Tenet.nsites Method
julia
nsites(q::AbstractQuantum)

Return the number of sites of a AbstractQuantum Tensor Network.

source

Tenet.sites Function
julia
sites(q::AbstractQuantum)

Return the sites of a AbstractQuantum Tensor Network.

source

Tenet.socket Method
julia
socket(q::AbstractQuantum)

Return the socket of a Quantum Tensor Network; i.e. whether it is a Scalar, State or Operator.

source

Tenet.@reindex! Macro
julia
@reindex! a => b reset=true

Rename in-place the indices of the input/output sites of two Quantum Tensor Networks to be able to connect between them. If reset=true, then all indices are renamed. If reset=false, then only the indices of the input/output sites are renamed.

source

Tenet.Gate Type
julia
Gate

A Gate is a Tensor together with a set of Sites that represent the input/output indices. It is similar to the relation between Quantum and TensorNetwork, but only applies to one tensor.

Although it is not a AbstractQuantum, it can be converted to TensorNetwork or Quantum.

source

Base.iterate Function
julia
Base.iterate(circuit::Circuit[, state=1])

Iterate over the gates in circuit in the order they were added.

source

DocumenterMermaid.MermaidScriptBlock([...])

Made with DocumenterVitepress.jl