Thursday, June 6, 2024

Sharma7

 Started work on Sharma lesson 7. Below, with the current qiskit code.

                                                                


We are dealing with multiple qubits, so that representing the statevector will involve

permutations to the order of 2^n.

                                                                     
Qiskit will do the legwork and calculate the tensor product aka the Kroneger product.

For a tow qubit:

                                                              





For one gate at a time:





                                                                            


                                                                  *     *     *

From ChatGPT4

The Kronecker product, also known as the tensor product, is a mathematical operation that combines two matrices to produce a larger matrix. It is an important concept in quantum computing and linear algebra.
In quantum computing, the Kronecker product is used to represent the state of a composite quantum system composed of multiple subsystems or qubits. The Kronecker product allows the state of the overall system to be expressed as the tensor product of the states of the individual subsystems.
Formally, the Kronecker product of two matrices A and B is denoted as A ⊗ B and is defined as:
A ⊗ B = [a_ij * B]
where A is an m × n matrix and B is a p × q matrix, and the resulting Kronecker product is an (m × p) × (n × q) matrix.
For example, if we have:
A = [1 2]
    [3 4]
and
B = [5 6]
    [7 8]
then the Kronecker product A ⊗ B is:
A ⊗ B = [1*[5 6]  2*[5 6]]
        [3*[5 6]  4*[5 6]]
        [1*[7 8]  2*[7 8]]
        [3*[7 8]  4*[7 8]]
which is a 4 × 4 matrix:
A ⊗ B = [5 6 10 12]
        [35 40 70 80]
        [7 8 14 16]
        [49 56 98 112]
The Kronecker product is a fundamental operation in quantum computing, as it allows the representation of the state of a composite quantum system in terms of the states of its individual subsystems. It is widely used in the study of quantum algorithms, quantum error correction, and the simulation of quantum systems on classical computers. 

                               

No comments: