WPSProtocol package

Submodules

WPSProtocol.InitialFunctions module

Created on Mon Jun 3 16:27:28 2024

@author: Jessica

WPSProtocol.InitialFunctions.initialVals(params, **kwargs)[source]

Initializes initial_wavefunction and it’s normalized form based on number of qubits. Returns: n: length of the pulse sequence, N: total number of qubits, r: coupling constants generated randomly for N qubits, op: params[‘opH’], pulses: params[‘pulses’], psi_nmn: normalized initial wavefunction randomly generated from Gaussian Distribution, R: inverse of r, alpha: extent to which the qubits can interact, Args: params: dictionary

WPSProtocol.InitialFunctions.normalizeWF(psi, **kwargs)[source]

Returns a normalized wavefunction. Args: psi - a column vector.

WPSProtocol.InitialFunctions.sparseMatrices(a, **kwargs)[source]

Generates sparse matrices for a given dense matrix. Args: a - a 2D numpy array

WPSProtocol.InitialFunctions.tensorOperators(matrix2D, **kwargs)[source]

Returns tensor product of an operator acting on specific qubits on the system. Args: matrix2D - a 2X2 dim numpy array. kwargs: a - no. of sites to the left of the matrix2D, b - no.of sites to the right of the matrix2D.

WPSProtocol.Module_WalshPSeq module

Created on Thu Jun 6 11:48:00 2024

Module for Generating Walsh Pulse Sequence for Dynamical Decoupling in Long-range interactions

@author: Jessica

WPSProtocol.Module_WalshPSeq.WF_Conditions(tupleprdt, **kwargs)[source]

*args: tupleprdt is a list of tuple of signs of wxi and wyi. Returns: tupleprdt - a list of Pauli Ops depending on eq 8 from the paper

WPSProtocol.Module_WalshPSeq.WF_Generate(params, **kwargs)[source]

**kwargs: W_x, W_y: Required - list of one element consisting the index of x, y part of one qubit. q: Optional - gives the number of times H has to tensor product with itself. Useful to form WF based on the highest index of decoupling lists of Wx, Wy. Returns: lstPaulOp - a list of Pauli Ops based on the W.I associated with that qubit.

WPSProtocol.Module_WalshPSeq.WF_WIList(params, **kwargs)[source]

**kwargs: Wx, Wy - list consisting the index of x, y part of each qubit. Returns: Pseq - Pulse sequence.

WPSProtocol.Module_WalshPSeq.WPSeq_TimeEvolOp(params, **kwargs)[source]

To input any Hamiltonian other than XY, use ‘Hr’ in kwargs. **kwargs: Hr Optional Returns: Unitary time evolution operator as per eq1 and time interval based on τ step.

WPSProtocol.Module_WalshPSeq.WPSresource_Hamiltonian_TimeEvolOp_IsingType(params, **kwargs)[source]

Returns: Resource Hamiltonian (Hr) and its time evolution for τ time.

WPSProtocol.Part_2A module

WPSProtocol.Part_2A.H_noise(params, **kwargs)[source]

Generates (S) type Hamiltonian for N number of qubits. ‘S’ can be X, Y, Z. For eg: (X+Y) Hamiltonian, params[‘opH’] = [X, Y]. (X+Y+Z) Hamiltonian, params[‘opH’] = [X, Y, Z].

WPSProtocol.Part_2A.TimeEvolOpForTFH(params, **kwargs)[source]

Returns time evolution operator of Args: params (dictionary) kwargs: TFH (list of Toggling frame hamiltonian)

WPSProtocol.Part_2A.TogglingFrameH(params, **kwargs)[source]

Returns list of Toggling Frame Hamiltonians of (X+Y) Hamiltonian for the complete pulse sequence. Args: params (dictionary)

WPSProtocol.Part_2A.TogglingFrame_Ising(params, **kwargs)[source]

Returns toggling frame hamiltonian of the Ising Model.

WPSProtocol.Part_2A.avgHFromTogglingFrameH(params, **kwargs)[source]

Returns Average Hamiltonian given a list of Toggling Frame Hamiltonians. Args: params (dictionary) kwargs: TFH [Required]

WPSProtocol.Part_2A.initialVals(params, **kwargs)[source]

Initializes initial_wavefunction and it’s normalized form based on number of qubits. Returns: n: length of the pulse sequence, N: total number of qubits, r: coupling constants generated randomly for N qubits, op: params[‘opH’], pulses: params[‘pulses’], psi_nmn: normalized initial wavefunction randomly generated from Gaussian Distribution, R: inverse of r, alpha: extent to which the qubits can interact, Args: params: dictionary

WPSProtocol.Part_2A.normalizeWF(psi, **kwargs)[source]

Returns a normalized wavefunction. Args: psi - a column vector.

WPSProtocol.Part_2A.sparseMatrices(a, **kwargs)[source]

Generates sparse matrices for a given dense matrix. Args: a - a 2D numpy array

WPSProtocol.Part_2A.tensorOperators(matrix2D, **kwargs)[source]

Returns tensor product of an operator acting on specific qubits on the system. Args: matrix2D - a 2X2 dim numpy array. kwargs: a - no. of sites to the left of the matrix2D, b - no.of sites to the right of the matrix2D.

WPSProtocol.Part_2A.utimeOpH(params, **kwargs)[source]

Returns list of time evolution of the Hamiltonian for discrete time steps, and list of time_steps. kwargs: H [Required] Hamiltonian.

Module contents