このページはまだ翻訳されていません。英語の原文を表示しています。
IBM Quantum Composer
What is it?
IBM Quantum® Composer is a graphical quantum programming tool that lets you drag and drop operations to build quantum circuits and run them on quantum hardware.
What can it do?
Visualize qubit states
See how changes to your circuit affect the state of qubits, shown as an interactive q-sphere, or histograms showing measurement probabilities or statevector simulations.
Run on quantum hardware
Run your circuits on real quantum hardware to understand the effects of device noise.
Automatically generate code
Instead of writing code by hand, automatically generate OpenQASM or Python code that behaves the same way as the circuit you created with the Composer.
Tour of the interface
IBM Quantum Composer has a customizable set of tools that allow you to build, visualize, and run quantum circuits on quantum processing units (QPUs). Use the "More options" menu on each window to access additional tools and actions.
-
Operations catalog - These are the building blocks of quantum circuits. Drag and drop these gates and other operations onto the graphical circuit editor. Different types of gates are grouped together by color. For example, classical gates are dark blue, phase gates are light blue, and non-unitary operations are grey.
To learn about the available gates and operations, right-click an operation and select Info to read its definition.
-
Code editor - Use the View menu to open or close the code editor, which allows you to view the OpenQASM or Qiskit code for the circuit. You can edit the OpenQASM code; the Qiskit code is read-only.
-
Graphical circuit editor - This is where you build a circuit. Drag gates and other operations onto the horizontal qubit “wires” that make up your quantum register.
To remove a gate from a wire, select the gate and click the trash can icon.
To edit the parameters and settings on gates that support editing, select the gate on the graphical editor and click Edit.
-
Toolbar - Access frequently used tools to undo and redo actions, change the gate alignment, and switch to inspect mode. With inspect mode, you see a step-by-step view of the qubit states as you circuit computation evolves. To learn more, see Inspect your circuit, step-by-step.
-
Phase disks - The phase of the qubit state vector in the complex plane is given by the line that extends from the center of the diagram to the edge of the gray disk (which rotates counterclockwise around the center point).
Use the View menu to show or hide the phase disks.
-
Visualizations - Visualizations characterize your circuit as you build it. They use a single-shot statevector simulator, which is different from the QPU specified in the "Run circuit" settings. Note that the visualizations ignore any measurement operations you add. Sign in and click Run circuit to get results from the specified backend instead.
Learn more in the Visualizations section.
Build, edit, and inspect quantum circuits
If you want to continue working with a circuit at a later time, be sure to download your circuit file and store it locally before exiting your current Composer session. Use the "Save file" link in the upper-right corner, or go to the File menu and choose "Save file". When you are ready to work with the circuit again, go to the File menu and choose "Upload .qasm file", then navigate to your circuit file on your local drive and click Open.
1. Open IBM Quantum Composer
- (Optional) If you are not currently signed in to IBM Quantum, select Sign in in the upper right corner. Then, you can either sign in or Create an IBM Cloud account.
If you don’t sign in, the visualizations automatically show simulated results for up to four qubits. If you want to run your circuit on a quantum computer, or if you want to visualize a circuit that has more than four qubits, you must sign in.
-
Open IBM Quantum Composer by clicking the link on the Learning page navigation. The workspace displays an untitled empty circuit. You can either create a new circuit, or upload a .qasm file to continue working with with a circuit you've already created.
-
Name your circuit by clicking on the words Untitled circuit and typing in a name for your circuit. Click the checkmark to save the name.
-
(Optional) Customize your workspace:
- Use the View menu to change from the default theme to a monochrome theme. You can also select which panels to include on your workspace, then use the menu in the right corner of any panel to access options for further customization. The options to show or hide phase disks, choose the alignment of the qubits on your circuit, and reset the workspace to the default are in the View menu as well.
- Switch between dark and light workspace themes in the bottom-right corner of the footer.
To build a circuit, you can either drag and drop operations, or you can enter OpenQASM code into the code editor.