Skip to main content

[]

Symbol of StateVector<Complex,Unknown,Dense,Complete>.

Overloads

NameDescription
(const StateVector<Complex,Unknown,Dense,Complete> lhs [] const integer index) -> const complexState vector coefficient access.
(const StateVector<Complex,Unknown,Dense,Complete> lhs [] const Qbit Qbit) -> const complexState vector coefficient access.
(const StateVector<Complex,Unknown,Dense,Complete> lhs [] const Fbit fbit) -> const complexState vector coefficient access.
(StateVector<Complex,Unknown,Dense,Complete> lhs [] const integer index) -> complexState vector coefficient access.
(StateVector<Complex,Unknown,Dense,Complete> lhs [] const Qbit Qbit) -> complexState vector coefficient access.
(StateVector<Complex,Unknown,Dense,Complete> lhs [] const Fbit fbit) -> complexState vector coefficient access.

(const StateVector<Complex,Unknown,Dense,Complete> lhs [] const integer index) -> const complex

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]), as_spinhalf) 
sv[2] // Returns 2

(const StateVector<Complex,Unknown,Dense,Complete> lhs [] const Qbit Qbit) -> const complex

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]), as_spinhalf)
sv[Qbit("01")] // Returns 2

(const StateVector<Complex,Unknown,Dense,Complete> lhs [] const Fbit fbit) -> const complex

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]), as_spinhalf)
sv[Qbit("01")] // Returns 2

(StateVector<Complex,Unknown,Dense,Complete> lhs [] const integer index) -> complex

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]), as_spinhalf) 
sv[2] // Returns 2

(StateVector<Complex,Unknown,Dense,Complete> lhs [] const Qbit Qbit) -> complex

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]), as_spinhalf)
sv[Qbit("01")] // Returns 2

(StateVector<Complex,Unknown,Dense,Complete> lhs [] const Fbit fbit) -> complex

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]), as_spinhalf)
sv[Qbit("01")] // Returns 2