hiperwalk.ContinuousTime#

class hiperwalk.ContinuousTime(graph=None, **kwargs)[source]#

Manage instances of continuous-time quantum walks on graphs.

For further implementation details and theoretical background, refer to the Notes Section.

Parameters:
graph

Graph on which the quantum walk takes place. There are two acceptable inputs:

**kwargsoptional

Additional arguments to set the Hamiltonian and evolution operator.

Notes

The continuous-time quantum walk model represents quantum particles evolving on a graph in continuous time, as directed by the Schrödinger equation. The Hamiltonian is usually chosen as the adjacency matrix or the Laplacian of the graph. A positive parameter gamma acts as a weighting factor for the Hamiltonian, adjusting the walk’s spreading rate. When marked vertices are present, the Hamiltonian is suitably modified.

The computational basis associated with a graph \(G(V, E)\) comprising \(n\) vertices \(v_0, \ldots, v_{n-1}\) is spanned by the states \(\ket{i}\) for \(0 \leq i < n\), where \(\ket{i}\) describes the walker’s position as vertex \(v_i\).

The adjacency matrix of \(G(V, E)\) is the \(n\)-dimensional matrix \(A\) such that

\[\begin{split}A_{i,j} = \begin{cases} 1, \text{ if } v_i \text{ is adjacent to } v_j,\\ 0, \text{ otherwise.} \end{cases}\end{split}\]

Similarly, the Laplacian matrix is defined as

\[\begin{split}L_{i,j} = \begin{cases} \text{degree}(v_i), \text{ if } i=j,\\ -1, \text{ if } i\neq j \text{ and } v_i \text{ is adjacent to } v_j,\\ 0, \text{ otherwise.} \end{cases}\end{split}\]

The Hamiltonian’s formulation is detailed in hiperwalk.ContinuousTime.set_hamiltonian(), depending on the choice between the adjacency or Laplacian matrix, along with the positioning of the marked vertices.

The hiperwalk.ContinuousTime class enables the simulation of real Hamiltonians. A particular Hamiltonian \(H\), can be simulated by creating a hiperwalk.WeightedGraph with adjacency matrix \(C\) such that \(H = -\gamma C\). Additionally, the Laplacian matrix is computed as \(D - A\), with \(D\) being the degree matrix. See hiperwalk.Graph.adjacency_matrix() and hiperwalk.Graph.laplacian_matrix().

For a comprehensive understanding of continuous-time quantum walks, consult reference [1]. To examine the differences between utilizing the adjacency matrix and the Laplacian matrix, refer to reference [2].

References

[1]

E. Farhi and S. Gutmann. “Quantum computation and decision trees”. Physical Review A, 58(2):915–928, 1998. ArXiv:quant-ph/9706062.

[2]

T. G. Wong, L. Tarrataca, and N. Nahimov. Laplacian versus adjacency matrix in quantum walk search. Quantum Inf Process 15, 4029-4048, 2016.

__init__(graph=None, **kwargs)[source]#

Methods

fit_sin_squared(x, y)

Fit data to the squared sine function.

get_evolution()

Retrieve the evolution operator.

get_gamma()

Retrieve the value of gamma used in the definition of the Hamiltonian.

get_hamiltonian()

Retrieve the Hamiltonian.

get_hamiltonian_type()

Retrieve the type of the Hamiltonian.

get_marked()

Retrieve the marked vertices.

get_terms()

Retrieve the number of terms in the power series used to calculate the evolution operator.

get_time()

Return the time used to construct the evolution operator.

hilbert_space_dimension()

Returns dimension of the Hilbert space.

ket(label)

Creates a state of the computational basis.

max_success_probability([state, step])

Find the maximum success probability.

optimal_runtime([state, step])

Find the optimal running time of a quantum-walk-based search.

probability(states, vertices)

Computes the sum of probabilities for the specified vertices.

probability_distribution(states)

Compute the probability distribution of the given state(s).

set_evolution(**kwargs)

Set the evolution operator.

set_gamma([gamma])

Set gamma.

set_hamiltonian([gamma, type, marked])

Set the Hamiltonian.

set_hamiltonian_type([type])

Set the type of the Hamiltonian.

set_marked([marked])

Set the marked vertices.

set_terms([terms])

Set the number of terms used to calculate the evolution operator as a power series.

set_time([time])

Set a time instant.

simulate([range, state])

Simulates the quantum walk.

state(entries)

Generates a state in the Hilbert space.

success_probability(states)

Computes the success probability for the given state(s).

uniform_state([vertices])

Create a uniform state.