Snapshot¶
-
class
Snapshot
(label, snapshot_type='statevector', num_qubits=0, num_clbits=0, params=None)[source]¶ Bases:
qiskit.circuit.instruction.Instruction
Simulator snapshot instruction.
Create new snapshot instruction.
- Parameters
label (str) – the snapshot label for result data.
snapshot_type (str) – the type of the snapshot.
num_qubits (int) – the number of qubits for the snapshot type [Default: 0].
num_clbits (int) – the number of classical bits for the snapshot type [Default: 0].
params (list or None) – the parameters for snapshot_type [Default: None].
- Raises
ExtensionError – if snapshot label is invalid.
Methods
Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
Validation of the arguments.
Add classical condition on register or cbit classical and value val.
Copy of the instruction.
Defines qubits to snapshot for all snapshot methods
Special case.
Return True .IFF.
DEPRECATED: use instruction.reverse_ops().
Return a default OpenQASM string for the instruction.
Creates an instruction with gate repeated n amount of times.
For a composite instruction, reverse the order of sub-instructions.
Soft comparison between gates.
Instruction parameters has no validation or normalization.
Attributes
-
decompositions
¶ Get the decompositions of the instruction from the SessionEquivalenceLibrary.
-
definition
¶ Return definition in terms of other basic gates.
-
duration
¶ Get the duration.
-
label
¶ Return snapshot label
-
params
¶ return instruction params.
-
snapshot_type
¶ Return snapshot type
-
unit
¶ Get the time unit of duration.