pyCTQW.MPI.Line2P

class Line2P(N, d=None, amp=None, interaction=0.0)

Bases: pyCTQW.MPI.ctqw.QuantumWalkP2

Performs and analyses 2 particle continuous-time quantum walks on an infinite line

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

Example

To create a CTQW Line object for a 10 node line,

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

Method Summary

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

Attribute Summary

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