Random states

Quantum states

PastaQ.randomstateFunction
randomstate(N::Int64; kwargs...)

randomstate(ElT::Type{<: Number}, N::Int64; kwargs...)

Generates a random quantum state of N qubits.

Optionally, specify an element type, such as randomstate(Float64, 10) for a random real state (by default it is complex).

Arguments

  • N: number of qubits
  • mixed: if false (default), generate a random MPS; if true, generates a random LPDO
  • alg: algorithm used for initialization: "rand" initializes random tensor elements; "circuit" initializes with a random quantum circuit (MPS only).
  • σ: size of the 0-centered uniform distribution in alg="rand".
  • χ: bond dimension of the MPS/LPDO
  • 'ξ`: kraus dimension (LPDO)
  • normalize: if true, return normalized state
source
randomstate(M::Union{MPS,MPO,LPDO}; kwargs...)

Generate a random state with same Hilbert space (i.e. site indices) of a reference state M.

source

Quantum channels

PastaQ.randomprocessFunction
randomprocess(N::Int64; kwargs...)

randomprocess(ElT::Type{<: Number}, N::Int64; kwargs...)

Generates a random quantum procecss of N qubits.

Optionally choose the element type with calls like randomprocess(Float64, 10) (by default it is complex).

Arguments

  • N: number of qubits
  • mixed: if false (default), generates a random MPO; if true, generates a random LPDO.
  • alg: initialization criteria, set to "randompars" (see randomstate).
  • σ: size of the 0-centered uniform distribution in alg="rand".
  • χ: bond dimension of the MPO/LPDO.
  • 'ξ`: kraus dimension (LPDO).
source
randomprocess(M::Union{MPS,MPO}; kwargs...)

Generate a random process with same Hilbert space (i.e. input and output indices)of a reference process M.

source