Snapshot¶
- class Snapshot(label, snapshot_type='statevector', num_qubits=0, num_clbits=0, params=None)[source]¶
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.
Attributes
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
Return definition in terms of other basic gates.
Return snapshot label
return instruction params.
Return snapshot type
Methods
Snapshot.add_decomposition
(decomposition)Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
Snapshot.broadcast_arguments
(qargs, cargs)Validation of the arguments.
Snapshot.c_if
(classical, val)Add classical condition on register classical and value val.
Snapshot.copy
([name])Copy of the instruction.
Special case.
Return True .IFF.
For a composite instruction, reverse the order of sub-gates.
Return a default OpenQASM string for the instruction.
Creates an instruction with gate repeated n amount of times.