Continuous-Time Quantum Walk
Implementation of the continuous-time quantum walk. The model is defined for an arbitrary undirected graph. Hamiltonian is chosen to be adjacency, normalized Laplacian or Laplacian matrix. After the evolution, the state is measured in the canonical basis. The evolution is defined on a system of size equal to graph order. The precise definition can be found in Spatial search by quantum walk by Childs and Goldstone, where both pure walk and search dynamics are described.
The abstract supertype is AbstractCTQW
with its default realization CTQW
, utilizing sparse matrices. Alternative realization is CTQWDense
, which works on standard matrices. The model includes the following types and methods:
QuantumWalk.AbstractCTQW
QuantumWalk.CTQW
QuantumWalk.CTQW
QuantumWalk.CTQWDense
QuantumWalk.CTQWDense
QuantumWalk.QWEvolution
QuantumWalk.QWSearch
QuantumWalk.check_qwdynamics
QuantumWalk.check_qwdynamics
QuantumWalk.evolve
QuantumWalk.initial_state
QuantumWalk.matrix
QuantumWalk.measure
Full docs
QuantumWalk.AbstractCTQW
— Type.AbstractCTQW
Abstract CTQW model. By default evolve according to Schrödinger equation and performs measurmenet by taking square of absolute values of its elements. Default representation of AbstractCTQW
is CTQW
.
QuantumWalk.CTQW
— Type.CTQW(graph, matrix)
Default representation of AbstractCTQW
. matrix
defaults to :adjacency
. The Hamiltonian is a sparse matrix.
QuantumWalk.CTQW
— Method.CTQW(graph)
Constructor for CTQW, taking matrix
to be :adjacency
.
QuantumWalk.CTQWDense
— Type.CTQWDense(graph, matrix)
Alternative representation of AbstractCTQW
. matrix
defaults to :adjacency
. The Hamiltonian is a dense matrix.
QuantumWalk.CTQWDense
— Method.CTQWDense(graph)
Constructor for CTQWDense, taking matrix
to be :adjacency
.
QuantumWalk.QWEvolution
— Method.QWEvolution([type, ]ctqw)
Creates QWEvolution
according to AbstractCTQW
model. By default type
equals Complex128
. The hamiltonian is SparseMatrixCSC
.
QuantumWalk.QWSearch
— Method.QWSearch([type, ]ctqw, marked[, penalty, jumpingrate])
Creates QWSearch
according to AbstractCTQW
model. By default type
equals Complex128
, jumpingrate
equals largest eigenvalue of adjacency matrix of graph if matrix(CTQW)
outputs :adjacency
and error otherwise, and penalty
equals 0. The hamiltonian is SparseMatrixCSC
.
QWSearch(qws_ctqw; marked, penalty)
Updates quantum walk search to new subset of marked elements and new penalty. By default marked and penalty are the same as in qws.
QuantumWalk.check_qwdynamics
— Method.check_qwdynamics(QWSearch, ctqw, parameters, marked)
Checks whetver combination of ctqw
, marked
and parameters
produces valid QWSearch
object. It checks if parameters
consists of key :hamiltonian
with corresponding value being SparseMatrixCSC
or Matrix
. Furthermore the hamiltonian needs to be square of size equals to graph(ctqw)
order. the hermiticity is not checked for efficiency issue.
QuantumWalk.check_qwdynamics
— Method.check_qwdynamics(QWEvolution, ctqw, parameters)
Checks iof combination of ctqw
and parameters
produces valid QWSearch
object. It checks if parameters
consists of key :hamiltonian
with corresponding value being SparseMatrixCSC
or Matrix
. Furthermore the hamiltonian needs to be square of size equals to graph(ctqw)
order. The hermiticity is not checked for efficiency issues.
QuantumWalk.evolve
— Method.evolve(qwd_ctqw, state, runtime)
Returnes new state creates by evolving state
by parameters(qwd_ctqw)[:hamiltonian]
for time runtime
according to Schrödinger equation.
QuantumWalk.initial_state
— Method.initial_state(qws_ctqw)
Returns equal superposition of size size
and type of parameters(qws_ctqw)[:hamiltonian]
.
QuantumWalk.matrix
— Method.matrix(ctqw)
Returns the matrix symbol defining matrix graph used.
QuantumWalk.measure
— Method.measure(qwd_ctqw, state[, vertices])
Returns the probability of measuring each vertex from vertices
from state
according to qwd_abstr_ctqw
model. If vertices
is not provided, full measurement is made. The measurement is done by taking square of absolute value of all elements of state.