AWS braket documentation change
Summary
Removed all content related to TN1 tensor network simulator and updated simulator recommendations. Changed headings and consolidated simulator suitability information.
Security assessment
The changes involve removing documentation for TN1 simulator without mentioning security vulnerabilities, weaknesses, or incidents. The modifications appear to be routine documentation updates reflecting service changes rather than addressing security issues. No security features are added or discussed.
Diff
diff --git a/braket/latest/developerguide/choose-a-simulator.md b/braket/latest/developerguide/choose-a-simulator.md index 2022c2493..4bc16afb4 100644 --- a//braket/latest/developerguide/choose-a-simulator.md +++ b//braket/latest/developerguide/choose-a-simulator.md @@ -11 +11 @@ This section helps you select the Amazon Braket simulator that is best suited fo -**Choosing between local simulators and on-demand simulators (SV1, TN1, DM1)** +**Choosing between local simulators and on-demand simulators (SV1, DM1)** @@ -45 +45 @@ DM1 simulates quantum circuits with noise. It stores the full density matrix of -**What is a tensor network simulator?** +**Types of problems best suited for each simulator** @@ -47,33 +47 @@ DM1 simulates quantum circuits with noise. It stores the full density matrix of -TN1 encodes quantum circuits into a structured graph. - - * The nodes of the graph consist of quantum gates, or qubits. - - * The edges of the graph represent connections between gates. - - - - -As a result of this structure, TN1 can find simulated solutions for relatively large and complex quantum circuits. - -**TN1 requires two phases** - -Typically, TN1 operates in a two-phase approach to simulating quantum computation. - - * **The rehearsal phase:** In this phase, TN1 comes up with a way to traverse the graph in an efficient manner, which involves visiting every node so that you can obtain the measurement you desire. As a customer, you do not see this phase because TN1 performs both phases together for you. It completes the first phase and determines whether to perform the second phase on its own based on practical constraints. You have no input into that decision after the simulation has begun. - - * **The contraction phase:** This phase is analogous to the execution phase of a computation in a classical computer. The phase consists of a series of matrix multiplications. The order of these multiplications has a great effect on the difficulty of the computation. Therefore, the rehearsal phase is accomplished first to find the most effective computation paths across the graph. After it finds the contraction path during the rehearsal phase, TN1 contracts together the gates of your circuit to produce the results of the simulation. - - - - -**TN1 graphs are analogous to a map** - -Metaphorically, you can compare the underlying TN1 graph to the streets of a city. In a city with a planned grid, it is easy to find a route to your destination using a map. In a city with unplanned streets, duplicate street names, and so forth, it can be difficult to find a route to your destination by looking at a map. - -If TN1 did not perform the rehearsal phase, it would be like walking around the streets of the city to find your destination, instead of looking at a map first. It can really pay off in terms of walking time to spend more time looking at the map. Similarly, the rehearsal phase provides valuable information. - -You might say that the TN1 has a certain “awareness” of the structure of the underlying circuit that it traverses. It gains this awareness during the rehearsal phase. - -**Types of problems best suited for each of these types of simulators** - -SV1 is well-suited for any class of problems that rely primarily on having a certain number of qubits and gates. Generally, the time required grows linearly with the number of gates, while it does not depend on the number of shots. SV1 is generally faster than TN1 for circuits under 28 qubits. +SV1 is well-suited for any class of problems that rely primarily on having a certain number of qubits and gates. Generally, the time required grows linearly with the number of gates, while it does not depend on the number of shots. @@ -83,26 +51 @@ SV1 can be slower for higher qubit numbers because it actually simulates all pos -For many classes of problems, TN1 can evaluate much larger circuits in realistic time than SV1 because TN1 takes advantage of the structure of the graph. It essentially tracks the evolution of solutions from its starting place and it retains only the configurations that contribute to an efficient traversal. Put another way, it saves the configurations to create an ordering of matrix multiplication that results in a simpler evaluation process. - -For TN1, the number of qubits and gates matters, but the structure of the graph matters a lot more. For example, TN1 is very good at evaluating circuits (graphs) in which the gates are short-range (that is, each qubit is connected by gates only to its nearest neighbour qubits), and circuits (graphs) in which the connections (or gates) have similar range. A typical range for TN1 is having each qubit talk only to other qubits that are 5 qubits away. If most of the structure can be decomposed into simpler relationships such as these, which can be represented in _more_ , _smaller_ , or _more uniform_ matrices, TN1 performs the evaluation efficiently. - -**Limitations of TN1** - -TN1 can be slower than SV1 depending on the graph's structural complexity. For certain graphs, TN1 terminates the simulation after the rehearsal stage, and shows a status of `FAILED`, for either of these two reasons: - - * **Cannot find a path** — If the graph is too complex, it is too difficult to find a good traversal path and the simulator gives up on the computation. TN1 cannot perform the contraction. You may see an error message similar to this one: `No viable contraction path found.` - - * **Contraction stage is too difficult** — In some graphs, TN1 can find a traversal path, but it is very long and extremely time-consuming to evaluate. In this case, the contraction is so expensive that the cost would be prohibitive and instead, TN1 exits after the rehearsal phase. You may see an error message similar to this one: `Predicted runtime based on best contraction path found exceeds TN1 limit.` - - - - -###### Note - -You are billed for the rehearsal stage of TN1 even if contraction is not performed and you see a `FAILED` status. - -The predicted runtime also depends on the shot count. In worst-case scenarios, TN1 contraction time depends linearly on the shot count. The circuit may be contractable with fewer shots. For example, you might submit a quantum task with 100 shots, which TN1 decides is uncontractable, but if you resubmit with only 10, the contraction proceeds. In this situation, to attain 100 samples, you could submit 10 quantum tasks of 10 shots for the same circuit and combine the results in the end. - -As a best practice, we recommend that you always test your circuit or circuit class with a few shots (for example, 10) to find out how hard your circuit is for TN1, before you proceed with a higher number of shots. - -###### Note - -The series of multiplications that forms the contraction phase begins with small, NxN matrices. For example, a 2-qubit gate requires a 4x4 matrix. The intermediate matrices required during a contraction that is adjudged to be too difficult are gigantic. Such a computation would require days to complete. That is why Amazon Braket does not attempt extremely complex contractions. +DM1 is best suited for simulating circuits with noise. Use DM1 when you need to study the effects of noise on your circuit or when your algorithm requires density matrix operations. The runtime scales linearly with the number of operations but exponentially with the number of qubits, limiting DM1 to circuits of up to 17 qubits.