Modular Sweep (quanguru.classes.modularSweep)#

Contain an implementation of the sweep that uses modular arithmetic.

runSimulation(qSim, p[, showProgress])

Run quantum simulation with optional parallelisation and progress tracking.

nonParalEvol(qSim[, showProgress])

paralEvol(qSim, p[, showProgress])

parallelTimeEvol(qSim, ind)

timeDependent(qSim)

timeEvolDefault(qSim, td)

timeEvolBase(qSim)

Function Name

Docstrings

Examples

Unit Tests

Tutorials

runSimulation

      ❌

    ❌

    ❌

    ❌

nonParalEvol

      ❌

    ❌

    ❌

    ❌

paralEvol

      ❌

    ❌

    ❌

    ❌

parallelTimeEvol

      ❌

    ❌

    ❌

    ❌

_runSweepAndPrep

      ❌

    ❌

    ❌

    ❌

timeDependent

      ❌

    ❌

    ❌

    ❌

timeEvolDefault

      ❌

    ❌

    ❌

    ❌

timeEvolBase

      ❌

    ❌

    ❌

    ❌

runSimulation(qSim, p, showProgress=True)[source]#

Run quantum simulation with optional parallelisation and progress tracking.

This function executes quantum parameter sweeps either in parallel or sequential mode. Progress tracking is controlled by the showProgress parameter.

Parameters:
  • qSim (Simulation) – The quantum simulation object containing the system and sweep parameters

  • p (multiprocessing.Pool or None) – Pool object for parallel processing. If None, runs sequentially.

  • showProgress (bool, optional) – Whether to display progress tracking. Default is True. Controls progress for both sequential and parallel runs.

Notes

For parallel processing, progress is displayed in real-time showing: - Progress bar with percentage completion - Current task count vs total tasks - Elapsed time and estimated remaining time

Examples

>>> # Enable progress display (default)
>>> sim.run(p=True, showProgress=True)
>>> # Disable progress display
>>> sim.run(p=True, showProgress=False)
>>> # Progress also works for sequential runs
>>> sim.run(p=False, showProgress=True)
nonParalEvol(qSim, showProgress=True)[source]#
paralEvol(qSim, p, showProgress=True)[source]#
printPreamble(totalTasks, startTime, parallel=False)[source]#
printProgress(completed, totalTasks, startTime)[source]#
printEpilogue(startTime)[source]#
parallelTimeEvol(qSim, ind)[source]#
runSweepAndPrep(qSim, ind)[source]#
timeDependent(qSim)[source]#
timeEvolDefault(qSim, td)[source]#
timeEvolBase(qSim)[source]#