[]
Overloads
| Name | Description |
|---|---|
(RealMatrix lhs [] const Fbit fbit) -> real | Array access operator with Fbit states. |
(ComplexMatrix lhs [] const List<Qbit> states) -> complex | Array access operator with qubit product states. |
(ComplexMatrix lhs [] const List<Fbit> states) -> complex | Array access operator with fermionic states. |
(ComplexMatrix lhs [] const Qbit qbit) -> complex | Array access operator with qubit product states. |
(ComplexMatrix lhs [] const Fbit fbit) -> complex | Array access operator with Fbit states. |
(RealMatrix lhs [] const List<Qbit> states) -> real | Array access operator with qubit product states. |
(RealMatrix lhs [] const List<Fbit> states) -> real | Array access operator with fermionic states. |
(RealMatrix lhs [] const Qbit qbit) -> real | Array access operator with qubit product states. |
(RealMatrix lhs [] const Fbit fbit) -> real
Array access operator with Fbit states.
Parameters
Example
var vec = vector([0,1,2,3])
vec[Fbit("01")] // Returns 2 (equivalent to vec[2])
(ComplexMatrix lhs [] const List<Qbit> states) -> complex
Array access operator with qubit product states.
Parameters
Example
var mat = matrix([[0,1,2],[3,4,5],[6,7,8]])
mat[[Qbit("00"), Qbit("01")]] // Returns 6 + 0i (equivalent to mat[0,2])
(ComplexMatrix lhs [] const List<Fbit> states) -> complex
Array access operator with fermionic states.
Parameters
Example
var mat = matrix([[0,1,2],[3,4,5],[6,7,8]])
mat[[Fbit("00"), Fbit("01")]] // Returns 6 (equivalent to mat[0,2])
(ComplexMatrix lhs [] const Qbit qbit) -> complex
Array access operator with qubit product states.
Parameters
Example
var vec = vector([0,1,2,3])
vec[Qbit("01")] // Returns 2 (equivalent to vec[2])
(ComplexMatrix lhs [] const Fbit fbit) -> complex
Array access operator with Fbit states.
Parameters
Example
var vec = vector([0,1,2,3])
vec[Fbit("01")] // Returns 2 (equivalent to vec[2])
(RealMatrix lhs [] const List<Qbit> states) -> real
Array access operator with qubit product states.
Parameters
Example
var mat = matrix([[0,1,2],[3,4,5],[6,7,8]])
mat[[Qbit("00"), Qbit("01")]] // Returns 6 + 0i (equivalent to mat[0,2])
(RealMatrix lhs [] const List<Fbit> states) -> real
Array access operator with fermionic states.
Parameters
Example
var mat = matrix([[0,1,2],[3,4,5],[6,7,8]])
mat[[Fbit("00"), Fbit("01")]] // Returns 6 (equivalent to mat[0,2])
(RealMatrix lhs [] const Qbit qbit) -> real
Array access operator with qubit product states.
Parameters
Example
var vec = vector([0,1,2,3])
vec[Qbit("01")] // Returns 2 (equivalent to vec[2])