qsim

Optimized quantum circuit simulators
import cirq
import qsimcirq

# Pick up to ~25 qubits to simulate (requires ~256MB of RAM)
qubits = [cirq.GridQubit(i,j) for i in range(5) for j in range(5)]

# Define a circuit to run
# (Example is from the 2019 "Quantum Supremacy" experiement)
circuit = (cirq.experiments.
    random_rotations_between_grid_interaction_layers_circuit(
    qubits=qubits, depth=16))

# Measure qubits at the end of the circuit
circuit.append(cirq.measure(*qubits, key='all_qubits'))

# Simulate the circuit with qsim and return just the measurement values
# just like you would with Cirq
qsim_simulator = qsimcirq.QSimSimulator()
qsim_results = qsim_simulator.run(circuit, repetitions=5)
print('qsim results:')
print(qsim_results)

qsim

qsim is a full wave function simulator written in C++. It uses gate fusion, AVX/FMA vectorized instructions and multi-threading using OpenMP to achieve state of the art simulations of quantum circuits. qsim is integrated with Cirq and can be used to run simulations of up to 40 qubits on a 90 core Intel Xeon workstation.

Features and updates

Cirq is a python framework for writing, simulating, and executing quantum programs. Cirq's built in simulator is useful to around 20 qubits. By using the qsim Cirq simulator one can boost the number of qubits simulated to be mostly limited by available ram. Up to 40 qubits can be simulated on a 90 core Intel Xeon workstation.
Learn how to simulate up to 38 qubits on Google Cloud's Compute Engine. qsim has a prepackaged docker image that allows easy deployment of qsim, Juypter, and Cirq onto a virtual machine.
To help researchers and developers develop quantum algorithms today, we have made updates to qsim that make it more performant and intuitive, and more "hardware-like".
The integration between qsim and the NVIDIA cuQuantum SDK will enable qsim users to make the most of GPUs when developing quantum algorithms and applications.