qml.devices.qubit.create_initial_state¶
- create_initial_state(wires, prep_operation=None, like=None)[source]¶
Returns an initial state, defaulting to \(\ket{0}\) if no state-prep operator is provided.
- Parameters
wires (Union[Wires, Iterable]) – The wires to be present in the initial state
prep_operation (Optional[StatePrepBase]) – An operation to prepare the initial state
like (Optional[str]) – The machine learning interface used to create the initial state. Defaults to None
- Returns
The initial state of a circuit
- Return type
array
code/api/pennylane.devices.qubit.create_initial_state
Download Python script
Download Notebook
View on GitHub