Skip to main content
IBM Quantum Platform
이 페이지는 Qiskit SDK의 이전 버전입니다. 최신 버전으로 이동

qiskit.visualization.visualize_transition

qiskit.visualization.visualize_transition(circuit, trace=False, saveas=None, fpg=100, spg=2)

GitHub

Creates animation showing transitions between states of a single qubit by applying quantum gates.

Parameters

  • circuit (QuantumCircuit) – Qiskit single-qubit QuantumCircuit. Gates supported are h,x, y, z, rx, ry, rz, s, sdg, t, tdg and u1.
  • trace (bool) – Controls whether to display tracing vectors - history of 10 past vectors at each step of the animation.
  • saveas (str) – User can choose to save the animation as a video to their filesystem. This argument is a string of path with filename and extension (e.g. “movie.mp4” to save the video in current working directory).
  • fpg (int) – Frames per gate. Finer control over animation smoothness and computational needs to render the animation. Works well for tkinter GUI as it is, for jupyter GUI it might be preferable to choose fpg between 5-30.
  • spg (int) – Seconds per gate. How many seconds should animation of individual gate transitions take.

Returns

If arg jupyter is set to True. Otherwise opens tkinter GUI and returns after the GUI is closed.

Return type

IPython.core.display.HTML

Raises

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.