Bases: pyCTQW.MPI.ctqw.QuantumWalkP2
Performs and analyses 2 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 2P CTQW Graph object for a 10 node graph,
>>> walk = pyCTQW.MPI.Graph2P(10)
Graph2P.clearLiveGraph() | Destroys the live plot object previously created by Graph2P.plotLiveGraph(). |
Graph2P.createH(filename, filetype[, d, ...]) | Generate the Hamiltonian of the graph. |
Graph2P.createInitState(initState) | Generate the initial state of the quantum walk. |
Graph2P.destroy() | Destroys the 2 particle quantum walk object, and all associated PETSc matrices/vectors. |
Graph2P.exportPartialTrace(filename, filetype) | Exports the partial trace of the density matrix to a file. |
Graph2P.exportState(filename, filetype) | Exports the final state psi of the quantum walk to a file. |
Graph2P.importInitState(filename, filetype) | Imports the initial state of the quantum walk from a file. |
Graph2P.plot(filename) | Creates a plot of probability vs node. |
Graph2P.plotEntanglement(filename) | Creates a plot of the entanglement over time. |
Graph2P.plotGraph([size, probX, probY, output]) | Creates a plot of probability vs node superimposed on a 3D visualisation of the graph vertices. |
Graph2P.plotLiveGraph(dt[, size, probX, probY]) | Creates a live, updated plot of probability vs node superimposed on a 3D visualisation of the graph vertices. |
Graph2P.plotNode(filename, node[, t]) | Creates a plot of the marginal probablities on a specified node over time. |
Graph2P.plotNodes(filename[, p, t]) | Creates a plot of the node probablities over time. |
Graph2P.propagate(t[, method]) | Propagates the quantum walk for time t. |
Graph2P.psiToInit() | Copies the state self.psi to self.psi0. |
Graph2P.watch(nodes[, watchtype]) | Creates a handle that watches either marginal probability or walker entanglement during propagation. |
Attribute | Type | Description |
Graph2P.psi0 | petsc4py.PETSc.Vec() | \(N^2\) element PETSc vector containing the initial state |
Graph2P.psi | petsc4py.PETSc.Vec() | \(N^2\) element PETSc vector containing the final state after the last propagation. |
Graph2P.psiX | petsc4py.PETSc.Vec() | \(N\) element PETSc vector containing the marginal propability of particle 1 |
Graph2P.psiY | petsc4py.PETSc.Vec() | \(N\) element PETSc vector containing the marginal propability of particle 2 |
Graph2P.H | pyCTQW.MPI.ctqw.Hamiltonian() | Hamiltonian matrix |
Graph2P.EigSolver | pyCTQW.MPI.ctqw.EigSolver() | The Hamiltonian eigensolver |
Graph2P.handle | pyCTQW.MPI.ctqw.nodeHandle() | A node handle, created if nodes are being watched for probability. |
Graph2P.entanglementHandle | pyCTQW.MPI.ctqw.entanglementHandle() | A node handle, created if the entanglement is being watched. |