Snapshot¶
- class Snapshot(label, snapshot_type='statevector', name=None)[source]¶
An instruction targeted for simulators, to capture a moment in the simulation.
Create new snapshot.
- Parameters
label (
str
) – Snapshot label which is used to identify the snapshot in the output.snapshot_type (
str
) – Type of snapshot, e.g., “state” (take a snapshot of the quantum state). The types of snapshots offered are defined by the simulator used.name (
Optional
[str
]) – Snapshot name which defaults tolabel
. This parameter is only for display purposes and is not taken into account during comparison.
Attributes
Return the
Channel
that this instruction is scheduled on; trivially, aSnapshotChannel
.Returns channels that this schedule uses.
The associated command.
Duration of this instruction.
Unique identifier for this instruction.
Iterable for getting instructions from Schedule tree.
Label of snapshot.
Name of this instruction.
Return instruction operands.
Relative begin time of this instruction.
Relative end time of this instruction.
Occupied time slots by this instruction.
Type of snapshot.
Methods
Deprecated.
Snapshot.append
(schedule[, name])Return a new
Schedule
withschedule
inserted at the maximum time over all channels shared betweenself
andschedule
.Snapshot.ch_duration
(*channels)Return duration of the supplied channels in this Instruction.
Snapshot.ch_start_time
(*channels)Return minimum start time for supplied channels.
Snapshot.ch_stop_time
(*channels)Return maximum start time for supplied channels.
Snapshot.draw
([dt, style, filename, …])Plot the instruction.
Return itself as already single instruction.
Snapshot.insert
(start_time, schedule[, name])Return a new
Schedule
withschedule
inserted withinself
atstart_time
.Snapshot.shift
(time[, name])Return a new schedule shifted forward by time.
Snapshot.union
(*schedules[, name])Return a new schedule which is the union of self and schedule.