Skip to content

My quantum algorithm for the solution to task 1 of QOSF cohort 4 screening tests. The code is written using QISKIT. The task was to design a quantum circuit that considers as input a vector of integers and returns a quantum state which is a superposition of indices of the target solution. The target solution consists of those integers whose bina…

Notifications You must be signed in to change notification settings

gaurav-iiser/qosf_task1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

qosf_task1

My quantum algorithm for the solution to task 1 of QOSF cohort 4 screening tests. The code is written using QISKIT.

Problem Statement: The task was to design a quantum circuit that considers as input a vector of integers and returns a quantum state which is a superposition of indices of the target solution. The target solution consists of those integers whose binary representation's adjacent bits have different values.

This contains the .ipynb file to exceute the task 1 of qosf mentorship program. The code is written using QISKIT.

To execute the code:

  1. Run the given two blocks of codes.
  2. Then define a variable of type Task_1 and initialize it with the list of integers (of any length) as follows:
    For eg: c = Task_1([1,5,7,10])
  3. The output will contain:
    a. A histogram indicating the states of superpostion and their coefficient in the superposed state.
    b. The state vector of the final quantum state.

The code works for any kind of list of integers, even for lists with repeated entries.

About

My quantum algorithm for the solution to task 1 of QOSF cohort 4 screening tests. The code is written using QISKIT. The task was to design a quantum circuit that considers as input a vector of integers and returns a quantum state which is a superposition of indices of the target solution. The target solution consists of those integers whose bina…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published