The main improvements of quantumsim can be found in QuantumSimComputationalImprovements.ipynb, and the full implementation in quantumsim_performante.py. This is only a minimal version (see: quantumsim_minima.py), however it does proof that this approach is effective at optimizing quantumsim. Nico's repository for QuantumSim can be found here.
- quantumsim.py: Nico's full implementation of QuantumSim
- quantumsim_minima.py: Only the basic features of quantum computer simulator, based on Nico's QuantumSim
- quantumsim_performante.py: An accelerated smaller version of QuantumSim, excluding noisy circuits.
- QuantumSimComputationalImprovements.ipynb: Outlines the improvements made in
quantumsim_performante.py - paper.pdf: Experimental paper about performance of QAOA across various graphs
- posters.pdf: Two reseach posters, one about QAOA, the other about
quantumsim_performante.py - paper/: Files for the paper
- reference_notebooks/: Essential reference notebooks used for paper's experiments
- assets/: Assets for quantum simulations, basically only noise parameters.
def qaoa_circuit(gamma:list[float], beta:list[float], nodes:list, edges:list, p:int) -> Circuit:
# Create circuit witn n qubits, where n is the number of nodes
n = len(nodes)
circuit = Circuit(n, use_lazy=True, use_GPU=True, use_cache=True)
# Initialize circuit by applying the Hadamard gate to all qubits
for q in range(n): circuit.hadamard(q)
# Construct p alternating cost and mixer layers
for i in range(p):
# Construct cost layer with parameter gamma[i]
for edge in edges:
circuit.cnot(edge[0], edge[1])
circuit.rotate_z(2 * gamma[i], edge[1])
circuit.cnot(edge[0], edge[1])
# Construct mixer layer with parameter beta[i]
for q in range(n): circuit.rotate_x(2 * beta[i], q)
return circuitThere was also an attempt at improving the performance of QuantumSim with noise. Sadly, this implementation was very incomplete, buggy and unvalidated. However, a similar approach could be used to implement the noisy version of QuantumSim.
I recommend to use the computational improvements I propose in the actual noiseless version of QuantumSim. However, I also recommend that the entire implementation of Quantum (with noise) is checked and refactored. There are a bunch of poor and inconcistant design choices that make it difficult to add and improve the implementation. A incomplete list of poorly implemented parts of QuantumSim:
- Two implementations of noise
- Two approaches to building unitary matrices (look at noisy CNOT)
- Some noisy gates, such as:
Rx, are not implemented. - In the execution, it is doing a string lookup in the description of the gate to change what it is doing.
Also, no one seems to understand how noise is actually implemented. The implementation was copied from a paper without understanding how the implementation works. This is concerning.
The paper presents an analysis of the Quantum Approximate Optimization Algorithm (QAOA)performance across various graph types, focusing on its application to the maxcut problem.
The paper uses QuantumSim Performante for its noiseless experiments. It does not talk about the implementation of QuantumSim Performante or its orignal implementation.