Skip to main content
SciNet
  • Home
  • All Courses
  • Calendar
  • Certificates
  • SciNet
    Main Site Documentation my.SciNet
  • CCDB
  • More
Close
Toggle search input
English
English Français
You are currently using guest access
Log in
SciNet
Home All Courses Calendar Certificates SciNet Collapse Expand
Main Site Documentation my.SciNet
CCDB
Expand all Collapse all
  1. Dashboard
  2. SCMP151 - Jun 2023
  3. Assignment 2: Grover search

Assignment 2: Grover search

Completion requirements
Opened: Tuesday, 6 June 2023, 1:30 PM
Due: Tuesday, 13 June 2023, 11:59 PM

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.

Contact site support
You are currently using guest access (Log in)
Data retention summary


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.
Powered by Moodle