Releases: tiago939/QuForge
Version 0.2.0 released
This version has the following changes:
-
Bug fix in the controlled rotation gates where if the target index was smaller than the control index, it would throw an error.
-
Now you do not need to specify anymore the number of wires of the custom gate using the circuit class:
Before:
circuit = qf.Circuit(dim=qudit_dimension, wires=your_number_of_qudits)
circuit.Custom(matrix, wires=your_number_of_qudits)
After
circuit = qf.Circuit(dim=qudit_dimension, wires=your_number_of_qudits)
circuit.Custom(matrix)
- Added the controlled universal gate. This gate is the controlled version of the universal gate, you need to specify which control states will be used in order to apply the universal gate on the target qudit. For instance:
dim = 3
wires = 2
CU = qf.CU(dim=dim, index=[0,1], control_state=[1])
initial_state = qf.State('1-0', dim=dim)
output_state = CU(initial_state)
print(output_state)
In the code above, only when the control qudit has state |1> then the universal gate will be applied on the targert qudit.
or
dim = 3
wires = 2
CU = qf.CU(dim=dim, index=[0,1], control_state=[1,2])
initial_state = qf.State('1-0', dim=dim)
output_state = CU(initial_state)
print(output_state)
Now, the universal gate will be applied on the target qudit if control qudit has either the states |1> or |2>.
Version 0.1.13 released
This version fixes a problem when specifying manually the angle parameters of the rotation gates. Now these gates receives explicitly the number of qudits (wires) of the circuit.
Additionally, we have implemented a experimental gate called "Universal Gate", that parameterize the entire Hilbert space, allowing building highly expressive circuits. You can use it stand alone as:
U = qf.U(dim=dim, wires=wires)
or inside a circuit, for instance:
circuit = qf.Circuit(dim=2, wires=3)
circuit.U()
state = qf.State('0-0-0')
circuit(state)
Version 0.1.12 released
This version fixes a problem in the measurement function, now it needs the number of qudits as the argument.
Before:
histogram, p = qf.measure(state=yourstate, dim=dim)
After:
histogram, p = qf.measure(state=yourstate, dim=dim, wires=wires)
Additionally, we fixed a typo in the docs.
Before:
import quforge as qf
Now it reads:
import quforge.quforge as qf
v0.1.1
We moved the library to PyPi package, you can now install it with pip!
pip install quforge
Other changes:
-
Changed license to Apache 2
-
Added some non-linear PyTorch functions. For instance, you can call the hyperbolic tangent as:
import quforge.quforge as qf
tanh = qf.Tanh()
y = tanh(x)
- A few updates on the documentation quforge.readthedocs.io