Skip to content

Quantronauts/quantum_data-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Qats & DoQs

DOI

Language grade: Python

All Contributors

  • Classifier of quantum cats and quantum dogs

Structure

  • Final script : qats_doqs.ipynb
  • Folders :
    • datas : folder for the Qats and DoQs csv files
    • sensors : folder for the differents sensors (quantum generation)
    • classifiers : folder for the differents classifiers
    • combine : folder for the differents combining algorithms
    • training : folder for the differents training algorithms
    • graphs : folder for the differents graphs generation
    • communication : folder for images and ressources to present the project

Idea

The classify regions of the Hilbert space. E.g. :

  • An hemisphere of the Bloch sphere is Qat
  • The other hemisphere is doQ

First create quantum state with variational parameters

  • As first step, we create a parameterized sensor that can create state vectors that fall either into the cat or dog region. (As black box)
    • We could use any other sensor with different parameterization as long as it's capable of producing dog and cat states.
  • Then, we feed the output state of the sensor into a parameterized classifier circuit
  • Then, we optimize the classifier
  • Finally measure them and drawing graph
        |----------|  |------------------------------------------------------|
	|  Sensor  |  |                    Processing                        |    
        | |------| |  | |-----------|                          |-----------| |      |---------|
        |-| S(x) |-|--|-| U11λ1ϕ1) |---------...---...--------| Ummλmϕm) |-|------| MEASURE |
        | |------| |  | |-----------|                          |-----------| |      |---------|
  	|----------|  |------------------------------------------------------|           |
  c0   ----------------------------------------------------------------------------------o-----

Catch

  • During operation, we cannot calculate expected values, because the sensor can run only once. So when we calculate the accuracy on the test set, we are not allowed to calculate expected values... we can run the circuit just once, make the PauliZ measurement, and if the result is "-1" we say "dog", if it's 1 we say "cat". (On the other hand, in the training phase we can optimize the circuit parameters, the thetas, using expected values of the measurements, as training is done in our laboratory. But operation may happen e.g. in a self-driving car.)

Compare with

  • The standard way of testing, that is, when we can run the circuit multiple times to get expected value of the PauliZ measurement :
    • The result can be e.g. 0.5, then we classify it as "cat", as it's closer to 1 than to -1. (So, you see that when we can run the circuit only once, we can be unlucky that we get -1, even if the expected value over many runs is 0.5.)

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Sahar Ben Rached

💻

Alain

💻

LQuerellaZ

💻

Tamás Varga

💻

Mica

💻

This project follows the all-contributors specification. Contributions of any kind welcome!