InitialState¶
- class InitialState[source]¶
Bases:
ABCAbstract base class for initial quantum state preparation.
Subclasses implement
build()to return aQuantumCircuitof sizelen(wires)that prepares the desired state. Qubitiof the returned circuit corresponds positionally towires[i]— thewiresargument exists purely to let callers communicate domain-level labels (e.g. graph node names) that subclasses may need for length / shape validation.Attributes Summary
Human-readable name of the initial state.
Methods Summary
build(wires)Return a state-preparation circuit on
len(wires)qubits.Attributes Documentation
- name¶
Human-readable name of the initial state.
Methods Documentation
- abstractmethod build(wires)[source]¶
Return a state-preparation circuit on
len(wires)qubits.- Parameters:
wires (
Sequence) – Ordered sequence of wire labels (qubiti↔wires[i]). May contain non-integer labels (e.g. graph node names); only the length and ordering matter for circuit emission.- Return type:
- Returns:
A
QuantumCircuitwithlen(wires)qubits.