Initialize¶
- class Initialize(params)[source]¶
Complex amplitude initialization.
Class that implements the (complex amplitude) initialization of some flexible collection of qubit registers (assuming the qubits are in the zero state). Note that Initialize is an Instruction and not a Gate since it contains a reset instruction, which is not unitary.
Create new initialize composite.
params (list): vector of complex amplitudes to initialize to
Attributes
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
Return definition in terms of other basic gates.
return instruction params.
Methods
Initialize.add_decomposition
(decomposition)Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
Initialize.broadcast_arguments
(qargs, cargs)Validation of the arguments.
Initialize.c_if
(classical, val)Add classical condition on register classical and value val.
Initialize.copy
([name])Copy of the instruction.
Call to create a circuit with gates that take the desired vector to zero.
Invert this instruction.
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.