qleap.Trace

class qleap.Trace(steps, start_state)

A Trace object allows stepping through the execution of a QLeap program. It is generated by Circuit.run() with trace=True passed in RunArguments.

__init__(steps, start_state)

Tracethrough of a quantum program

Parameters:
  • steps (array-like) – Collection of operations representing each step of the execution

  • start_state (array-like) – Statevectors representing the intitial state of the qubits.

Methods

__init__(steps, start_state)

Tracethrough of a quantum program

reset()

Restarts the program

run_to_end()

Runs to the end of the program

show_state()

Shows the state at the current time

step_back()

Moves one step back in the execution

step_forward()

Moves one step forward in the execution