Title: Homework 2
1Homework 2
- This homework is the first use of quantum gates.
In lectures we learned about the following gates
inverter, Feynman (controlled NOT), Toffoli
(Controlled-Controlled NOT), Hadamard, Fredkin
(Controlled Swap), Swap, Controlled Hadamard. You
should know the behavior of each of these gates
and a unitary matrix of each of them. Moreover,
you should understand the matrix and the
Kronecker multiplication. The homework has
several points. First read slides about classical
Braitenberg Vehicles.
1. Given is the circuits below. S1 and S2 are
sensors. M1 and M2 are motors. We are designing a
controller for a Quantum Braitenberg Vehicle.
Write the matrix of the entire circuit. Analyze
formally (calculate output vector) for every pure
input vector. Describe in your own words the
behavior of the vehicle with this control.
Simulate (by hand or software) the behavior of
the robot for the following inputs sequence
(S1,S2) 00, 00, 10, 10, 10, 11, 11, 01, 00, 01.
Use random number generator.
H
S1
M1
S2
M2
22. Given is the circuits below. S1 and S2 are
sensors. M1 and M2 are motors. C1 and C2 are
controls from switches. The user selects one of
four possible behaviors of the robot by assigning
values 0 and 1 to C1 and C2. (C1,C2) 00, 01,
10, 11. We are designing a controller for a
controlled Quantum Braitenberg Vehicle. Write the
matrix of the entire circuit. Analyze formally
(calculate output vector) for every pure input
vector. Describe in your own words the behavior
of the vehicle with this control. Simulate (by
hand or software) the behavior of the robot for
the following inputs sequence (S1,S2) 00, 00,
10, 10, 10, 11, 11, 01, 00, 01. Use random number
generator for every control C1 C2.
C1
Garbage 1
C2
Garbage 2
H
S1
M1
S2
M2
33. Given are all gates from first slide. You can
add your own quantum gates. Build arbitrary
quantum circuit that will create interesting
behaviors of QBV or Quantum Portland Faces. S1
and S2 are sensors. You can add more sensors. M1
and M2 are motors. You can add more motors. C1
and C2 are controls from switches. You can add
more controls. Write the matrix of the entire
circuit. Analyze formally (calculate output
vector) for every pure input vector. Describe in
your own words the behavior of the vehicle with
this control. Simulate (by hand or software) the
behavior of the robot for some interesting (your
choice) inputs sequences.
Toffoli
Fredkin
PSU Braitenberg Vehicle
4Portland Quantum Faces
Toffoli
Fredkin
In these faces you will have from 4 to 12 motors.
They have any numbers of sensors. You decide
where to put sensors and motors.