[]
Symbol of StateVector<Real,Dense>.
Overloads
| Name | Description |
|---|---|
(StateVector<Real,Dense> lhs [] const Fbit fbit) -> real | State vector coefficient access. |
(StateVector<Real,Dense> lhs [] const Qbit qbit) -> real | State vector coefficient access. |
(StateVector<Real,Dense> lhs [] const integer index) -> real | State vector coefficient access. |
(const StateVector<Real,Dense> lhs [] const Qbit qbit) -> const real | State vector coefficient access. |
(const StateVector<Real,Dense> lhs [] const Fbit fbit) -> const real | State vector coefficient access. |
(const StateVector<Real,Dense> lhs [] const integer index) -> const real | State vector coefficient access. |
(StateVector<Real,Dense> lhs [] const Fbit fbit) -> real
State vector coefficient access.
Parameters
- lhs: Left-hand side value.
- fbit: A Qbit object whose bitstring representation is interpreted as an integer.
Example
var sv = state_vector(vector([0,1,2,3]))
sv[Qbit("01")] // Returns 2
(StateVector<Real,Dense> lhs [] const Qbit qbit) -> real
State vector coefficient access.
Parameters
- lhs: Left-hand side value.
- qbit: A Qbit object whose bitstring representation is interpreted as an integer.
Example
var sv = state_vector(vector([0,1,2,3]))
sv[Qbit("01")] // Returns 2
(StateVector<Real,Dense> lhs [] const integer index) -> real
State vector coefficient access.
Parameters
- lhs: Left-hand side value.
- index: Index of the vector element to access.
Example
var sv = state_vector(vector([0,1,2,3]))
sv[2] // Returns 2
(const StateVector<Real,Dense> lhs [] const Qbit qbit) -> const real
State vector coefficient access.
Parameters
- lhs: Left-hand side value.
- qbit: A product state of qubits interpreted as an integer.
Example
var sv = state_vector(vector([0,1,2,3]))
sv[Qbit("01")] // Returns 2
(const StateVector<Real,Dense> lhs [] const Fbit fbit) -> const real
State vector coefficient access.
Parameters
- lhs: Left-hand side value.
- fbit: A product state of qubits interpreted as an integer.
Example
var sv = state_vector(vector([0,1,2,3]))
sv[Qbit("01")] // Returns 2
(const StateVector<Real,Dense> lhs [] const integer index) -> const real
State vector coefficient access.
Parameters
- lhs: Left-hand side value.
- index: Index of the vector element to access.
Example
var sv = state_vector(vector([0,1,2,3]))
sv[2] // Returns 2