importInitState

Line3P.importInitState(filename, filetype)

Imports the initial state of the quantum walk from a file.

Parameters:
  • filename (str) – path to the file containing the input state.
  • filetype (str) –

    the filetype of the imported adjacency matrix.

    • 'txt' - TODO: not yet implemented! Please use 'bin' for now.
    • 'bin' - an \(N^3\) element PETSc binary vector.
Returns:

: this creates a PETSc vector containing the initial statespace, accessed via self.psi0.

Return type:

petsc4py.PETSc.Vec()

Warning

The number of elements in the imported input statespace must equal \(N^3\) where \(N\) is the number of nodes the 3P CTQW object is initialized with.