Skip to content

Commit

Permalink
Revert "Add Clifford-only simulator (Stim) (#2193)"
Browse files Browse the repository at this point in the history
This reverts commit 70d00f3.
  • Loading branch information
bmhowe23 committed Sep 12, 2024
1 parent 70d00f3 commit e59e3e1
Show file tree
Hide file tree
Showing 35 changed files with 11 additions and 533 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,3 @@
path = tpls/Crow
url = https://github.com/CrowCpp/Crow.git
ignore = dirty
[submodule "tpls/Stim"]
path = tpls/Stim
url = https://github.com/quantumlib/Stim
8 changes: 0 additions & 8 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,3 @@ Tweedledum - MIT License
License at <https://github.com/boschmitt/tweedledum/blob/master/LICENSE>

----------------------------------------------------------------

Stim - Apache License 2.0
<https://github.com/quantumlib/Stim>

The incorporated source code and its license can be found as a submodule on the CUDA-Q repository.
License at <https://github.com/quantumlib/Stim/blob/main/LICENSE>

----------------------------------------------------------------
1 change: 0 additions & 1 deletion docs/sphinx/using/backends/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CUDA-Q Backends
* :ref:`qpp-cpu <qpp-cpu-backend>`
* :ref:`quantinuum <quantinuum-backend>`
* :ref:`remote-mqpu <mqpu-platform>`
* :ref:`stim <stim-backend>`
* :ref:`tensornet <tensor-backends>`
* :ref:`tensornet-mps <tensor-backends>`

Expand Down
34 changes: 0 additions & 34 deletions docs/sphinx/using/backends/simulators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -300,40 +300,6 @@ use the following commands:
./program.x
Clifford-Only Simulation (CPU)
++++++++++++++++++++++++++++++++++

.. _stim-backend:

This target provides a fast simulator for circuits containing *only* Clifford
gates. Any non-Clifford gates (such as T gates and Toffoli gates) are not
supported. This simulator is based on the `Stim <https://github.com/quantumlib/Stim>`_
library.

To execute a program on the :code:`stim` target, use the following commands:

.. tab:: Python

.. code:: bash
python3 program.py [...] --target stim
The target can also be defined in the application code by calling

.. code:: python
cudaq.set_target('stim')
If a target is set in the application code, this target will override the :code:`--target` command line flag given during program invocation.

.. tab:: C++

.. code:: bash
nvq++ --target stim program.cpp [...] -o program.x
./program.x
Tensor Network Simulators
==================================

Expand Down
91 changes: 0 additions & 91 deletions python/tests/backends/test_stim.py

This file was deleted.

1 change: 0 additions & 1 deletion runtime/nvqir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ install(TARGETS ${LIBRARY_NAME}
INCLUDES DESTINATION include/nvqir)

add_subdirectory(qpp)
add_subdirectory(stim)

if (CUSTATEVEC_ROOT AND CUDA_FOUND)
add_subdirectory(custatevec)
Expand Down
12 changes: 1 addition & 11 deletions runtime/nvqir/CircuitSimulator.h
Original file line number Diff line number Diff line change
Expand Up @@ -750,17 +750,7 @@ class CircuitSimulatorBase : public CircuitSimulator {
summaryData.svGateUpdate(
next.controls.size(), next.targets.size(), stateDimension,
stateDimension * sizeof(std::complex<ScalarType>));
try {
applyGate(next);
} catch (std::exception &e) {
while (!gateQueue.empty())
gateQueue.pop();
throw e;
} catch (...) {
while (!gateQueue.empty())
gateQueue.pop();
throw std::runtime_error("Unknown exception in applyGate");
}
applyGate(next);
if (executionContext && executionContext->noiseModel) {
std::vector<std::size_t> noiseQubits{next.controls.begin(),
next.controls.end()};
Expand Down
42 changes: 0 additions & 42 deletions runtime/nvqir/stim/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit e59e3e1

Please sign in to comment.