Repository navigation
Version 0.3.1 released
As we prepare the QuForge for new features, we made some changes to the structure of the library. Instead of having almost everything into a single python file, version 0.3.0 separates the features of the library into distinct files:
- aux.py: some auxilar functions to help the library work properly
- circuit.py: contains everything related to the circuit class
- cml.py: contains functions related to classical machine learning
- gates.py: this is the most important file, it contains all quantum gates the library has
- optimizer.py: functions for optimizing gates and circuits
- quforge.py: this file puts the most important things into a single nomenclature
- statevector.py: eveything related to state vectors
With this, if you want to create a state you can do it in two ways: using the quforge or statevector file:
import quforge.quforge as qf
state = qf.State('0')or
import quforge.statevector as sv
state = sv.State('0')And if you want to create and apply a gate, you can do it in three ways: using the quforge, gates or circuit file:
import quforge.quforge as qf
H = qf.H()
output = H(state)import quforge.quforge as qf
circuit = qf.Circuit()
circuit.H()
output = circuit(state)import quforge.gates as gates
H = gates.H()
output = H(state)import quforge.circuit as circuit
circuit = circuit.Circuit()
circuit.H()
output = H(state)All of them lead to the same results, so is up to user to choose which one is preferable.