Random states
Quantum states
PastaQ.randomstate — Functionrandomstate(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 qubitsmixed: if false (default), generate a random MPS; if true, generates a random LPDOalg: 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 inalg="rand".χ: bond dimension of the MPS/LPDO- 'ξ`: kraus dimension (LPDO)
normalize: if true, return normalized state
randomstate(M::Union{MPS,MPO,LPDO}; kwargs...)Generate a random state with same Hilbert space (i.e. site indices) of a reference state M.
Quantum channels
PastaQ.randomprocess — Functionrandomprocess(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 qubitsmixed: if false (default), generates a random MPO; if true, generates a random LPDO.alg: initialization criteria, set to"randompars"(seerandomstate).σ: size of the 0-centered uniform distribution inalg="rand".χ: bond dimension of the MPO/LPDO.- 'ξ`: kraus dimension (LPDO).
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.