Snapshot¶
- class Snapshot(label, snapshot_type='statevector', num_qubits=0, num_clbits=0, params=None)[소스]¶
기반 클래스:
Instruction
Simulator snapshot instruction.
Create new snapshot instruction.
- 매개변수
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].
- 예외 발생
ExtensionError – if snapshot label is invalid.
버전 0.9.0부터 폐지됨: This instruction has been deprecated and will be removed no earlier than 3 months from the 0.9.0 release date. It has been superseded by the save instructions in
qiskit.providers.aer.library
module.Methods
Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
Validation of the arguments.
Set a classical equality condition on this instruction between the register or cbit
classical
and valueval
.Copy of the instruction.
Defines qubits to snapshot for all snapshot methods
Special case.
Return True .IFF.
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
- name¶
Return the name.
- num_clbits¶
Return the number of clbits.
- num_qubits¶
Return the number of qubits.
- params¶
return instruction params.
- snapshot_type¶
Return snapshot type
- unit¶
Get the time unit of duration.