Description Usage Arguments Value Examples
Returns a ket (column vector) that has the encoded value of the specified integers. Implements what is commonly known as basis encoding. Does not simulate the state creation.
1 |
x |
Integer, or vector of integers, specifying the integer encoded state(s) of the ket |
n |
Integer specifying the number of qubits in the ket |
amplitudes |
Integer, or vector of integers, specifying the amplitudes for corresponding basis in x. Must be same length as x. Only relative values matter as the ket will be normalized. Default is for all states to have same amplitude. |
Column vector containing normalized amplitudes of a ket
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.