pyCTQW.MPI.Graph3P

class Graph3P(N, filename=None, filetype=None, d=None, amp=None, interaction=0.0)

Bases: pyCTQW.MPI.ctqw.QuantumWalkP3

Performs and analyses 3 particle continuous-time quantum walks on graphs

Parameters:N (int) – number of nodes to initialize the walker with. Nodes are labeled \(j\in\{0,N-1\}\).

Example

To create a 3P CTQW Graph object for a 10 node graph,

>>> walk = pyCTQW.MPI.Graph3P(10)

Note

if filename AND filetype are provided, this automatically creates a PETSc Hamiltonian matrix, neglecting the need to run createH(). For details on the other keyword arguments, see createH().

Method Summary

Graph3P.createH(filename, filetype[, d, ...]) Generate the Hamiltonian of the graph.
Graph3P.createInitState(initState) Generate the initial state of the quantum walk.
Graph3P.destroy() Destroys the 3 particle quantum walk object, and all associated PETSc matrices/vectors.
Graph3P.exportState(filename, filetype) Exports the final state psi of the quantum walk to a file.
Graph3P.importInitState(filename, filetype) Imports the initial state of the quantum walk from a file.
Graph3P.plot(filename) Creates a plot of probability vs node.
Graph3P.plotEntanglement(filename) Creates a plot of the entanglement over time.
Graph3P.plotNode(filename, node[, t]) Creates a plot of the marginal probablities on a specified node over time.
Graph3P.plotNodes(filename[, p, t]) Creates a plot of the node probablities over time.
Graph3P.propagate(t[, method]) Propagates the quantum walk for time t.
Graph3P.psiToInit() Copies the state psi to psi0.
Graph3P.watch(nodes[, watchtype]) Creates a handle that watches either marginal probability or walker entanglement during propagation.

Attribute Summary

Attribute Type Description
Graph3P.psi0 petsc4py.PETSc.Vec() \(N^3\) element PETSc vector containing the initial state
Graph3P.psi petsc4py.PETSc.Vec() \(N^3\) element PETSc vector containing the final state after the last propagation.
Graph3P.psiX petsc4py.PETSc.Vec() \(N\) element PETSc vector containing the marginal propability of particle 1
Graph3P.psiY petsc4py.PETSc.Vec() \(N\) element PETSc vector containing the marginal propability of particle 2
Graph3P.psiZ petsc4py.PETSc.Vec() \(N\) element PETSc vector containing the marginal propability of particle 3
Graph3P.H pyCTQW.MPI.ctqw.Hamiltonian() Hamiltonian matrix
Graph3P.EigSolver pyCTQW.MPI.ctqw.EigSolver() The Hamiltonian eigensolver
Graph3P.handle pyCTQW.MPI.ctqw.nodeHandle() A node handle, created if nodes are being watched for probability.
Graph3P.entanglementHandle pyCTQW.MPI.ctqw.entanglementHandle() A node handle, created if the entanglement is being watched.