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

Initialize.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

Initialize.definition

Return definition in terms of other basic gates.

Initialize.params

return instruction params.

Methods

Initialize.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

Initialize.assemble()

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.

Initialize.gates_to_uncompute()

Call to create a circuit with gates that take the desired vector to zero.

Initialize.inverse()

Invert this instruction.

Initialize.is_parameterized()

Return True .IFF.

Initialize.mirror()

DEPRECATED: use instruction.reverse_ops().

Initialize.qasm()

Return a default OpenQASM string for the instruction.

Initialize.repeat(n)

Creates an instruction with gate repeated n amount of times.

Initialize.reverse_ops()

For a composite instruction, reverse the order of sub-instructions.