Passer au contenu principal
SciNet
  • Accueil
  • Tous les cours
  • Calendrier
  • Certificats
  • SciNet
    Site principal Documentation my.SciNet
  • CCDB
  • Plus
Fermer
Activer/désactiver la saisie de recherche
Français
English Français
Vous êtes connecté anonymement
Connexion
SciNet
Accueil Tous les cours Calendrier Certificats SciNet Replier Déplier
Site principal Documentation my.SciNet
CCDB
Tout déplier Tout replier
  1. Tableau de bord
  2. SCMP151 - Jun 2023
  3. Assignment 2: Grover search

Assignment 2: Grover search

Conditions d’achèvement
Ouvert le : mardi 6 juin 2023, 13:30
À rendre : mardi 13 juin 2023, 23:59

Create a function which implements Grover search using a quantum circuit. The function should take 3 arguments: the number of wires, the number of iterations to apply the Grover operator, and a string which gives the solution. The function should output the final probability for all the register qubits.

>>> import grover
>>> grover.run_grover(3, 2, '010')
[0.0078125 0.0078125 0.9453125 0.0078125 0.0078125 0.0078125 0.0078125 0.0078125]
>>>

The PennyLane functions qml.broadcast (which can be used to apply single gates to many single wires) and qml.MultiControlledX (which applies a PauliX for an arbitrary set of controls) will be useful.

Contacter l’assistance du site
Vous êtes connecté anonymement (Connexion)
Résumé de conservation de données


All content on this website is made available under the Creative Commons Attribution 4.0 International licence, with the exception of all videos which are released under the Creative Commons Attribution-NoDerivatives 4.0 International licence.
Fourni par Moodle