diff --git a/translations/ja/build/_toc.json b/translations/ja/build/_toc.json index 23133edeb4d..413510c427e 100644 --- a/translations/ja/build/_toc.json +++ b/translations/ja/build/_toc.json @@ -1,81 +1,81 @@ { - "title": "Build", + "title": "構築", "collapsed": true, "children": [ { - "title": "Introduction", + "title": "はじめに", "url": "/build" }, { - "title": "Build circuits with Qiskit", + "title": "Qiskit による回路の構築", "children": [ { - "title": "Circuit library", + "title": "回路ライブラリ", "url": "/build/circuit-library" }, { - "title": "Construct circuits", + "title": "回路の構築", "url": "/build/circuit-construction" }, { - "title": "Visualize circuits", + "title": "回路の可視化", "url": "/build/circuit-visualization" }, { - "title": "Classical feedforward and control flow", + "title": "古典的なフィードフォワードと制御フロー", "url": "/build/classical-feedforward-and-control-flow" }, { - "title": "Synthesize unitary operations", + "title": "ユニタリー演算子の合成", "url": "/build/unitary-synthesis" }, { - "title": "Bit-ordering in Qiskit", + "title": "Qiskit でのビット順序", "url": "/build/bit-ordering" } ] }, { - "title": "Build operators with Qiskit", + "title": "Qiskit による演算子の構築", "children": [ { - "title": "Operators module overview", + "title": "演算子モジュールの概要", "url": "/build/operators-overview" }, { - "title": "Specify observables in the Pauli basis", + "title": "パウリ基底での観測量の指定", "url": "/build/specify-observables-pauli" } ] }, { - "title": "Other circuit-building tools", + "title": "その他の回路構築ツール", "children": [ { - "title": "Pulse schedules", + "title": "パルススケジュール", "url": "/build/pulse" }, { "title": "OpenQASM", "children": [ { - "title": "Introduction to OpenQASM", + "title": "OpenQASM の入門", "url": "/build/introduction-to-qasm" }, { - "title": "OpenQASM 2 and Qiskit", + "title": "OpenQASM 2 と Qiskit", "url": "/build/interoperate-qiskit-qasm2" }, { - "title": "OpenQASM 3 and Qiskit", + "title": "OpenQASM 3 と Qiskit", "url": "/build/interoperate-qiskit-qasm3" }, { - "title": "OpenQASM 3 feature table", + "title": "OpenQASM 3 特徴テーブル", "url": "/build/qasm-feature-table" }, { - "title": "OpenQASM 3.x Live Specification", + "title": "OpenQASM 3.x ライブ仕様", "url": "https://openqasm.com/" } ] diff --git a/translations/ja/build/bit-ordering.mdx b/translations/ja/build/bit-ordering.mdx index 08c0d784509..a16b7bc9139 100644 --- a/translations/ja/build/bit-ordering.mdx +++ b/translations/ja/build/bit-ordering.mdx @@ -1,23 +1,21 @@ --- -title: Bit-ordering in Qiskit -description: Learn about Qiskit's ordering conventions and why we chose them +title: Qiskit でのビット順序 +description: Qiskit の順序付け規則とその規則を選択した理由について学習します --- -# Bit-ordering in Qiskit +# Qiskit でのビット順序 -If you have a set of $n$ bits (or qubits), you'll usually label each bit $0 -\\rightarrow n-1$. Different softwares and resources must choose how they order -these bits both in computer memory and when displayed on-screen. +$n$ ビット(または量子ビット)のセットがある場合、通常。各ビットに $0 +\\rightarrow n-1$ とラベル付けします。 それぞれのソフトウェアやリソースは、コンピューターメモリ内と画面上に表示されるときにこれらのビットをどのように順序付けるかを選択する必要があります。 -## Qiskit conventions +## Qiskit の規則 -Here's how Qiskit orders bits in different scenarios. +様々なシナリオで Qiskit がビットをどのように順序付けるかを説明します。 -### Quantum circuits +### 量子回路 -The `QuantumCircuit` class stores its qubits in a list -(`QuantumCircuit.qubits`). The index of a qubit in this list defines the -qubit's label. +`QuantumCircuit` クラスは、リスト(`QuantumCircuit.qubits`)に量子ビットを格納しています。 このリストの量子ビットのインデックスが +量子ビットのラベルとなります。 ```python from qiskit import QuantumCircuit @@ -29,12 +27,10 @@ qc.qubits[0] # qubit "0" Qubit(QuantumRegister(2, 'q'), 0) ``` -### Circuit diagrams +### 回路ダイアグラム -On a circuit diagram, qubit $0$ is the topmost qubit, and qubit $n$ the -bottommost qubit. You can change this with the `reverse_bits` argument of -`QuantumCircuit.draw` (see [Change ordering in -Qiskit](#change-ordering-in-qiskit)). +回路ダイアグラムでは、量子ビット $0$ が最上位の量子ビットであり、量子ビット $n$ が最下位の量子ビットです。 これは `QuantumCircuit.draw` の `reverse_bits` 引数で変更できます([Change ordering in +Qiskit](#change-ordering-in-qiskit) をご覧ください)。 ```python qc.x(1) @@ -48,14 +44,12 @@ q_1: ┤ X ├ └───┘ ``` -### Integers +### 整数 -When interpreting bits as a number, bit $0$ is the least significant bit, and -bit $n$ the most significant. This is helpful when coding because each bit has -the value $2^\\text{label}$ (label being the qubit's index in -`QuantumCircuit.qubits`). For example, the following circuit execution ends -with bit $0$ being `0`, and bit $1$ being `1`. This is interpreted as the -decimal integer `2` (measured with probability `1.0`). +ビットを数値として解釈する場合、ビット $0$ は最下位ビット、ビット $n$ は最上位ビットとなります。 各ビットには値 $2^\\text{label}$ があるため、 +コーディングの際に役立ちます(ラベルは `QuantumCircuit.qubits` +の量子ビットのインデックス)。 例えば、次の回路の実行は、ビット $0$ が `0`、 +ビット $1$ が `1` となります。 これは 10 進整数 `2`(確率 `1.0` で測定)として解釈されます。 ```python from qiskit.primitives import Sampler @@ -67,16 +61,13 @@ Sampler().run(qc).result().quasi_dists[0] {2: 1.0} ``` -### Strings +### 文字列 -When displaying or interpreting a list of bits (or qubits) as a string, bit -$n$ is the leftmost bit, and bit $0$ is the rightmost bit. This is because we -usually write numbers with the most significant digit on the left, and in -Qiskit, bit $n$ is interpreted as the most significant bit. +ビット(または量子ビット)のリストを文字列として表示または解釈する場合、ビット $n$ は左端のビット、$0$ は右端のビットとなります。 これは通常、最上位の桁を左に数字を書くためであり、Qiksit ではビット $n$ が最上位ビットとして解釈されるためです。 -For example, the following cell defines a `Statevector` from a string of -single-qubit states. In this case, qubit $0$ is in state $|{+}\\rangle$, and -qubit $1$ in state $|0\\rangle$. +例えば、次のセルは、単一量子ビット状態の文字列から `Statevector` +を定義しています。 この場合、量子ビット $0$ は状態 $|{+}\\rangle$ であり、 +量子ビット $1$ は 状態 $|0\\rangle$ にあります。 ```python from qiskit.quantum_info import Statevector @@ -88,15 +79,11 @@ sv.probabilities_dict() {'00': 0.4999999999999999, '01': 0.4999999999999999} ``` -This occasionally causes confusion when interpreting a string of bits, as you -might expect the leftmost bit to be bit $0$, whereas it usually represents bit -$n$. +左端のビットがビット $0$ であることを期待するにもかかわらず、通常はビット $n$ を表すため、これはたまにビットの文字列を解釈する際に混乱を招くことがあります。 -### Statevector matrices +### 状態ベクトル行列 -When representing a statevector as a list of complex numbers (amplitudes), -Qiskit orders these amplitudes such that the amplitude at index $x$ represents -the computational basis state $|x\\rangle$. +状態ベクトルを複素数のリスト(振幅)として表す場合、Qiskit はこれらの振幅を、インデックス $x$ の振幅が計算基底状態 $|x\\rangle$ を表すように順序付けます。 ```python print(sv[1]) # amplitude of state |01> @@ -108,13 +95,12 @@ print(sv[2]) # amplitude of state |10> 0j ``` -### Gates +### ゲート -Each gate in Qiskit can interpret a list of qubits in its own way, but -controlled gates usually follow the convention `(control, target)`. +Qiskit の各ゲートは、独自の方法で量子ビットのリストを解釈できますが、制御ゲートは通常 `(制御, ターゲット)` の規則に従います。 -For example, the following cell adds a controlled-X gate where qubit $0$ is -the control and qubit $1$ is the target. +例えば、次のセルは、量子ビット $0$ が制御で量子ビット $1$ がターゲット +であり制御Xゲートを追加します。 ```python from qiskit import QuantumCircuit @@ -130,9 +116,7 @@ q_1: ┤ X ├ └───┘ ``` -Following all the previously mentioned conventions in Qiskit, this CX-gate -performs the transformation $|01\\rangle \\leftrightarrow |11\\rangle$, so has the -following matrix. +Qiskit のこれまでに述べたすべての規則に従うと、この CX-gate は変換 $|01\\rangle \\leftrightarrow |11\\rangle$ を実行するため、以下の行列を持ちます。 $$ \\begin{pmatrix} @@ -143,11 +127,9 @@ $$ \\end{pmatrix} $$ -## Change ordering in Qiskit +## Qiskit での順序の変更 -To draw a circuit with qubits in reversed order (that is, qubit $0$ at the -bottom), use the `reverse_bits` argument. This only affects the generated -diagram and does not affect the circuit; the X-gate still acts on qubit $0$. +量子ビットを使って逆順で回路を描画するには(量子ビット $0$ を下)、`reverse_bits` 引数を使用します。 これは生成されたダイアグラムのみに影響し、回路には影響しないため、X-gate はそのまま量子ビット $0$ に対して動作します。 ```python from qiskit import QuantumCircuit @@ -163,8 +145,7 @@ q_0: ┤ X ├ └───┘ ``` -You can use the `reverse_bits` method to return a new circuit with the -qubits' labels reversed (this does not mutate the original circuit). +`reverse_bits` メソッドを使って、量子ビットのラベルが反転した状態で新しい回路を返すことができます(元の回路は変更されません)。 ```python qc.reverse_bits().draw() @@ -177,11 +158,11 @@ q_1: ┤ X ├ └───┘ ``` -Note that in this new circuit, the X-gate acts on qubit $1$. +この新しい回路では、X-gate は量子ビット $1$ に対して動作することに注意してください。 -## Next steps +## 次のステップ - - See an example of using circuits in the [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) tutorial. - - Explore the [QuantumCircuit API](/api/qiskit/qiskit.circuit.QuantumCircuit#quantumcircuit) reference. + - [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) チュートリアルで、回路の使用例をご覧ください。 + - [QuantumCircuit API](/api/qiskit/qiskit.circuit.QuantumCircuit#quantumcircuit) リファレンスを詳しくご覧ください。 diff --git a/translations/ja/build/circuit-construction.ipynb b/translations/ja/build/circuit-construction.ipynb index 0fe813051f8..0c5d65b1e7b 100644 --- a/translations/ja/build/circuit-construction.ipynb +++ b/translations/ja/build/circuit-construction.ipynb @@ -5,7 +5,7 @@ "id": "bc54d7bc-b2d8-4b30-9b0b-05689e07a463", "metadata": {}, "source": [ - "# Construct circuits" + "# 回路の構築" ] }, { @@ -13,7 +13,7 @@ "id": "c50d8e43-ae82-4e41-8d17-a37332d1bf6d", "metadata": {}, "source": [ - "This page takes a closer look at Qiskit's [`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit) class, including some more advanced methods you can use to create quantum circuits." + "このページでは、Qiskit の [`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit) クラスを詳しく説明します。これには、量子回路の作成に使用できるより高度なメソッドもいくつか含まれています。" ] }, { @@ -21,9 +21,9 @@ "id": "2664d407-aa95-43a3-9101-d3ad58c2df58", "metadata": {}, "source": [ - "## What is a quantum circuit?\n", + "## 量子回路とは?\n", "\n", - "A simple quantum circuit is a collection of qubits and a list of instructions that act on those qubits. To demonstrate, the following cell creates a new circuit with two new qubits, then displays the circuit's [`qubits`](/api/qiskit/qiskit.circuit.QuantumCircuit#qubits) attribute." + "単純な量子回路は、量子ビットとその量子ビットに作用する命令リストの集合です。 実演すると、以下のセルは、2 つの新しい量子ビットで新しい回路を作成し、次に回路の [`qubits`](/api/qiskit/qiskit.circuit.QuantumCircuit#qubits) 属性を表示しています。" ] }, { @@ -55,7 +55,7 @@ "id": "f5c95cb2-a94f-48f3-b2a6-8ec6c25da5cd", "metadata": {}, "source": [ - "Adding an instruction to the circuit appends the instruction to the circuit's [`data`](/api/qiskit/qiskit.circuit.QuantumCircuit#data) attribute. The following cell output shows `data` is a list of [`CircuitInstruction`](/api/qiskit/qiskit.circuit.CircuitInstruction) objects, each of which has an `operation` attribute, and a `qubits` attribute." + "回路に命令を追加すると、命令は回路の [`data`](/api/qiskit/qiskit.circuit.QuantumCircuit#data) 属性に追加されます。 以下のセル出力は、`data` がそれぞれに `operation` 属性と `qubits` 属性を持つ [`CircuitInstruction`](/api/qiskit/qiskit.circuit.CircuitInstruction) オブジェクトのリストであることを示しています。" ] }, { @@ -85,7 +85,7 @@ "id": "17a82d8a-b717-44b8-b3f8-ce89e2588261", "metadata": {}, "source": [ - "The easiest way to view this information is through the [`draw`](/api/qiskit/qiskit.circuit.QuantumCircuit#draw) method, which returns a visualization of a circuit. See [Visualize circuits](/build/circuit-visualization) for different ways of displaying quantum circuits." + "情報を表示する最も簡単な方法は、[`draw`](/api/qiskit/qiskit.circuit.QuantumCircuit#draw) メソッドです。これは回路の可視化を返します。 量子回路のさまざまな表示方法について、[Visualize circuits](/build/circuit-visualization) をご覧ください。" ] }, { @@ -115,7 +115,7 @@ "id": "ab5f4bc9-7d7c-4ee7-b1bc-70a313b4fe29", "metadata": {}, "source": [ - "Circuit instruction objects can contain \"definition\" circuits that describe the instruction in terms of more fundamental instructions. For example, the [X-gate](/api/qiskit/qiskit.circuit.library.XGate) is defined as a specific case of the [U3-gate](/api/qiskit/qiskit.circuit.library.U3Gate), a more general single-qubit gate." + "回路命令オブジェクトには、より基本的な命令の観点から命令を記述する \"定義\" 回路が含まれます。 例えば、[X-gate](/api/qiskit/qiskit.circuit.library.XGate) は、より一般的な単一量子ビットゲートである [U3-gate](/api/qiskit/qiskit.circuit.library.U3Gate) の東低のケースとして定義されています。" ] }, { @@ -147,12 +147,12 @@ "id": "ee893af1-db43-449f-bfc4-8f636bd98546", "metadata": {}, "source": [ - "Instructions and circuits are similar in that they both describe operations on bits and qubits, but they have different purposes:\n", + "命令と回路はいずれもビットと量子ビットの演算を記述するという点で似ていますが、目的が異なります。\n", "\n", - "- Instructions are treated as fixed, and their methods will usually return new instructions (without mutating the original object).\n", - "- Circuits are designed to be built over many lines of code, and [`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit) methods often mutate the existing object.\n", + "- 命令は固定として扱われ、そのメソッドは通常新しい命令を返します(元のオブジェクトを変更せずに)。\n", + "- 回路は多数のコードに対して構築されるように設計されており、[`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit) メソッドは既存のオブジェクトを変更することがよくあります。\n", "\n", - "The rest of this page illustrates how to manipulate quantum circuits." + "このページの残りの部分では、量子回路の操作方法を説明します。" ] }, { @@ -160,9 +160,9 @@ "id": "ff4f08f3-48eb-454c-9647-2af505bf79bc", "metadata": {}, "source": [ - "## Build circuits\n", + "## 回路の構築\n", "\n", - "Methods such as [`QuantumCircuit.h`](/api/qiskit/qiskit.circuit.QuantumCircuit#h) and [`QuantumCircuit.cx`](/api/qiskit/qiskit.circuit.QuantumCircuit#cx) add specific instructions to circuits. To add instructions to a circuit more generally, use the [`append`](/api/qiskit/qiskit.circuit.QuantumCircuit#append) method. This takes an instruction and a list of qubits to apply the instruction to. See the [Circuit Library API documentation](/api/qiskit/circuit_library) for a list of supported instructions." + "[`QuantumCircuit.h`](/api/qiskit/qiskit.circuit.QuantumCircuit#h) や [`QuantumCircuit.cx`](/api/qiskit/qiskit.circuit.QuantumCircuit#cx) などのメソッドは、回路に特定の命令を追加します。 より一般的に命令を回路に追加するには、[`append`](/api/qiskit/qiskit.circuit.QuantumCircuit#append) メソッドを使用します。 これは、命令と命令を適用する量子ビットのリストを取ります。 サポートされている命令のリストについては、[Circuit Library API documentation](/api/qiskit/circuit_library) をご覧ください。" ] }, { @@ -199,10 +199,10 @@ "id": "bbdbef08-07c0-4fb0-ab3e-ed6efb7a3dc3", "metadata": {}, "source": [ - "To combine two circuits, use the [`compose`](/api/qiskit/qiskit.circuit.QuantumCircuit#compose) method. This accepts another [`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit) and an optional list of qubit mappings.\n", + "2 つの回路を結合するには、[`compose`](/api/qiskit/qiskit.circuit.QuantumCircuit#compose) メソッドを使用します。 これは、別の [`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit) とオプションの量子ビットマッピングのリストを受け入れます。\n", "\n", "\n", - " The [`compose`](/api/qiskit/qiskit.circuit.QuantumCircuit#compose) method returns a new circuit and does **not** mutate either circuit it acts on. To mutate the circuit on which you're calling the [`compose`](/api/qiskit/qiskit.circuit.QuantumCircuit#compose) method, use the argument `inplace=True`.\n", + " [`compose`](/api/qiskit/qiskit.circuit.QuantumCircuit#compose) メソッドは、新しい回路を返し、それが作用するどの回路も**変更しません**。 [`compose`](/api/qiskit/qiskit.circuit.QuantumCircuit#compose) メソッドを呼び出している回路を変更するには、引数 `inplace=True` を使用します。\n", "" ] }, @@ -242,7 +242,7 @@ "id": "d4529506-8397-4208-9cfd-31e1a1978741", "metadata": {}, "source": [ - "You might also want to compile circuits into instructions to keep your circuits organized. You can convert a circuit to an instruction by using the [`to_instruction`](/api/qiskit/qiskit.circuit.QuantumCircuit#to_instruction) method, then append this to another circuit as you would any other instruction. The circuit drawn in the following cell is functionally equivalent to the circuit drawn in the previous cell." + "回路をまとめておくために、回路を命令にコンパイルすることも可能です。 [`to_instruction`](/api/qiskit/qiskit.circuit.QuantumCircuit#to_instruction) メソッドを使って回路を命令に変換してから、他の命令と同様にこれを別の回路にアペンドできます。 以下のセルに描画される回路は、機能的には、前のセルに描画された回路と同じです。" ] }, { @@ -274,7 +274,7 @@ "id": "6e81c46b-a2d2-430e-9d3d-73e5030e3548", "metadata": {}, "source": [ - "If your circuit is unitary, you can convert it to a [`Gate`](/api/qiskit/qiskit.circuit.Gate) by using the [`to_gate`](/api/qiskit/qiskit.circuit.QuantumCircuit#to_gate) method. [`Gate`](/api/qiskit/qiskit.circuit.Gate) objects are specific types of instructions that have some extra features, such as the [`control`](/api/qiskit/qiskit.circuit.Gate#control) method, which adds a quantum control." + "回路がユニタリーである場合は、[`to_gate`](/api/qiskit/qiskit.circuit.QuantumCircuit#to_gate) メソッドを使ってこれを [`Gate`](/api/qiskit/qiskit.circuit.Gate) に変換できます。 [`Gate`](/api/qiskit/qiskit.circuit.Gate) オブジェクトは、量子制御を追加する [`control`](/api/qiskit/qiskit.circuit.Gate#control) めっそどなど、いくつかの追加特徴を持つ特定のタイプの命令です。" ] }, { @@ -306,10 +306,10 @@ "id": "ae850362-84eb-4998-a2cf-a93a1be4ac2a", "metadata": {}, "source": [ - "To see what's going on, you can use the [`decompose`](/api/qiskit/qiskit.circuit.QuantumCircuit#decompose) method to expand each instruction into its definition.\n", + "何が起きているかを確認するには、[`decompose`](/api/qiskit/qiskit.circuit.QuantumCircuit#decompose) メソッドを使って各命令をその定義に展開できます。\n", "\n", "\n", - " The [`decompose`](/api/qiskit/qiskit.circuit.QuantumCircuit#decompose) method returns a new circuit and does **not** mutate the circuit it acts on.\n", + " [`decompose`](/api/qiskit/qiskit.circuit.QuantumCircuit#decompose) メソッドは、新しい回路を返し、それが作用する回路を**変更しません**。\n", "" ] }, @@ -340,9 +340,9 @@ "id": "649fc3fd-caf1-45f1-ad8e-3b5d26ca859b", "metadata": {}, "source": [ - "## Parameterized circuits\n", + "## パラメータ化された回路\n", "\n", - "Many near-term quantum algorithms involve executing many variations of a quantum circuit. Since constructing and optimizing large circuits can be computationally expensive, Qiskit supports **parameterized** circuits. These circuits have undefined parameters, and their values do not need to be defined until just before executing the circuit. This lets you move circuit construction and optimization out of the main program loop. The following cell creates and displays a parameterized circuit." + "多くの near-term 量子アルゴリズムでは、1 つの量子回路の多数のバリエーションを実行します。 大規模な回路を構築して最適化するには計算コストがかかるため、Qiskit は**パラメータ化された**回路をサポートしています。 これらの回路には未定義のパラメーターがあり、その値は回路を実行する直前まで定義する必要がありません。 このため、回路の構築と最適化をメインプログラムループの外に移動することができます。 以下のセルはパラメータ化された回路を作成して表示します。" ] }, { @@ -382,7 +382,7 @@ "id": "a174600b-8f4a-47ca-aa4c-cd16dcbecb7c", "metadata": {}, "source": [ - "The following cell creates many variations of this circuit and displays one of the variations." + "以下のセルはこの回路の多数のバリエーションを作成し、その内の 1 つを表示します。" ] }, { @@ -418,7 +418,7 @@ "id": "ede2ff7c-5e68-4458-87b3-887b5b027ee1", "metadata": {}, "source": [ - "You can find a list of a circuit's undefined parameters in its `parameters` attribute." + "回路の未定義のパラメーターのリストは `parameters` 属性にあります。" ] }, { @@ -446,12 +446,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Next steps\n", + "## 次のステップ\n", "\n", "\n", - " - To learn about near-term quantum algorithms, take our [Variational algorithm design](https://learning.quantum.ibm.com/course/variational-algorithm-design) course.\n", - " - See an example of circuits being used in the [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) tutorial.\n", - " - Work with simple circuits in the [Explore gates and circuits with the Quantum Composer](https://learning.quantum.ibm.com/tutorial/explore-gates-and-circuits-with-the-quantum-composer) tutorial.\n", + " - near-term 量子アルゴリズムについて学習するには、[Variational algorithm design](https://learning.quantum.ibm.com/course/variational-algorithm-design) コースを受講してください。\n", + " - [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) チュートリアルで、回路の使用例をご覧ください。\n", + " - [Explore gates and circuits with the Quantum Composer](https://learning.quantum.ibm.com/tutorial/explore-gates-and-circuits-with-the-quantum-composer) チュートリアルで、単純な回路を操作します。\n", "" ] } diff --git a/translations/ja/build/circuit-library.ipynb b/translations/ja/build/circuit-library.ipynb index 4f0a598dd1f..56fde2402db 100644 --- a/translations/ja/build/circuit-library.ipynb +++ b/translations/ja/build/circuit-library.ipynb @@ -5,7 +5,7 @@ "id": "aea62c4c-1e42-4472-9f1d-e52783e81fc6", "metadata": {}, "source": [ - "# Circuit library" + "# 回路ライブラリ" ] }, { @@ -14,9 +14,9 @@ "id": "6f257ff9-15c4-48d8-9503-7f0ab16a91b2", "metadata": {}, "source": [ - "Qiskit includes a library of popular circuits to use as building blocks in your own programs. Using pre-defined circuits saves time researching, writing code, and debugging. The library includes popular circuits in quantum computing, circuits that are difficult to simulate classically, and circuits useful for quantum hardware benchmarking.\n", + "Qiskit には、独自のプログラムでビルディングブロックとして使用できる一般的な回路のライブラリが含まれています。 事前定義済みの回路を使用することで、調査、コードの記述、およびデバッグにかかる時間を節約できます。 ライブラリには、量子コンピューティングで人気のある回路、古典的にシミュレートするのが難しい回路、および量子ハードウェアのベンチマーキングに役立つ回路が含まれています。\n", "\n", - "This page lists the different circuit categories the library provides. For a full list of circuits, see the [circuit library API documentation](/api/qiskit/circuit_library)." + "このページには、ライブラリが提供する様々な回路カテゴリがリストされています。 回路の全リストについては、[circuit library API documentation](/api/qiskit/circuit_library) をご覧ください。" ] }, { @@ -24,13 +24,13 @@ "id": "f1d7c8c9-1b4d-45e1-9cd5-c5d76c2e25ab", "metadata": {}, "source": [ - "## N-local circuits\n", + "## N-ローカル回路\n", "\n", - "These circuits alternate layers of single-qubit rotation gates with layers of multi-qubit entangling gates.\n", + "これらの回路は、単一量子ビットの回転ゲートの層と複数量子ビットのもつれゲートの層を交互にします。\n", "\n", - "This family of circuits is popular in variational quantum algorithms because they can produce a wide range of quantum states. Variational algorithms adjust the gate parameters to find states that have certain properties (such as states that represent a good solution to an optimization problem). For this purpose, many circuits in the library are **parameterized**, which means you can define them without fixed values.\n", + "この回路ファミリーは、広範な量子状態を生成できるため、変分量子アルゴリズムで一般的です。 変分アルゴリズムは、ゲートパラメーターを調整して、特定のプロパティを持つ状態(最適化問題への最適な解決策を表す状態など)を検出します。 この目的のためにライブラリ内の多くの回路は**パラメータ化**されているため、固定値なしで定義することが可能です。\n", "\n", - "The following code cell imports a `TwoLocal` circuit, in which the entangling gates are two-qubit gates. This circuit interleaves blocks of parameterized single-qubit gates, followed by entangling blocks of two-qubit gates. The following code creates a three-qubit circuit, with single-qubit RX-gates and two-qubit CZ-gates." + "以下のコードセルは、もつれゲートが 2 量子ビットゲートである `TwoLocal` 回路をインポートします。 この回路は、パラメータ化された単一量子ビットゲートのブロックをインターリーブし、続いて 2 量子ビットのもつれブロックをインターリーブします。 以下のコードは、単一量子ビットの RX ゲートと 2 量子ビットの CZ ゲートを持つ 3 量子ビット回路を作成します。" ] }, { @@ -62,7 +62,7 @@ "id": "e32e031b-3218-4c1c-af7c-b40ad6c82100", "metadata": {}, "source": [ - "You can get a list-like object of the circuit's parameters from the `parameters` attribute." + "`parameters` 属性から回路のパラメーターのリストのようなオブジェクトを取得できます。" ] }, { @@ -91,7 +91,7 @@ "id": "555aca2a-a754-4372-8846-22ee4773ece1", "metadata": {}, "source": [ - "You can also use this to bind these parameters to real values using a dictionary of the form `{ Parameter: number }`. To demonstrate, the following code cell binds each parameter in the circuit to `0`." + "また、これを使用して、`{ Parameter: number }` の形式の辞書で実際の値にこれらのパラメーターを代入することもできます。 これを示すために、以下のコードセルでは、回路の各パラメーターを `0` に代入します。" ] }, { @@ -113,7 +113,7 @@ } ], "source": [ - "bound_circuit = two_local.bind_parameters({ p: 0 for p in two_local.parameters})\n", + "bound_circuit = two_local.assign_parameters({ p: 0 for p in two_local.parameters})\n", "bound_circuit.decompose().draw('mpl')" ] }, @@ -122,7 +122,7 @@ "id": "78772993-d0da-4651-9211-706e86a59432", "metadata": {}, "source": [ - "For more information, see [N-local gates](/api/qiskit/circuit_library#n-local-circuits) in the circuit library API documentation or take our [Variational algorithm design course](https://learning.quantum.ibm.com/course/variational-algorithm-design)." + "詳細については、回路ライブラリ API ドキュメントの [N-local gates](/api/qiskit/circuit_library#n-local-circuits) をご覧になるか、[Variational algorithm design course](https://learning.quantum.ibm.com/course/variational-algorithm-design) を受講してください。" ] }, { @@ -130,14 +130,14 @@ "id": "3e463081-bce9-4ee2-9046-97659e9ac847", "metadata": {}, "source": [ - "## Data-encoding circuits\n", + "## データ符号化回路\n", "\n", - "These parameterized circuits encode data onto quantum states for processing by quantum machine learning algorithms. Some circuits supported by Qiskit are:\n", - " - Amplitude encoding, which encodes each number into the amplitude of a basis state. This can store $2^n$ numbers in a single state, but can be costly to implement.\n", - " - Basis encoding, which encodes an integer $k$ by preparing the corresponding basis state $|k\\rangle$.\n", - " - Angle encoding, which sets each number in the data as a rotation angle in a parameterized circuit.\n", + "これらのパラメータ化された回路は、量子機械学習アルゴリズムによる処理のためにデータを量子状態に符号化します。 Qiskit では、以下のような回路がサポートされています。\n", + " - 振幅エンコーディング。各数値を基底状態の振幅に符号化します。 これは単一の状態に $2^n$ 個の数値を格納できますが、実装にはコストがかかります。\n", + " - 基底エンコーディング。対応する基底状態 $|k\\rangle$ を準備することにより、整数 $k$ を符号化します。\n", + " - 角度エンコーディング。パラメータ化された回路で、データの各数値を回転角度として設定します。\n", "\n", - "The best approach depends upon the specifics of your application. On current quantum computers, however, we often use angle-encoding circuits such as the `ZZFeatureMap`." + "最適なアプローチはアプリケーションの仕様によって異なりますが、 現在の量子コンピューターでは、ほとんどの場合、`ZZFeatureMap` などの角度エンコーディング回路を使用します。" ] }, { @@ -173,7 +173,7 @@ "id": "031bf004-ca80-4cc0-b153-2cd5cd778386", "metadata": {}, "source": [ - "See [Data encoding circuits](/api/qiskit/circuit_library#data-encoding-circuits) in the circuit library API documentation." + "回路ライブラリ APIドキュメントの [Data encoding circuits](/api/qiskit/circuit_library#data-encoding-circuits) をご覧ください。" ] }, { @@ -181,9 +181,9 @@ "id": "5c5d2735-ef6a-48db-8382-9dc03c9af20a", "metadata": {}, "source": [ - "## Time-evolution circuits\n", + "## 時間発展回路\n", "\n", - "These circuits simulate a quantum state evolving in time. Use time-evolution circuits to investigate physical effects such as heat transfer or phase transitions in a system. Time-evolution circuits are also a fundamental building block of chemistry wave functions (such as unitary coupled-cluster trial states) and of the QAOA algorithm we use for optimization problems." + "これらの回路は、時間によって発展する量子状態をシミュレートします。 時間発展回路を使用すると、システム内の熱伝達や位相遷移などの物理的な効果を調べることができます。 時間発展回路は、化学波動関数(ユニタリー結合クラスターのトライアル状態など)や、最適化問題に使用する QAOA アルゴリズムの基本的なビルディングブロックでもあります。" ] }, { @@ -228,7 +228,7 @@ "id": "e2dad12f-535a-4f42-8ac4-dbfcfb5533cc", "metadata": {}, "source": [ - "Read the [`PauliEvolutionGate` API documentation](/api/qiskit/qiskit.circuit.library.PauliEvolutionGate)." + "[`PauliEvolutionGate` API documentation](/api/qiskit/qiskit.circuit.library.PauliEvolutionGate) をお読みください。" ] }, { @@ -236,13 +236,13 @@ "id": "0cf7122d-c3fe-41a6-936c-b3770b33f0f1", "metadata": {}, "source": [ - "## Benchmarking and complexity-theory circuits\n", + "## ベンチマーキングと複雑性理論回路\n", "\n", - "Benchmarking circuits give us a sense of how well our hardware is actually working, and complexity-theory circuits help us understand how difficult the problems we want to solve are.\n", + "ベンチマーキング回路では、ハードウェアが実際にどの程度機能しているかを知ることができます。複雑性理論回路は、解決しようとしている問題がどの程度困難であるかを理解するのに役立ちます。\n", "\n", - "For example, the \"quantum volume\" benchmark measures how accurately a quantum computer executes a type of random quantum circuit. The score of the quantum computer increases with the size of the circuit it can reliably run. This takes into account all aspects of the computer, including qubit count, instruction fidelity, qubit connectivity, and the software stack transpiling and post-processing results. Read more about quantum volume in the original [quantum volume paper](https://arxiv.org/abs/1811.12926).\n", + "例えば、「量子ボリューム」ベンチマークは、量子コンピューターがどの程度正確にランダム量子回路の種類を実行するかを測定します。 量子コンピューターのスコアは、量子コンピューターが確実に実行できる回路のサイズに応じて高まります。 これには、量子ビット数、命令忠実度、量子ビット連結性、ソフトウェアスタックトランスパイルと事後処理の結果など、コンピューターのあらゆる側面が考慮されます。 量子ボリュームについての詳細は、原典の [quantum volume paper](https://arxiv.org/abs/1811.12926) をご覧ください。\n", "\n", - "The following code shows an example of a quantum volume circuit built in Qiskit that runs on four qubits (the `su4_` blocks are randomized two-qubit gates)." + "以下のコードは、Qiskit で構築された、4 量子ビットで実行する量子ボリューム回路の例を示します(`su4_` ブロックはランダム化された 2 量子ビットゲートです)。" ] }, { @@ -274,9 +274,9 @@ "id": "908e4b4a-5edf-4390-82a0-e755050c2a37", "metadata": {}, "source": [ - "The circuit library also includes circuits believed to be hard to simulate classically, such as instantaneous quantum polynomial (IQP) circuits. These circuits sandwich certain diagonal gates (in the computational basis) between blocks of Hadamard gates.\n", + "回路ライブラリには、IQP(Instantaneous Quantum Polynominal)回路など、古典的にシミュレートするのが困難だと考えられている回路も含まれています。 これらの回路は、特定の対角ゲート(計算基底)をアダマールゲートのブロック間に挟みます。\n", "\n", - "Other circuits include `GroverOperator` for use in Grover's algorithm, and the `FourierChecking` circuit for the Fourier checking problem. See these circuits in [Particular quantum circuits](/api/qiskit/circuit_library#particular-quantum-circuits) in the circuit library API documentation." + "他には、グローバーのアルゴリズムに使用する `GroverOperator` や、フーリエチェック問題の `FourierChecking` 回路などが含まれます。 これらの回路については、回路ライブラリ API ドキュメントの [Particular quantum circuits](/api/qiskit/circuit_library#particular-quantum-circuits) をご覧ください。" ] }, { @@ -284,11 +284,11 @@ "id": "58b1a7b8-c173-4de8-957a-ca5d58332073", "metadata": {}, "source": [ - "## Arithmetic circuits\n", + "## 算術回路\n", "\n", - "Arithmetic operations are classical functions, such as adding integers and bit-wise operations. These may be useful with algorithms such as amplitude estimation for finance applications, and in algorithms like the HHL algorithm, which solves linear systems of equations.\n", + "算術演算は、整数の加算やビット単位演算などの古典的な関数です。 これらは、金融アプリケーションの振幅推定のアルゴリズムや、方程式の線形システムを解決する HHL アルゴリズムなどのアルゴリズムに役立てられます。\n", "\n", - "As an example, let’s try adding two three-bit numbers using a \"ripple-carry\" circuit to perform in-place addition (`CDKMRippleCarryAdder`). This adder adds two numbers (we'll call them \"A\" and \"B\") and writes the result to the register that held B. In the following example, A=2 and B=3." + "例として、\"ripple-carry\" 回路を使用して 3 ビットの数値を 2 つ加算するインプレース加算(`CDKMRippleCarryAdder`)を試してみましょう。 この加算器は 2 つの数値(\"A\" と \"B\")を追加して、結果を B を保持したレジスターに書き込みます。 以下の例では、A=2、B=3 とします。" ] }, { @@ -342,7 +342,7 @@ "id": "e8a8deee-ad46-42cd-844e-51d5541c3f65", "metadata": {}, "source": [ - "Simulating the circuit shows that it outputs `5` (with probability `1.0`)." + "回路をシミュレートすると、`5`(確率 `1.0`)を出力することがわかります。" ] }, { @@ -374,7 +374,7 @@ "id": "cbd99d49-eb5c-4cd5-bac2-528497b8405e", "metadata": {}, "source": [ - "See [Arithmetic circuits](/api/qiskit/circuit_library#arithmetic-circuits) in the circuit library API documentation." + "回路ライブラリ APIドキュメントの [Arithmetic circuits](/api/qiskit/circuit_library#arithmetic-circuits) をご覧ください。" ] }, { @@ -382,11 +382,11 @@ "id": "ee5a64f5-1316-4217-a443-f09cb6d35c19", "metadata": {}, "source": [ - "## Standard gates\n", + "## ゲート\n", "\n", - "The circuit library also includes standard quantum gates. Some are more fundamental gates (such as the `UGate`), and others are multi-qubit gates that usually need building from single- and two-qubit gates. To add imported gates to your circuit, use the `append` method; the first argument is the gate, and the next argument is a list of qubits to apply the gate to.\n", + "回路ライブラリには標準の量子ゲートも含まれています。 より基本的なゲート(`UGate` など)もありますが、通常は単一ゲートと 2 量子ビットゲートから構築する必要のある複数量子ビットゲートもあります。 インポートされたゲートを回路に追加するには、`append` メソッドを使用します。最初の引数はゲート、次の引数はゲートを適用する量子ビットのリストです。\n", "\n", - "For example, the following code cell creates a circuit with a Hadamard gate and a multi-controlled-X gate." + "例えば、以下のコードセルは、アダマールゲートと複数制御 X ゲートで 1 つの回路を作成します。" ] }, { @@ -423,7 +423,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "See [Standard gates](/api/qiskit/circuit_library#standard-gates) in the circuit library API documentation." + "回路ライブラリ APIドキュメントの [Standard gates](/api/qiskit/circuit_library#standard-gates) をご覧ください。" ] }, { @@ -431,12 +431,12 @@ "id": "9a900a84-c52f-4a03-b3e9-87c71fa93e88", "metadata": {}, "source": [ - "## Next steps\n", + "## 次のステップ\n", "\n", "\n", - " - Learn advanced methods for creating circuits in the [Construct circuits](circuit-construction) topic.\n", - " - See an example of circuits being used in the [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) tutorial.\n", - " - Review the [circuit library API](/api/qiskit/circuit_library) reference.\n", + " - [Construct circuits](circuit-construction) のトピックで回路を作成するための高度な方法を学習します。\n", + " - [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) チュートリアルで、回路の使用例をご覧ください。\n", + " - [circuit library API](/api/qiskit/circuit_library) リファレンスをご覧ください。\n", "\n", "\n" ] diff --git a/translations/ja/build/circuit-visualization.ipynb b/translations/ja/build/circuit-visualization.ipynb index 2476b8d642b..2dc1e41f229 100644 --- a/translations/ja/build/circuit-visualization.ipynb +++ b/translations/ja/build/circuit-visualization.ipynb @@ -4,14 +4,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Visualize circuits" + "# 回路の可視化" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "A visualization is useful while working with quantum circuits. Below find options in Qiskit for drawing circuits, plotting data from executed jobs, seeing the state of a quantum computer, and more." + "可視化は、量子回路を操作する際に役立ちます。 以下で、回路の描画、実行したジョブからのデータのプロット、量子コンピューターの状態の確認など、Qiskit が提供するオプションをご覧ください。" ] }, { @@ -27,9 +27,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Draw a quantum circuit\n", + "## 量子回路の描画\n", "\n", - "Drawing a circuit is supported natively by a `QuantumCircuit` object. You can either call `print()` on the circuit, or call the `draw()` method on the object. This will render an ASCII art version of the circuit diagram." + "回路の描画は、`QuantumCircuit` オブジェクトによってネイティブにサポートされています。 回路で `print()` を呼び出すか、オブジェクトで `draw()` メソッドを呼び出すと、 ASCII アートバージョンの回路ダイアグラムがレンダリングされます。" ] }, { @@ -114,12 +114,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Alternative renderers\n", + "### 代替レンダラー\n", "\n", - "A text output is useful for quickly seeing the output while developing a circuit, but it doesn't provide the most flexibility. There are two alternative output renderers for the quantum circuit. One uses [matplotlib](https://matplotlib.org/), and the other uses [LaTeX](https://www.latex-project.org/), which leverages the [qcircuit package](https://github.com/CQuIC/qcircuit). These can be specified with `mpl` and `latex` values for the `output` kwarg on the draw() method.\n", + "テキスト出力は、回路を開発中にすぐに出力を確認するのに役立ちますが、柔軟性はあまりありません。 量子回路に使用できる代替出力レンダラーが 2 つあります。 [matplotlib](https://matplotlib.org/) を使用するものと、[qcircuit package](https://github.com/CQuIC/qcircuit) を活用する [LaTeX](https://www.latex-project.org/) を使用するものです。 これらは、draw() メソッドの `output` kwarg に対して `mpl` と `latex` の値で指定できます。\n", "\n", "\n", - " OSX users can get the required LaTeX packages through the [mactex package](https://www.tug.org/mactex/)\n", + " OSX ユーザーは、[mactex package](https://www.tug.org/mactex/) から必要な LaTeX パッケージを取得できます。\n", "" ] }, @@ -169,23 +169,23 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Control output from circuit.draw()\n", + "### circuit.draw() からの出力の制御\n", "\n", - "By default, the `draw()` method returns the rendered image as an object and does not output anything. The exact class returned depends on the output specified: `'text'` (the default) returns a `TextDrawer` object, `'mpl'` returns a `matplotlib.Figure` object, and `latex` returns a `PIL.Image` object. These return types enable modifying or directly interacting with the rendered output from the drawers. \n", + "デフォルトでは、`draw()` メソッドはレンダリングされたイメージをオブジェクトとして返すため、何も出力しません。 返される正確なクラスは指定された出力に応じ、'text'`(デフォルト)は `TextDrawer` オブジェクト、`'mpl'` は `matplotlib.Figure` オブジェクト、`latex` は `PIL.Image` オブジェクトを返します。 これらの戻り型によって、ドロワーからのレンダリングされた出力を編集したり、直接操作したりすることが可能となります。 \n", "\n", - "Jupyter notebooks understand these return types and render them properly, but when running outside of Jupyter, this feature is not automatic. However, the `draw()` method has optional arguments to display or save the output. When specified, the `filename` kwarg takes a path to which it saves the rendered output. Alternatively, if you're using the `mpl` or `latex` outputs, you can leverage the `interactive` kwarg to open the image in a new window (this will not always work from within a notebook)." + "Jupyter ノートブックはこれらの戻り値の型を理解して適切にレンダリングすることができますが、Jupyter の外部で実行すると、これは自動的には機能しません。 ただし、`draw()` メソッドには出力を表示または保存するオプションの引数があります。 `filename` kwarg が指定されている場合、これはレンダリングされた出力を保存するパスを取ります。 または、`mpl` または `latex` 出力を使用している場合には、`interactive` kwarg を利用して、新しいウィンドウにイメージを開くことができます(これはノートブック内から常に機能するとは限りません)。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Customize the output\n", + "### 出力のカスタマイズ\n", "\n", - "Depending on the output, there are also options to customize the circuit diagram.\n", + "出力によっては、回路図をカスタマイズするオプションもあります。\n", "\n", - "#### Disable plot barriers and reverse bit order\n", - "The first two options are shared among all three backends. They allow you to configure both the bit orders and whether or not you draw barriers. These can be set by the `reverse_bits` kwarg and `plot_barriers` kwarg, respectively. The examples below will work with any output renderer; `mpl` is used here for brevity." + "#### バリアーのプロット無効化とビット順序の反転\n", + "最初の 2 つのオプションは、3 つすべてのバックエンドで共有されています。 これらのオプションでは、ビット順序とバリアーを描画するかの両方を構成でき、 それぞれ `reverse_bits` kwarg と `plot_barriers` kwarg で設定可能です。 以下の例はどの出力レンダラーでも動作しますが、ここでは簡潔に `mpl` が使用されています。" ] }, { @@ -307,73 +307,73 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Renderer-specific customizations\n", + "### レンダラー特有のカスタマイズ\n", "\n", - "Some available customizing options are specific to a renderer. \n", + "利用可能な一部のカスタマイズオプションはレンダラーに固有です。 \n", "\n", - "The `line_length` kwarg for the `text` renderer can be used to set a maximum width for the output. When a diagram is wider than the maximum, it will wrap the diagram below. \n", + "`text` レンダラーの `line_length` kwarg は、出力の最大幅を設定するのに使用できます。 ダイアグラムが最大幅を超える場合、ダイアグラムが下に折り返されます。 \n", "\n", - "The `mpl` renderer has the `style` kwarg, which is used to customize the output. \n", + "`mpl` レンダラーには、出力をカスタマイズするのに使用する `style` kwarg があります。 \n", "\n", - "The `scale` option is used by the `mpl` and `latex` renderers to scale the size of the output image with a multiplicative adjustment factor. \n", + "`scale` オプションは `mpl` および `latex` レンダラーで使用し、出力イメージのサイズを乗算調整係数でスケーリングします。 \n", "\n", - "The `style` kwarg takes in a `dict` with multiple options, including specifying colors, changing rendered text for different types of gates, choosing different line styles, and more. \n", + "`style` kwarg は、色指定、ゲートのタイプごとにレンダリングされるテキストの変更、異なる線スタイルの選択などの複数のオプションを持つ `dict` を取ります。 \n", "\n", - "Available options are:\n", + "以下は、利用可能なオプションです。\n", "\n", - "- **textcolor** (str): The color code for text. Defaults to `'#000000'`\n", - "- **subtextcolor** (str): The color code for subtext. Defaults to `'#000000'`\n", - "- **linecolor** (str): The color code for lines. Defaults to `'#000000'`\n", - "- **creglinecolor** (str): The color code for classical register lines `'#778899'`\n", - "- **gatetextcolor** (str): The color code for gate text `'#000000'`\n", - "- **gatefacecolor** (str): The color code for gates. Defaults to `'#ffffff'`\n", - "- **barrierfacecolor** (str): The color code for barriers. Defaults to `'#bdbdbd'`\n", - "- **backgroundcolor** (str): The color code for the background. Defaults to `'#ffffff'`\n", - "- **fontsize** (int): The font size for text. Defaults to 13\n", - "- **subfontsize** (int): The font size for subtext. Defaults to 8\n", - "- **displaytext** (dict): A dictionary of the text for each element\n", - " type in the output visualization. The default values are:\n", + "- **textcolor** (str): テキストのカラーコード。 デフォルトは `'#000000'`\n", + "- **subtextcolor** (str): サブテキストのカラーコード。 デフォルトは `'#000000'`\n", + "- **linecolor** (str): 線のカラーコード。 デフォルトは `'#000000'`\n", + "- **creglinecolor** (str): 古典レジスターの線のカラーコード。デフォルトは `'#778899'`\n", + "- **gatetextcolor** (str): ゲートテキストのカラーコード。デフォルトは `'#000000'`\n", + "- **gatefacecolor** (str): ゲートのカラーコード。 デフォルトは `'#ffffff'`\n", + "- **barrierfacecolor** (str): バリアーのカラーコード。 デフォルトは `'#bdbdbd'`\n", + "- **backgroundcolor** (str): 背景のカラーコード。 デフォルトは `'#ffffff'`\n", + "- **fontsize** (int): テキストのフォントサイズ。 デフォルトは 13\n", + "- **subfontsize** (int): サブテキストのフォントサイズ。 デフォルトは 8\n", + "- **displaytext** (dict): 出力可視化の各要素の型\n", + " のテキストの辞書。 デフォルト値:\n", " \n", " \n", - " 'id': 'id',\n", - " 'u0': 'U_0',\n", - " 'u1': 'U_1',\n", - " 'u2': 'U_2',\n", - " 'u3': 'U_3',\n", - " 'x': 'X',\n", - " 'y': 'Y',\n", - " 'z': 'Z',\n", - " 'h': 'H',\n", - " 's': 'S',\n", - " 'sdg': 'S^\\\\dagger',\n", - " 't': 'T',\n", - " 'tdg': 'T^\\\\dagger',\n", - " 'rx': 'R_x',\n", - " 'ry': 'R_y',\n", - " 'rz': 'R_z',\n", + " 'id': 'id'、\n", + " 'u0': 'U_0'、\n", + " 'u1': 'U_1'、\n", + " 'u2': 'U_2'、\n", + " 'u3': 'U_3'、\n", + " 'x': 'X'、\n", + " 'y': 'Y'、\n", + " 'z': 'Z'、\n", + " 'h': 'H'、\n", + " 's': 'S'、\n", + " 'sdg': 'S^\\\\dagger'、\n", + " 't': 'T'、\n", + " 'tdg': 'T^\\\\dagger'、\n", + " 'rx': 'R_x'、\n", + " 'ry': 'R_y'、\n", + " 'rz': 'R_z'、\n", " 'reset': '\\\\left|0\\\\right\\\\rangle'\n", " \n", " \n", - " You must specify all the necessary values if using this. There is\n", - " no provision for an incomplete dict passed in.\n", - "- **displaycolor** (dict): The color codes to use for each circuit element.\n", - " By default, all values default to the value of `gatefacecolor` and\n", - " the keys are the same as `displaytext`. Also, just like\n", - " `displaytext`, there is no provision for an incomplete dict passed\n", - " in.\n", - "- **latexdrawerstyle** (bool): When set to True, enable LaTeX mode, which will\n", - " draw gates like the `latex` output modes.\n", - "- **usepiformat** (bool): When set to True, use radians for output.\n", - "- **fold** (int): The number of circuit elements at which to fold the circuit.\n", - " Defaults to 20\n", - "- **cregbundle** (bool): If set True, bundle classical registers.\n", - "- **showindex** (bool): If set True, draw an index.\n", - "- **compress** (bool): If set True, draw a compressed circuit.\n", - "- **figwidth** (int): The maximum width (in inches) for the output figure.\n", - "- **dpi** (int): The DPI to use for the output image. Defaults to 150.\n", - "- **creglinestyle** (str): The style of line to use for classical registers.\n", - " Choices are `'solid'`, `'doublet'`, or any valid matplotlib\n", - " `linestyle` kwarg value. Defaults to `doublet`." + " これを使用する場合、必要な値をすべて指定する必要があります。 渡される\n", + " 不完全な辞書に対する規定はありません。\n", + "- **displaycolor** (dict): 各回路要素に使用するカラーコード。\n", + " デフォルトでは、すべての値は `gatefacecolor` の値となり、\n", + " キーは `displaytext` と同じです。 また、\n", + " `displaytext` と同様に、渡される不完全な辞書に対する規定はありま\n", + " せん。\n", + "- **latexdrawerstyle** (bool): True にセットすると、LaTeX モードが有効化され、\n", + " ゲートは `latex` 出力モードのように描画されます。\n", + "- **usepiformat** (bool): True にセットすると、出力にラジアンを使用します。\n", + "- **fold** (int): 回路を折り返す回路要素の数。\n", + " デフォルトは 20\n", + "- **cregbundle** (bool): True にセットすると、古典レジスターをバンドルします。\n", + "- **showindex** (bool): True にセットすると、インデックスを描画します。\n", + "- **compress** (bool): True にセットすると、圧縮した回路を描画します。\n", + "- **figwidth** (int): 出力図の最大幅(単位: インチ)。\n", + "- **dpi** (int): 出力イメージに使用される DPI。 デフォルトは 150。\n", + "- **creglinestyle** (str): 古典レジスターに使用される線のスタイル。\n", + " 選択肢は `'solid'`、`'doublet'`、または有効な matplotlib\n", + " `linestyle` kwarg の値です。 デフォルトは `doublet`。" ] }, { @@ -488,12 +488,12 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### circuit_drawer() as function\n", + "### 関数としての circuit_drawer()\n", "\n", - "If you have an application where you prefer to draw a circuit with a self-contained function instead of as a method of a circuit object, you can directly use the `circuit_drawer()` function, which is part of the public stable interface from `qiskit.tools.visualization`. The function behaves identically to the `circuit.draw()` method, except that it takes in a circuit object as required argument.\n", + "circuit オブジェクトのメソッドではなく、自己完結型の関数を使用して回路を描画するアプリケーションがある場合、`circuit_drawer()` 関数を直接使用することができます。これは、`qiskit.tools.visualization` の public stable interface に含まれます。 この関数は `circuit.draw()` メソッドと同様に動作しますが、必須の引数として circuit オブジェクトを取る点が異なります。\n", "\n", "
\n", - "Note: In Qiskit Terra $<=$ 0.7, the default behavior for the circuit_drawer()from qiskit.tools.visualization import circuit_drawer function is to use the latex output backend, and in 0.6.x that includes a fallback to mpl if latex fails for any reason. Starting with release > 0.7, the default changes to the text output.\n", + "注記: Qiskit Terra $<=$ 0.7 では、qiskit.tools.visualization import circuit_drawer の circuit_drawer() 関数は latex 出力バックエンドを使用するのがデフォルトの動作ですが、0.6.x では何らかの理由で latex が失敗した場合に mpl にフォールバックする動作が含まれています。 > 0.7 のリリース以降では、このデフォルトが text 出力に変更されています。\n", "
" ] }, @@ -530,13 +530,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Plot histogram \n", + "## ヒストグラムのプロット \n", "\n", - "The following function visualizes the data from a quantum circuit executed on a system or simulator. \n", + "以下の関数は、システムまたはシミュレーターで実行された量子回路からのデータを可視化します。 \n", "\n", "`plot_histogram(data)`\n", "\n", - "For example, make a two-qubit Bell state:" + "例えば、2 量子ビットのベル状態を作ります。" ] }, { @@ -638,16 +638,16 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Options when plotting a histogram\n", + "### ヒストグラムをプロットするときのオプション\n", "\n", - "Use the following options for `plot_histogram()` to adjust the output graph.\n", + "出力グラフを調整するには、`plot_histogram()` に以下のオプションを使用します。\n", "\n", - "* `legend`: Provides a label for the executions. It takes a list of strings used to label each execution's results. This is mostly useful when plotting multiple execution results in the same histogram\n", - "* `sort`: Adjusts the order the bars in the histogram are rendered. It can be set to either ascending order with `asc` or descending order with `desc`\n", - "* `number_to_keep`: Takes an integer for the number of terms to show. The rest are grouped together in a single bar called \"rest\"\n", - "* `color`: Adjusts the color of the bars; takes a string or a list of strings for the colors to use for the bars for each execution. \n", - "* `bar_labels`: Adjusts whether labels are printed above the bars \n", - "* `figsize`: Takes a tuple of the size in inches to make the output figure" + "* `legend`: 実行にラベルを指定します。 各実行の結果のラベル付けに使用される文字列のリストを取ります。 これは、複数の実行の結果を同じヒストグラムにプロットする際に最も役立ちます。\n", + "* `sort`: ヒストグラムに表示される棒がレンダリングされる順序を調整します。 昇順の `asc` または降順の `desc` をセットできます\n", + "* `number_to_keep`: 表示する項数の整数を取ります。 残りは単一の「rest」という棒にまとめられます\n", + "* `color`: 棒の色を調整します。各実行の棒に使用する色の文字列または文字列のリストを取ります。 \n", + "* `bar_labels`: ラベルが棒の上に出力されるかを調整します。 \n", + "* `figsize`: 出力図を作成するためのインチ単位のサイズのタプルを取ります。" ] }, { @@ -724,23 +724,23 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Use the output from plot_histogram()\n", + "### plot_histogram() からの出力の使用\n", "\n", - "When using the `plot_histogram()` function, it returns a `matplotlib.Figure` for the rendered visualization. Jupyter notebooks understand this return type and render it properly, but when running outside of Jupyter,this feature is not automatic. However, the `matplotlib.Figure` class natively has methods to both display and save the visualization. You can call `.show()` on the returned object from `plot_histogram()` to open the image in a new window (assuming your configured matplotlib backend is interactive). Alternatively, call `.savefig('out.png')` to save the figure to `out.png`. The `savefig()` method takes a path so you can adjust the location and filename where you're saving the output." + "`plot_histogram()` 関数を使用すると、レンダリングされた可視化の `matplotlib.Figure` が返されます。 Jupyter ノートブックはこの戻り値の型を理解して適切にレンダリングすることができますが、Jupyter の外部で実行すると、これは自動的には機能しません。 ただし、`matplotlib.Figure` クラスには、可視化の表示と保存のどちも行えるメソッドがネイティブで備わっています。 返されたオブジェクトに `plot_histogram()` から `.show()` を呼び出すと、イメージを新しいウィンドウで開くことができます(構成済みの matplotlib バックエンドが対話型であることが前提です)。 または `.savefig('out.png')` を呼び出すと、図を `out.png` に保存できます。 `savefig()` メソッドはパスを取るため、出力の保存場所とファイル名の調整が可能です。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Plot state " + "## 状態のプロット " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "In many situations it is helpful to see the state of a quantum computer - perhaps for debugging purposes. Here we assume you have a particular state (either from simulation or state tomography), and the goal is to visualize the quantum state. This requires exponential resources, so we advise to only view the state of small quantum systems. There are several functions for generating different types of visualization of a quantum state:\n", + "デバッグの目的など、多くの状況では、量子コンピューターの状態を確認できると役立ちます。 ここでは(シミュレーションまたは状態トモグラフィーからの)特定の状態があることを前提とし、目標は量子状態を可視化することです。 これには膨大なリソースが必要となるため、小さな量子系の状態のみを確認することをお勧めします。 量子状態の様々な種類の可視化を生成する関数がいくつかあります。\n", "\n", "```\n", "plot_state_city(quantum_state)\n", @@ -750,25 +750,25 @@ "plot_bloch_multivector(quantum_state)\n", "```\n", "\n", - "A quantum state is either a density matrix $\\rho$ (Hermitian matrix) or statevector $|\\psi\\rangle$ (complex vector). The density matrix is related to the statevector by \n", + "量子状態は、密度行列 $\\rho$(エルミート行列)または状態ベクトル $|\\psi\\rangle$(複素ベクトル)のいずれかです。 密度行列は以下によって状態ベクトルに関連しています。\n", "\n", "$$\\rho = |\\psi\\rangle\\langle \\psi|,$$\n", "\n", - "and is more general as it can represent mixed states (positive sum of statevectors) \n", + "そして、混合状態(状態ベクトルの正の和)を表すため、より一般的です。\n", "\n", "$$\\rho = \\sum_k p_k |\\psi_k\\rangle\\langle \\psi_k |.$$\n", "\n", - "The visualizations generated by the functions are:\n", + "関数によって生成される可視化は、以下のとおりです。\n", "\n", - "- `'plot_state_city'`: The standard view for quantum states where the real and imaginary (imag) parts of the density matrix are plotted like a city.\n", + "- `'plot_state_city'`: 密度行列の実部と虚部が都市のようにプロットされている、量子状態の標準的なビュー。\n", "\n", - "- `'plot_state_qsphere'`: The Qiskit-unique view of a quantum state where the amplitude and phase of the state vector are plotted in a spherical ball. The amplitude is the thickness of the arrow and the phase is the color. For mixed states it will show different `'qsphere'` for each component.\n", + "- `'plot_state_qsphere'`: 状態ベクトルの振幅と位相が球状にプロットされる、Qiskit 固有の量子状態ビュー。 振幅は矢印の厚みで、位相は色です。 混合状態の場合は、コンポーネントごとに異なる `'qsphere'` を表示します。\n", "\n", - "- `'plot_state_paulivec'`: The representation of the density matrix using Pauli operators as the basis $\\rho=\\sum_{q=0}^{d^2-1}p_jP_j/d$.\n", + "- `'plot_state_paulivec'`: $\\rho=\\sum_{q=0}^{d^2-1}p_jP_j/d$ を基底としたパウリ演算子による密度行列の表現。\n", "\n", - "- `'plot_state_hinton'`: Same as `'city'` but where the size of the element represents the value of the matrix element.\n", + "- `'plot_state_hinton'`: ``'city'`` と同じですが、要素のサイズは行列要素の値を表します。\n", "\n", - "- `'plot_bloch_multivector'`: The projection of the quantum state onto the single-qubit space and plotting on a Bloch sphere." + "- `'plot_bloch_multivector'`: 量子状態を単一量子ビット空間へ射影し、ブロッホ球上にプロットします。" ] }, { @@ -983,27 +983,27 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Here we see that there is no information about the quantum state in the single-qubit space as all vectors are zero. " + "ここでは、すべてのベクトルがゼロであるため、単一量子ビット空間内には、量子状態に関する情報がないことがわかります。 " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "### Options when using state plotting functions\n", + "### 状態プロット関数を使用するときのオプション\n", "\n", - "The various functions for plotting quantum states provide a number of options to adjust how the plots are rendered. Which options are available depends on the function being used." + "量子状態をプロットするための様々な関数には、プロットのレンダリング方法を調整するためのオプションがいくつかあります。 どのオプションを使用できるかは、使用されている関数によって異なります。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "#### **plot_state_city()** options\n", + "#### **plot_state_city()** のオプション\n", "\n", - "- **title** (str): a string that represents the plot title\n", - "- **figsize** (tuple): figure size in inches (width, height)\n", - "- **color** (list): a list of len=2 giving colors for real and imaginary components of matrix elements" + "- **title** (str): プロットのタイトルを表す文字列\n", + "- **figsize** (tuple): インチ単位の図のサイズ (幅, 高さ)\n", + "- **color** (list): 行列要素の実部と虚部の色を指定する、長さ 2 のリスト。" ] }, { @@ -1043,10 +1043,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### **plot_state_hinton()** options\n", + "#### **plot_state_hinton()** のオプション\n", "\n", - "- **title** (str): a string that represents the plot title\n", - "- **figsize** (tuple): figure size in inches (width, height)" + "- **title** (str): プロットのタイトルを表す文字列\n", + "- **figsize** (tuple): インチ単位の図のサイズ (幅, 高さ)" ] }, { @@ -1086,11 +1086,11 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### **plot_state_paulivec()** options\n", + "#### **plot_state_paulivec()** のオプション\n", "\n", - "- **title** (str): a string that represents the plot title\n", - "- **figsize** (tuple): figure size in inches (width, height)\n", - "- **color** (list or str): color of the expectation value bars" + "- **title** (str): プロットのタイトルを表す文字列\n", + "- **figsize** (tuple): インチ単位の図のサイズ (幅, 高さ)\n", + "- **color** (list または str): 期待値の棒の色" ] }, { @@ -1130,19 +1130,19 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### **plot_state_qsphere()** options\n", + "#### **plot_state_qsphere()** のオプション\n", "\n", - "- **figsize** (tuple): figure size in inches (width, height)" + "- **figsize** (tuple): インチ単位の図のサイズ (幅, 高さ)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "#### **plot_bloch_multivector()** options\n", + "#### **plot_bloch_multivector()** のオプション\n", "\n", - "- **title** (str): a string that represents the plot title\n", - "- **figsize** (tuple): figure size in inches (width, height)" + "- **title** (str): プロットのタイトルを表す文字列\n", + "- **figsize** (tuple): インチ単位の図のサイズ (幅, 高さ)" ] }, { @@ -1182,20 +1182,20 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Use the output from state plotting functions\n", + "### 状態プロット関数からの出力の使用\n", "\n", - "The state plotting functions return a `matplotlib.Figure` for the rendered visualization. Jupyter notebooks understand this return type and render it properly, but when running outside of Jupyter, this feature is not automatic. However, the `matplotlib.Figure` class natively has methods to both display and save the visualization. You can call `.show()` on the returned object to open the image in a new window (assuming your configured matplotlib backend is interactive). Alternatively, call `.savefig('out.png')` to save the figure to `out.png` in the current working directory. The `savefig()` method takes a path so you can adjust the location and filename where you're saving the output." + "状態プロット関数は、レンダリングされた可視化の `matplotlib.Figure` を返します。 Jupyter ノートブックはこの戻り値の型を理解して適切にレンダリングすることができますが、Jupyter の外部で実行すると、これは自動的には機能しません。 ただし、`matplotlib.Figure` クラスには、可視化の表示と保存のどちも行えるメソッドがネイティブで備わっています。 返されたオブジェクトに `.show()` を呼び出すと、イメージを新しいウィンドウで開くことができます(構成済みの matplotlib バックエンドが対話型であることが前提です)。 または `.savefig('out.png')` を呼び出すと、図を現在作業中のディレクトリの `out.png` に保存できます。 `savefig()` メソッドはパスを取るため、出力の保存場所とファイル名の調整が可能です。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Plot Bloch vector \n", + "## ブロッホ・ベクトルのプロット \n", "\n", - "A standard way to plot a quantum system is with the Bloch vector. This only works for a single qubit and takes as input the Bloch vector. \n", + "量子系をプロットする標準的な方法は、ブロッホ・ベクトルを使用する方法です。 これは、単一量子ビットでのみ機能し、入力としてブロッホ・ベクトルを取ります。 \n", "\n", - "The Bloch vector is defined as $[x = \\mathrm{Tr}[X \\rho], y = \\mathrm{Tr}[Y \\rho], z = \\mathrm{Tr}[Z \\rho]]$, where $X$, $Y$, and $Z$ are the Pauli operators for a single qubit and $\\rho$ is the density matrix.\n" + "ブロッホ・ベクトルは $[x = \\mathrm{Tr}[X \\rho], y = \\mathrm{Tr}[Y \\rho], z = \\mathrm{Tr}[Z \\rho]]$ として定義されます。$X$、$Y$、および $Z$ は単一量子ビットのパウリ演算子で、$\\rho$ は密度行列です。\n" ] }, { @@ -1254,10 +1254,10 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Options for plot_bloch_vector()\n", + "### plot_bloch_vector() のオプション\n", "\n", - "- **title** (str): a string that represents the plot title\n", - "- **figsize** (tuple): Figure size in inches (width, height)" + "- **title** (str): プロットのタイトルを表す文字列\n", + "- **figsize** (tuple): 図のサイズ。単位はインチ。 (幅, 高さ)" ] }, { @@ -1296,21 +1296,21 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Adjust the output from plot_bloch_vector()\n", + "### plot_bloch_vector() からの出力の調整\n", "\n", - "The `plot_bloch_vector` function returns a `matplotlib.Figure` for the rendered visualization. Jupyter notebooks understand this return type and render it properly, but when running outside of Jupyter, this feature is not automatic. However, the `matplotlib.Figure` class natively has methods to both display and save the visualization. You can call `.show()` on the returned object to open the image in a new window (assuming your configured matplotlib backend is interactive). Alternatively, call `.savefig('out.png')` to save the figure to `out.png` in the current working directory. The `savefig()` method takes a path so you can adjust the location and filename where you're saving the output." + "`plot_bloch_vector` 関数は、レンダリングされた可視化の `matplotlib.Figure` を返します。 Jupyter ノートブックはこの戻り値の型を理解して適切にレンダリングすることができますが、Jupyter の外部で実行すると、これは自動的には機能しません。 ただし、`matplotlib.Figure` クラスには、可視化の表示と保存のどちも行えるメソッドがネイティブで備わっています。 返されたオブジェクトに `.show()` を呼び出すと、イメージを新しいウィンドウで開くことができます(構成済みの matplotlib バックエンドが対話型であることが前提です)。 または `.savefig('out.png')` を呼び出すと、図を現在作業中のディレクトリの `out.png` に保存できます。 `savefig()` メソッドはパスを取るため、出力の保存場所とファイル名の調整が可能です。" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Next steps\n", + "## 次のステップ\n", "\n", "\n", - " - See an example of circuit visualization in the [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) tutorial.\n", - " - Visualize simple circuits in the [Explore gates and circuits with the Quantum Composer](https://learning.quantum.ibm.com/tutorial/explore-gates-and-circuits-with-the-quantum-composer) tutorial.\n", - " - Review the [Qiskit visualizations API documentation](/api/qiskit/visualization).\n", + " - [Grover's Algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) チュートリアルで、回路の可視化の例をご覧ください。\n", + " - [Explore gates and circuits with the Quantum Composer](https://learning.quantum.ibm.com/tutorial/explore-gates-and-circuits-with-the-quantum-composer) チュートリアルで、単純な回路を可視化します。\n", + " - [Qiskit visualizations API documentation](/api/qiskit/visualization) をご覧ください。\n", "" ] } diff --git a/translations/ja/build/classical-feedforward-and-control-flow.ipynb b/translations/ja/build/classical-feedforward-and-control-flow.ipynb index 645ecf86116..772400b52a4 100644 --- a/translations/ja/build/classical-feedforward-and-control-flow.ipynb +++ b/translations/ja/build/classical-feedforward-and-control-flow.ipynb @@ -4,26 +4,26 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Classical feedforward and control flow\n", + "# 古典的なフィードフォワードと制御フロー\n", "\n", - "This guide demonstrates the functionality available in Qiskit for performing classical feedforward and control flow. These features are sometimes referred to collectively as \"dynamic circuits.\" Classical feedforward refers to the ability to measure qubits in the middle of a circuit and perform additional quantum operations that depend on the measurement outcome. Qiskit supports four control flow constructs for classical feedforward, each implemented as a method on [`QuantumCircuit`](../api/qiskit/qiskit.circuit.QuantumCircuit). The constructs and their corresponding methods are:\n", + "このガイドでは、古典的なフィードフォワードと制御フローを実行するために Qiskit で利用可能な関数について説明します。 これらの特徴は総称して「動的回路」と呼ばれることがあります。古典的なフィードフォーワードとは、回路の途中で量子ビットを測定し、測定結果に依存する追加の量子演算を実行することを指します。 Qiskit は古典的なフィードフォワードに 4 つの制御フロー構造体をサポートしており、それぞれ [`QuantumCircuit`](../api/qiskit/qiskit.circuit.QuantumCircuit) のメソッドとして実装されています。 以下は、構造体と対応するメソッドです。\n", "\n", - "- If statement - [`QuantumCircuit.if_test`](../api/qiskit/qiskit.circuit.QuantumCircuit#if_test)\n", - "- Switch statement - [`QuantumCircuit.switch`](../api/qiskit/qiskit.circuit.QuantumCircuit#switch)\n", - "- For loop - [`QuantumCircuit.for_loop`](../api/qiskit/qiskit.circuit.QuantumCircuit#for_loop)\n", - "- While loop - [`QuantumCircuit.while_loop`](../api/qiskit/qiskit.circuit.QuantumCircuit#while_loop)\n", + "- If 文 - [`QuantumCircuit.if_test`](../api/qiskit/qiskit.circuit.QuantumCircuit#if_test)\n", + "- Switch 文 - [`QuantumCircuit.switch`](../api/qiskit/qiskit.circuit.QuantumCircuit#switch)\n", + "- For ループ - [`QuantumCircuit.for_loop`](../api/qiskit/qiskit.circuit.QuantumCircuit#for_loop)\n", + "- While ループ - [`QuantumCircuit.while_loop`](../api/qiskit/qiskit.circuit.QuantumCircuit#while_loop)\n", "\n", - "Each of these methods returns a [context manager](https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers) and is typically used in a `with` statement. In the rest of this guide, we will explain each of these constructs and how to use them.\n", + "これらの各メソッドは [context manager](https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers) を返し、通常は `with` 分で使用されます。 このガイドの残りの部分では、これらの各構造体とその使用方法について説明します。\n", "\n", "\n", - " There are some limitations of classical feedforward and control flow operations on quantum hardware that might impact your program. For more information, see [Hardware considerations and limitations for classical feedforward and control flow](/run/dynamic-circuits-considerations).\n", + " 量子ハードウェアでの古典的なフィードフォワードと制御フロー演算には、プログラムに影響を与える可能性のある制限がいくつかあります。 詳細については、[Hardware considerations and limitations for classical feedforward and control flow](/run/dynamic-circuits-considerations) をご覧ください。\n", "\n", "\n", - "## If statement\n", + "## If 文\n", "\n", - "The if statement is used to conditionally perform operations based on the value of a classical bit or register.\n", + "if 文は、古典ビットまたはレジスターの値に基づいて、演算を条件的に実行するために使用します。\n", "\n", - "In the example below, we apply a Hadamard gate to a qubit and measure it. If the result is 1, then we apply an X gate on the qubit, which has the effect of flipping it back to the 0 state. We then measure the qubit again. The resulting measurement outcome should be 0 with 100% probability." + "以下の例では、アダマールゲートを量子ビットに適用し、それを測定します。 結果が 1 である場合は、量子ビットに 0 の状態に戻す効果のある X ゲートを適用します。 その後でもう一度、量子ビットを測定します。 測定結果は 100% の確率で 0 になります。" ] }, { diff --git a/translations/ja/run/sessions.mdx b/translations/ja/run/sessions.mdx index c660f0fe2ec..690c8413049 100644 --- a/translations/ja/run/sessions.mdx +++ b/translations/ja/run/sessions.mdx @@ -28,6 +28,10 @@ The basic workflow for sessions is as follows: 4. The _interactive timeout_ runs between the jobs in a session. Every session has an interactive timeout value (ITTL, or interactive time to live). If there are no session jobs queued within the ITTL window, the session is temporarily deactivated and normal job selection resumes. A deactivated session can be resumed for the next job\* if the session has not reached its maximum timeout value. 5. If the maximum timeout value is reached, the sessions end and any remaining queued jobs fail. + + * The job must go through the normal queue to reactivate the session. diff --git a/translations/ja/start/_toc.json b/translations/ja/start/_toc.json index 4ac7202afe5..59cd5045859 100644 --- a/translations/ja/start/_toc.json +++ b/translations/ja/start/_toc.json @@ -10,11 +10,11 @@ "title": "インストール", "children": [ { - "title": "Qiskit のインストールおよびセットアップ", + "title": "Qiskit のインストールとセットアップ", "url": "/start/install" }, { - "title": "IBM Quantum チャンネルの選択およびセットアップ", + "title": "IBM Quantum チャンネルの選択とセットアップ", "url": "/start/setup-channel" } ] @@ -27,11 +27,11 @@ "title": "高度なセットアップ", "children": [ { - "title": "ソースから Qiskit をインストールする", + "title": "ソースから Qiskit をインストール", "url": "/start/install-qiskit-source" }, { - "title": "Qiskit をローカルで構成する", + "title": "Qiskit をローカルで構成", "url": "/start/configure-qiskit-local" } ] diff --git a/translations/ja/start/configure-qiskit-local.mdx b/translations/ja/start/configure-qiskit-local.mdx index 12941399972..c6c37fd9353 100644 --- a/translations/ja/start/configure-qiskit-local.mdx +++ b/translations/ja/start/configure-qiskit-local.mdx @@ -1,9 +1,9 @@ --- -title: Qiskit をローカルで構成する +title: Qiskit をローカルで構成 description: ローカルマシンに Qiskit を構成します --- -# Qiskit をローカルで構成する +# Qiskit をローカルで構成 Qiskit のインストールと起動が完了したら、Qiskit のデフォルトの動作を変更するために実行できるいくつかのオプションがあります。 @@ -45,7 +45,7 @@ num_processes = 15 Qiskit のデフォルトの動作を変更するには、以下の環境変数を設定してください。 -- QISKIT_PARALLEL: Python マルチプロセッシングを有効に子、特定の演算を並列化します。例えば、Qiskit の複数の回路を使ったトランスパイルなどです。 ブール値を指定します。 +- QISKIT_PARALLEL: Python マルチプロセッシングを有効にし、特定の演算を並列化します。例えば、Qiskit の複数の回路を使ったトランスパイルなどです。 ブール値を指定します。 - QISKIT_NUM_PROCS: 並列実行が有効である場合に、並列演算に対して起動する並列プロセスの最大数。 0 より大きい整数値を指定します。 - RAYON_NUM_THREADS: Qiskit でマルチスレッド演算を実行するためのスレッド数。 デフォルトでは、マルチスレッドコードは論理 CPU ごとに 1 つのスレッドを起動します。 Qiskit が使用するスレッド数を調整するには、これに整数値を設定します。 例えば、RAYON_NUM_THREADS=4 と設定すると、マルチスレッド関数に 4 つのスレッドが起動します。 - QISKIT_FORCE_THREADS: マルチスレッドコードが常に複数のスレッドで実行することを指定します。 デフォルトでは、並列プロセスですでに実行している Qiskit のセクションで祭りスレッドコードを実行している場合、Qiskit は複数のスレッドを起動しない代わりに関数を順次に実行します。 これは、限られた CPU リソースの潜在的なオーバーロードを回避するためです。 ただし、マルチプロセスのコンテキストにおいても複数のスレッドの使用を強制する場合は、QISKIT_FORCE_THREADS=TRUE に設定します。 @@ -53,8 +53,8 @@ Qiskit のデフォルトの動作を変更するには、以下の環境変数 ## 次のステップ - - [build circuits](../build/)方法を学習します。 - - [Run the Hello world program](hello-world)。 + - [build circuits](../build/)する方法を学習します。 + - [Run the Hello world program](hello-world)します。 - [Grover's algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) などのチュートリアルを試します。 オープンソースの Qiskit SDK に貢献したい場合は、[contributing guidelines](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md) をお読みください。 diff --git a/translations/ja/start/hello-world.ipynb b/translations/ja/start/hello-world.ipynb index fb665478bdb..aaa94553384 100644 --- a/translations/ja/start/hello-world.ipynb +++ b/translations/ja/start/hello-world.ipynb @@ -7,7 +7,7 @@ "source": [ "# Hello World\n", "\n", - "この Hello World の例は、単純な量子プログラムを作成して量子システムでそれを実行します。 インストールとセットアップがまだ完了していない場合は、[Install and set up](install) と [Set up to use IBM Quantum Platform](setup-channel#set-up-to-use-ibm-quantum-platform) の手順を実行してください。\n", + "この Hello World の例は、単純な量子プログラムを作成して量子系でそれを実行します。 インストールとセットアップがまだ完了していない場合は、[Install and set up](install) と [Set up to use IBM Quantum Platform](setup-channel#set-up-to-use-ibm-quantum-platform) の手順を実行してください。\n", "\n", "量子コンピューターの操作には、[Jupyter](https://jupyter.org/install) 開発環境を使用することをお勧めします。 推奨される追加の可視化サポートを必ずインストールしてください(`pip install qiskit[visualization]`)。また、zsh ユーザーは `'qiskit[visualization]'` を単一引用符で囲む必要があることに注意してください。\n", "\n", @@ -31,7 +31,7 @@ "raw_mimetype": "text/restructuredtext" }, "source": [ - "量子プログラムでは、*量子回路*は量子命令を表現するためのネイティブ形式であり、*演算子*は測定される観測量を表します。 回路を作成する際は通常、新しい [`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit#quantumcircuit) オブジェクトを作成してから、そのオブジェクトに順に命令を追加します。\n" + "量子プログラムでは、*量子回路*は量子命令を表すためのネイティブ形式であり、*演算子*は測定される観測量を表します。 回路を作成する際は通常、新しい [`QuantumCircuit`](/api/qiskit/qiskit.circuit.QuantumCircuit#quantumcircuit) オブジェクトを作成してから、そのオブジェクトに順に命令を追加します。\n" ] }, { @@ -42,7 +42,7 @@ "以下のコードセルは、*ベル状態*という特定の 2 量子ビットのエンタングル状態を生成する回路を作成します。\n", "\n", "\n", - " Qiskit は $n^{th}$ の値が $1 \\ll n$ または $2^n$ である LSb 0 ビット番号付けを使用します。 紙面上では通常、最上位桁を左、最下位桁を右にして数字を書くため(世界のほとんどの地域で使用されているヒンドゥーアラビア記数法)、右から左に増加するインデックスでビットがラベル付けされています。 この LSb 0 方式は数学をより簡単にし、現代のデジタル電子工学においては最も一般的に使用されている方式ではありますが、一部の分野では逆の方式である MSb 0 も観られます。 $n$ ビットレジスターで $i^{th}$ インデックスを LSb 0 または MSb 0 に変換する場合は、単純に $i \\rightarrow n-i-1$ とすることができます。 これは作成者やソフトウェアパッケージによって異なるため、注意してください!\n", + " Qiskit は $n^{th}$ の値が $1 \\ll n$ または $2^n$ である LSb 0 ビット番号付けを使用します。 紙面上では通常、最上位桁を左、最下位桁を右にして数字を書くため(世界のほとんどの地域で使用されているヒンドゥーアラビア記数法)、右から左に増加するインデックスでビットがラベル付けされています。 この LSb 0 方式は数学をより簡単にし、現代のデジタル電子工学においては最も一般的に使用されている方式ではありますが、一部の分野では逆の方式である MSb 0 も見られます。 $n$ ビットレジスターで $i^{th}$ インデックスを LSb 0 または MSb 0 に変換する場合は、単純に $i \\rightarrow n-i-1$ とすることができます。 これは作成者やソフトウェアパッケージによって異なるため、注意してください!\n", "\n" ] }, @@ -189,7 +189,7 @@ "\n", " ```python\n", "\n", - " # シミュレーターで実行\n", + " # シミュレーターで実行します\n", "\n", " backend = service.get_backend(\"ibmq_qasm_simulator\")\n", "\n", @@ -268,7 +268,7 @@ "## 次のステップ\n", "\n", "\n", - " - [build circuits](../build/) 方法をさらに詳しく学習します。\n", + " - [build circuits](../build/)する方法をさらに詳しく学習します。\n", " - [workflow example tutorials](https://learning.quantum.ibm.com/catalog/tutorials?category=workflow-example)の 1 つを試します。\n", "\n" ] diff --git a/translations/ja/start/index.mdx b/translations/ja/start/index.mdx index 7c954c7726e..088e2633fa2 100644 --- a/translations/ja/start/index.mdx +++ b/translations/ja/start/index.mdx @@ -6,9 +6,9 @@ in_page_toc_max_heading_level: 2 # はじめに -量子コミュニティは 2016 年以降、クラウド上で量子コンピューティングを探求してきました。 現在では、_有用な量子計算を実証する_ことを新しい課題としています。 +量子コミュニティは 2016 年以降、クラウドで量子コンピューティングを探求してきました。 現在では、_有用な量子計算を実証する_ことを新しい課題としています。 -ユーザーは IBM Quantum を通じて、作業に使用できる高性能かつ実用規模 (>100 量子ビット) の量子システムや、スケーラブルで柔軟な量子ソフトウェアにアクセスすることができます。 無料プランを試すことも、使用量に応じた有料プランまたはプレミアムプランでプログラムを実行することも、量子コンピューティングに関わる有用な作業を今すぐ開始できます。 +ユーザーは IBM Quantum を通じて、作業に使用できる高性能かつ実用規模 (>100 量子ビット) の量子系や、スケーラブルで柔軟な量子ソフトウェアにアクセスすることができます。 無料プランを試すことも、使用量に応じた有料プランまたはプレミアムプランでプログラムを実行することも、量子コンピューティングに関わる有用な作業を今すぐ開始できます。 ドキュメンテーションの主なセクションは、Qiskit で量子回路と演算子を構築してから、回路の実行用に単純化された Qiskit Runtime primitive インターフェースを使ってトランスパイルと量子系での実行を行うという、一般的な量子ユーザーの作業工程に基づいています。 Qiskit と Qiskit Runtime を併用すると、高度なランタイムコンパイル、エラー抑制、および誤り軽減技法を使用してシームレスに回路を実行できます。 @@ -18,7 +18,7 @@ IBM Quantum をはじめてご利用になる場合は、ここから始める - [Install](install): インストールとセットアップの手順に従って、ツールとプラットフォームの使用を開始します。 -- [Build](../build): primitive および動的回路や中間回路の測定などの高度なメソッドを使って量子回路の設計と開発を行います。 こちらには、回路ライブラリも用意されています。 +- [Build](../build): primitive および動的回路や中間回路の測定などの高度なメソッドを使って量子回路のデザインと開発を行います。 こちらには、回路ライブラリも用意されています。 - [Transpile](../transpile): 様々なエラー認識レベルを使って、ハードウェアで効率的に実行するように回路のコンパイルと最適化を行います。 @@ -32,20 +32,20 @@ IBM Quantum をはじめてご利用になる場合は、ここから始める 量子コミュニティに参加すると、他のユーザーとアイデアを交換しながら、他のユーザーが何に取り組んでいるかを知ることができます。 -- [Slack](https://ibm.co/joinqiskitslack) にご参加ください -- [LinkedIn](https://www.linkedin.com/showcase/ibm-quantum/) でフォローしてください -- Start contributing at [GitHub](https://github.com/qiskit) -- Find us on [YouTube](https://www.youtube.com/qiskit) and [Medium](https://medium.com/qiskit) +- [Slack](https://ibm.co/joinqiskitslack) に参加 +- [LinkedIn](https://www.linkedin.com/showcase/ibm-quantum/) をフォロー +- [GitHub](https://github.com/qiskit) に貢献 +- [YouTube](https://www.youtube.com/qiskit) および [Medium](https://medium.com/qiskit) を閲覧 -## Next steps +## 次のステップ - - [Install and set up for Qiskit](install). - - [Run the Hello world program](hello-world). - - Explore hand-on tutorials in IBM Quantum Learning, such as: + - [Install and set up for Qiskit](install)を行います。 + - [Run the Hello world program](hello-world)します。 + - IBM Quantum Learning で以下のようなハンズオン形式のチュートリアルを詳しくご覧ください。 - [Variational Quantum Eigensolver](https://learning.quantum.ibm.com/tutorial/variational-quantum-eigensolver) - [Quantum Approximate Optimization Algorithm](https://learning.quantum.ibm.com/tutorial/quantum-approximate-optimization-algorithm) - [Grover's algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) - - Take the [Basics of quantum information](https://learning.quantum.ibm.com/course/basics-of-quantum-information) course. - - View a list of [all tutorials in IBM Quantum Learning](https://learning.quantum.ibm.com/catalog?content=tutorials). + - [Basics of quantum information](https://learning.quantum.ibm.com/course/basics-of-quantum-information) コースを受講します。 + - [all tutorials in IBM Quantum Learning](https://learning.quantum.ibm.com/catalog?content=tutorials)のリストを確認します。 diff --git a/translations/ja/start/install-qiskit-source.mdx b/translations/ja/start/install-qiskit-source.mdx index 8c7c55d7f69..d30fad32f96 100644 --- a/translations/ja/start/install-qiskit-source.mdx +++ b/translations/ja/start/install-qiskit-source.mdx @@ -1,15 +1,15 @@ --- -title: Install Qiskit from source -description: Learn how to install the development version of Qiskit. +title: ソースから Qiskit をインストール +description: Qiskit の開発バージョンのインストール方法を学習します。 --- -# Install Qiskit and Qiskit Runtime from source +# ソースから Qiskit および Qiskit Runtime をインストール -Installing Qiskit from source allows you to access the current development version, instead of using the version in the Python Package Index (PyPI) repository. This lets you inspect and extend the latest version of the Qiskit code more efficiently. +ソースから Qiskit をインストールすることで、Python Package Index(PyPI)リポジトリーのバージョンを使用する代わりに、現在開発中のバージョンにアクセスすることができます。 これにより、Qiskit コードの最新バージョンの検査と拡張をより効果的に行えます。 -## Create and activate a new virtual environment +## 新しい仮想環境の作成とアクティベート -1. Create a minimal environment with only Python installed in it. +1. Python だけがインストールされた最小環境を作ります。 ```` @@ -33,7 +33,7 @@ Installing Qiskit from source allows you to access the current development versi ```` -2. Activate your new environment. +2. 新しい環境をアクティベートします。 ```` @@ -57,99 +57,99 @@ Installing Qiskit from source allows you to access the current development versi ```` -## Install the Rust compiler +## Rust コンパイラーをインストール -A Rust compiler must be installed on your system to compile Qiskit. To install the Rust compiler, use the cross-platform Rust installer [rustup](https://rustup.rs/) or [another install method.](https://forge.rust-lang.org/infra/other-installation-methods.html) +Qiskit をコンパイルするには、Rust コンパイラーがお使いのシステムにインストールされている必要があります。 Rust コンパイラーをインストールするには、クロスプラットフォーム Rust インストーラー [rustup](https://rustup.rs/) か、[another install method](https://forge.rust-lang.org/infra/other-installation-methods.html)を使用します。 -## Install Qiskit +## Qiskit をインストール -Follow these steps to install Qiskit: +以下の手順にしたがって、Qiskit をインストールします。 -1. Clone the Qiskit repository. +1. Qiskit リポジトリーをクローンします。 ```bash git clone https://github.com/Qiskit/qiskit.git ``` -2. Change to the `qiskit` directory. +2. `qiskit` ディレクトリーに変更します。 ```bash cd qiskit ``` -3. (Optional) If you want to run tests or linting checks, install the developer requirements. +3. (オプション)テストまたはリントチェックを実行する場合は、開発者要件をインストールします。 ```bash pip install -r requirements-dev.txt ``` -4. Install `qiskit`. +4. `qiskit` をインストールします。 -- **Standard install**: +- **標準インストール**: ```bash pip install . ``` -- **Editable mode**: In this mode, you don't need to reinstall Qiskit when there are code changes to the project. +- **編集可能モード**: このモードでは、プロジェクトにコード変更があっても、Qiskit を再インストールする必要がありません。 ```bash pip install -e . ``` - In editable mode, the compiled extensions are built in _debug mode_ without optimizations. This affects the runtime performance of the compiled code. To build the compiled extensions with optimizations enabled, run the following command to rebuild the binary in _release mode_: + 編集可能モードでは、コンパイルされた拡張機能は最適化なしで _デバッグモード_ にビルドされます。 このため、コンパイル済みのコードの実行時パフォーマンスに影響があります。 最適化を有効にしてコンパイル済みの拡張機能をビルドするには、以下のコマンドを実行して _リリースモード_ でバイナリーをビルドし直します。 ```bash python setup.py build_rust --release --inplace ``` - If you are working on Rust code in Qiskit, you need to rebuild the extension code every time you make a local change. In editable mode, the Rust extension is only built when the install command is run, so local changes you make to the Rust code are not reflected in the installed package unless you rebuild the extension by rerunning `build_rust` (with or without `--release`, depending on whether you want to build in release or debug mode). + Qiskit で Rust コードを使用している場合は、ローカル変更を行うたびに拡張コードを再ビルドする必要があります。 編集可能モードでは、Rust 拡張機能はインストールコマンドが実行されるときにのみビルドされるため、Rust コードへのローカルの変更は、`build_rust` を再実行しない限り、インストール済みのパッケージに反映されません(`--release` の有無に関係なく、リリースまたはデバッグモードでビルドするかどうかによって決まります)。 -## Install Qiskit Runtime +## Qiskit Runtime をインストール -Follow these steps if you want to install Qiskit Runtime: +Qiskit Runtime をインストールするには、以下の手順を実行します。 -1. Clone the Qiskit Runtime repository. +1. Qiskit Runtime リポジトリーをクローンします。 ```bash git clone https://github.com/Qiskit/qiskit-ibm-runtime.git ``` -2. Change to the `qiskit_ibm_runtime` directory. +2. `qiskit_ibm_runtime` ディレクトリーに変更します。 ```bash cd qiskit_ibm_runtime ``` -3. (Optional) If you want to run tests or linting checks, install the developer requirements. We recommend using a [virtual environment](https://docs.python.org/3/library/venv.html) to avoid polluting your global Python installation. +3. (オプション)テストまたはリントチェックを実行する場合は、開発者要件をインストールします。 グローバルの Python インストールを汚染しないように、[virtual environment](https://docs.python.org/3/library/venv.html)を使用することをお勧めします。 ```bash pip install -r requirements-dev.txt ``` -4. Install `qiskit-runtime`. We recommend using a [virtual environment](https://docs.python.org/3/library/venv.html) to avoid polluting your global Python installation. +4. `qiskit-runtime` をインストールします。 グローバルの Python インストールを汚染しないように、[virtual environment](https://docs.python.org/3/library/venv.html)を使用することをお勧めします。 -- **Standard install**: +- **標準インストール**: ```bash pip install . ``` -- **Editable mode**: In this mode, you don't need to reinstall Qiskit when there are code changes to the project. +- **編集可能モード**: このモードでは、プロジェクトにコード変更があっても、Qiskit を再インストールする必要がありません。 ```bash pip install -e . ``` - In editable mode, the compiled extensions are built in _debug mode_ without optimizations. + 編集可能モードでは、コンパイルされた拡張機能は最適化なしで _デバッグモード_ にビルドされます。 -## Next steps +## 次のステップ - - Read the [contributing guidelines](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md) to contribute to the open-source Qiskit SDK. - - Learn how to [build circuits](../build/). - - [Run the Hello world program](hello-world). - - Try a tutorial, such as [Grover's algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm). + - オープンソースの Qiskit SDK に貢献するには、[contributing guidelines](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md) をお読みください。 + - [build circuits](../build/)する方法を学習します。 + - [Run the Hello world program](hello-world)します。 + - [Grover's algorithm](https://learning.quantum.ibm.com/tutorial/grovers-algorithm) などのチュートリアルを試します。 diff --git a/translations/ja/start/install.mdx b/translations/ja/start/install.mdx index 20917287b15..6a256f1e7ca 100644 --- a/translations/ja/start/install.mdx +++ b/translations/ja/start/install.mdx @@ -1,21 +1,21 @@ --- -title: Install and set up -description: Install and set up Qiskit and Qiskit Runtime on various operating systems +title: インストールとセットアップ +description: Qiskit および Qiskit Runtime を様々なオペレーティングシステムにインストールし、セットアップします --- -# Install and set up Qiskit +# Qiskit のインストールとセットアップ -Whether you will work locally or in a cloud environment, the first step for all users is to install Qiskit. For those wanting to run on a real system, your next step is to choose one of two channels in order to access IBM Quantum systems: IBM Quantum Platform or IBM Cloud. +ローカル環境でもクラウド環境でも、すべてのユーザーは最初に Qiskit をインストールする必要があります。 実際のシステムでの実行を希望する場合は、次に、IBM 量子システムにアクセスするために、IBM Quantum Platform か IBM Cloud のいずれかを選択する必要があります。 -## Install and set up Qiskit with the Qiskit Runtime Client +## Install and set up Qiskit with the Qiskit Runtime client -1. Install Python. Check the requirements in the [setup.py](https://github.com/Qiskit/qiskit/blob/main/setup.py) file to determine which Python versions are supported. For download instructions, see the [Python Beginners Guide.](https://wiki.python.org/moin/BeginnersGuide/Download) +1. Python をインストールします。 どのバージョンの Python がサポートされているかを判別するには、[setup.py](https://github.com/Qiskit/qiskit/blob/main/setup.py) ファイルで要件を確認してください。 ダウンロード手順については、[Python Beginners Guide](https://wiki.python.org/moin/BeginnersGuide/Download) をご覧ください。 - We recommend that you use [Python virtual environments](https://docs.python.org/3.10/tutorial/venv.html) to separate Qiskit from other applications. We also recommend that you use the [Jupyter](https://jupyter.org/install) development environment to interact with Qiskit. + Qiskit と他のアプリケーションを分離するには、[Python virtual environments](https://docs.python.org/3.10/tutorial/venv.html) を使用することをお勧めします。 また、Qiskit の操作には、[Jupyter](https://jupyter.org/install) 開発環境の使用をお勧めします。 - 1. Create a minimal environment with only Python installed in it. + 1. Python だけがインストールされた最小環境を作ります。 @@ -37,7 +37,7 @@ Whether you will work locally or in a cloud environment, the first step for all - 2. Activate your new environment. + 2. 新しい環境をアクティベートします。 @@ -59,12 +59,12 @@ Whether you will work locally or in a cloud environment, the first step for all -2. [Install pip](https://pip.pypa.io/en/stable/installation/). +2. [Install pip](https://pip.pypa.io/en/stable/installation/) します。 -3. Install the following packages. +3. 以下のパッケージをインストールします。 - Periodically rerun these commands or check the [Qiskit release notes](../api/qiskit/release-notes) and the [Qiskit Runtime release notes](../api/qiskit-ibm-runtime/release-notes) so that you always have the latest versions. + 常に最新のバージョンを維持するには、以下のコマンドを定期的に実行し直すか、[Qiskit release notes](../api/qiskit/release-notes) および [Qiskit Runtime release notes](../api/qiskit-ibm-runtime/release-notes) を確認してください。 ```shell @@ -75,60 +75,60 @@ Whether you will work locally or in a cloud environment, the first step for all pip install qiskit-ibm-runtime ``` - Run `pip list` to see the active packages in your virtual environment. + `pip list` を実行して、仮想環境内のアクティブなパッケージを確認します。 - If you intend to use visualization functionality or Jupyter notebooks, it is recommended to install Qiskit with the extra visualization support. Note that **zsh users** need to put `'qiskit[visualization]'` in single quotes. + 可視化機能や Jupyter Notebook を使用する場合は、可視化サポートを追加して Qiskit をインストールすることをお勧めします。 **zsh ユーザー**は、`'qiskit[visualization]'` を単一引用符で囲む必要があることに注意してください。 ```shell pip install qiskit[visualization] ``` - zsh users: + zsh ユーザー: ```shell pip install 'qiskit[visualization]' ``` -If you are planning to work locally and use simulators built into Qiskit, then your installation is done. If you want to run jobs on IBM Quantum systems, next [select an access channel](setup-channel) and finish your setup. +ローカルで作業し、Qiskit に組み込まれたシミュレーターを使用する予定である場合は、インストールはこれで完了です。 IBM 量子システムでジョブを実行する場合は、次に[select an access channel](setup-channel)してセットアップを完了させます。 -## Troubleshooting +## トラブルシューティング
- "No Module 'qiskit'" error with Jupyter Notebook + Jupyter notebook での "No Module 'qiskit'" エラー - If you used ``pip install qiskit`` and set up your virtual environment in - Anaconda, then you may get the ``No Module 'qiskit'`` error when you run a tutorial - in Jupyter Notebook. If you have not installed Qiskit or set up your - virtual environment, you can follow the [installation](#qiskit-install) steps. - - The error is caused when trying to import the Qiskit package in an - environment where Qiskit is not installed. If you launched Jupyter Notebook - from the Anaconda-Navigator, it is possible that Jupyter Notebook is running - in the base (root) environment, instead of in your virtual - environment. Choose a virtual environment in the Anaconda-Navigator from the - **Applications on** dropdown menu. In this menu, you can see - all of the virtual environments within Anaconda, and you can - select the environment where you have Qiskit installed to launch Jupyter - Notebook. + ``pip install qiskit`` を使い、Anaconda に仮想環境をセットアップしている場合、 + Jupyter Notebook でチュートリアルを実行する際に、``No Module 'qiskit'`` エラーが + 発生する場合があります。 Qiskit のインストールまたは仮想環境のセットアップ + を完了していない場合は、[installation](#qiskit-install) の手順を実行してください。 + + このエラーは、Qiskit がインストールされていない環境に Qiskit パッケージ + をインポートしようとした場合に発生します。 Jupyter Notebook を Anaconda-Navigator から + 起動した場合、Jupyter Notebook は仮想環境ではなく + ベース(ルート)環境で実行している可能性が + あります。 Anaconda-Navigator の **Applications on** ドロップダウンメニューから + 仮想環境を選択してください。 このメニューには + Anaconda 内のすべての仮想環境が表示されるため、 + Qiskit がインストール済みで Jupyter Notebook を起動できる環境を選択 + できます。
- Compilation errors during installation + インストール中のコンパイルエラー - Qiskit depends on a number of other open-source Python packages, which - are automatically installed when doing ``pip install qiskit``. Depending on - your system's platform and Python version, it is possible that a particular - package does not provide pre-built binaries for your system. You can refer - to [Operating system support](#operating-system-support) for a list of platforms supported by Qiskit, some - of which may need an extra compiler. In cases where there are - no precompiled binaries available, ``pip`` will attempt to compile the package - from source, which in turn might require some extra dependencies that need to - be installed manually. - - If the output of `pip install qiskit` contains similar lines to: + Qiskit は、``pip install qiskit`` を実行する際に自動的にインストールされる + 多数のオープンソース Python パッケージに依存しています。 お使いのシステムの + プラットフォームと Python バージョンによっては、特定のパッケージから + そのシステム用に事前にビルドされたバイナリーが提供されない可能性があります。 Qiskit がサポートしている + プラットフォームのリストについては、[Operating system support](#operating-system-support) をご覧ください。 + 一部には追加のコンパイラーが必要な場合があります。 プリコンパイルされたバイナリーを + 使用できない場合、``pip`` はソースからパッケージのコンパイルを試みるため、 + 手動によるインストールが必要な追加の依存関係が必要となる場合が + あります。 + + `pip install qiskit` の出力に以下のような行が含まれている場合: ``` Failed building wheel for SOME_PACKAGE @@ -138,200 +138,197 @@ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 ``` - please check the documentation of the package that failed to install (in the - example code, `SOME_PACKAGE`) for information on how to install the libraries - needed for compiling from source. + ソースからコンパイルするのに必要なライブラリをインストールする方法について、 + インストールに失敗したパッケージ(この例では `SOME_PACKAGE`)のドキュメン + テーションを確認してください。
-## Operating system support +## オペレーティングシステムのサポート -Qiskit strives to support as many operating systems as possible, but due to limitations in available testing resources and operating system availability, not all operating systems can be supported. Operating system support for Qiskit is broken into three tiers with different levels of support for each tier. For operating systems outside these, Qiskit is probably still installable, but it is not tested and you will have to build Qiskit (and likely Qiskit’s dependencies) from source. +Qiskit はできるだけ多くのオペレーティングシステムをサポートすることに努めていますが、利用できるテストリソースとオペレーティングシステムの可用性に制限があるため、すべてのオペレーティングシステムをサポートすることはできません。 Qiskit のオペレーティングシステムのサポートは、それぞれにサポートレベルの異なる 3 つのティアに分けられています。 これらに含まれないオペレーティングシステムについては、Qiskit のインストールはおそらく可能ではありますが、未検証であり、Qiskit(および Qiskit の依存関係)をソースからビルドする必要があります。 -Additionally, Qiskit only supports CPython. Running with other Python interpreters is not supported. +また、Qiskit は CPython のみをサポートしています。 他の Python インタープリターでの実行はサポートされていません。
- Tier 1 + ティア 1 - Tier 1 operating systems are fully tested as part of the development processes to ensure any proposed change will function correctly. Pre-compiled binaries are built, tested, and published to PyPI as part of the release process. Typically, as long as there is a functioning Python environment installed, Qiskit can be installed on these operating systems without needing to install further dependencies. + ティア 1 オペレーティングシステムは、提案されるすべての変更が正しく機能することを保証するために、開発プロセスの一環として完全に検証済みです。 プリコンパイルのバイナリーは、リリースプロセスの一環として、ビルドとテストを経て PyPI に公開されています。 通常、機能する Python 環境がインストールされている限り、これらのオペレーティングシステムに Qiskit をインストールできます。それ以上の依存関係をインストールする必要はありません。 - Tier 1 operating systems: + ティア 1 オペレーティングシステム: -- Linux x86_64 (distributions compatible with the [manylinux 2014](https://www.python.org/dev/peps/pep-0599/) packaging specification). -- macOS x86_64 (10.12 or later) -- Windows 64 bit +- Linux x86_64([manylinux 2014](https://www.python.org/dev/peps/pep-0599/) パッケージ仕様と互換性のあるディストリビューション)。 +- macOS x86_64(10.12 以降) +- Windows 64 ビット
- Tier 2 + ティア 2 - Tier 2 operating systems are not tested as part of development process. However, pre-compiled binaries are built, tested, and published to PyPI as part of the release process and these packages can be expected to be installed with just a functioning Python environment. + ティア 2 オペレーティングシステムは、開発プロセスの一環として検証されていません。 ただし、プリコンパイルのバイナリーは、リリースプロセスの一環としてビルドとテストを経て PyPI に公開されているため、これらのパッケージは機能する Python 環境だけでインストールできることが期待されています。 - Tier 2 operating systems: + ティア 2 オペレーティングシステム: -- Linux AArch64 (distributions compatible with the [manylinux 2014](https://www.python.org/dev/peps/pep-0599/) packaging specification) +- Linux AArch64([manylinux 2014](https://www.python.org/dev/peps/pep-0599/) パッケージ仕様と互換性のあるディストリビューション)
- Tier 3 + ティア 3 - Tier 3 operating systems are not tested as part of the development process. Pre-compiled binaries are built and published to PyPI as part of the release process but are not tested. They may not be installable with just a functioning Python environment and might require a C/C++ compiler or additional programs to build dependencies from source as part of the installation process. Support for these operating systems are best effort only. + ティア 3 オペレーティングシステムは、開発プロセスの一環として検証されていません。 プリコンパイルのバイナリーは、リリースプロセスの一環としてビルドされて PyPI に公開されていますが、検証はされていません。 機能する Python 環境だけではインストールできない可能性があり、インストールプロセスで、C/C++ コンパイラーまたはソースから依存関係をビルドするための追加のプログラムが必要となる場合があります。 これらのオペレーティングシステムのサポートはベストエフォートに限定されています。 - Tier 3 operating systems: + ティア 3 オペレーティングシステム: -- Linux ppc64le (distributions compatible with the [manylinux 2014](https://www.python.org/dev/peps/pep-0599/)packaging specification) -- Linux s390x (distributions compatible with the [manylinux 2014](https://www.python.org/dev/peps/pep-0599/) packaging specification) -- macOS ARM64 (10.15 or newer) -- Linux i686 (distributions compatible with the [manylinux 2014](https://www.python.org/dev/peps/pep-0599/) packaging specification) -- Windows 32 bit +- Linux ppc64le([manylinux 2014](https://www.python.org/dev/peps/pep-0599/) パッケージ仕様と互換性のあるディストリビューション) +- Linux s390x([manylinux 2014](https://www.python.org/dev/peps/pep-0599/) パッケージ仕様と互換性のあるディストリビューション) +- macOS ARM64(10.15 以降) +- Linux i686([manylinux 2014](https://www.python.org/dev/peps/pep-0599/) パッケージ仕様と互換性のあるディストリビューション) +- Windows 32 ビット
-## Qiskit versioning +## Qiskit バージョン管理 - Qiskit version numbers follow [Semantic Versioning](https://semver.org/). - The version number is comprised of three primary components: the major, minor, and - patch versions. For a version number `X.Y.Z` where `X` is the major version, - `Y` is the minor version, and `Z` is the patch version. +Qiskit のバージョン番号は [Semantic Versioning](https://semver.org/)に従います。 +The version number is comprised of three primary components: the major, minor, and +patch versions. For example, in version number `X.Y.Z`, `X` is the major version, +`Y` is the minor version, and `Z` is the patch version. - Breaking API changes are reserved for major version releases. The **minimum** - period between major version releases is one year. Minor versions introduce - new features and bug fixes without breaking API compatibility, and are - periodically (currently every three months) published for **only** the - current major version. Patch versions provide fixes for bugs identified in - the most recent minor version of each actively supported release series (i.e. - major version). We support at most two release series at a time, which occurs - only during the period of overlap following anew major version release, - described in more detail below. +重大な API の変更は、メジャーバージョンリリースに予約されています。 The **minimum** +period between major version releases is one year. Minor versions introduce +new features and bug fixes without breaking API compatibility, and are +periodically (currently every three months) published for **only** the +current major version. Patch versions provide fixes for bugs identified in +the most recent minor version of each actively supported release series (that is, the +major version). We support at most two release series at a time, which occurs +only during the period of overlap following a new major version release, +described in more detail below.
- - Release schedule + + Release schedule - A tentative release schedule is included below: - - ![](/images/start/install/release_schedule.png) - - For an up-to-date release schedule, refer to the Qiskit Github project's - [milestones list](https://github.com/Qiskit/qiskit/milestones), which will always - contain the current release plan. - - With the release of a new major version, the previous major version is supported - for at least 6 months; only bug and security fixes will be accepted during this - time and only patch releases will be published for this major version. A final - patch version will be published when support is dropped, and that release will - also document the end of support for that major version series. A longer - support window is needed for the previous major version as this gives downstream - consumers of Qiskit a chance to migrate not only their code but also their - users. We do not recommended for a downstream library that - depends on Qiskit to bump its minimum Qiskit version to a new - major version release immediately because its user base will also need a chance - to migrate to the new API changes. Having an extended support window - for the previous major Qiskit version gives downstream projects time to fix - compatibility with the next major version. Downstream projects can provide - support for two release series at a time to give their users a migration path. - - For the purposes of semantic versioning, the Qiskit public API is considered - any documented module, class, function, or method that is not marked as private - (with a `_` prefix). However, there can be explicit exceptions made in the case - of specific documented APIs. In such cases these APIs will be clearly documented - as not being considered stable interfaces yet, and a user-visible warning will be - actively emitted on any use of these unstable interfaces. Additionally, in some - situations an interface marked as private will be considered part of the public - API. Typically this only occurs in two cases: either an abstract interface - definition where subclasses are intended to override/implement a private method - as part of defining an implementation of the interface, or advanced-usage - low-level methods that have stable interfaces but are not considered safe to use, - as the burden is on the user to uphold the class/safety invariants themselves - (the canonical example of this is the `QuantumCircuit._append` method). - - The supported Python versions, minimum supported Rust version (for building - Qiskit from source), and any Python package dependencies (including the minimum - supported versions of dependencies) used by Qiskit are not part of the backwards - compatibility guarantees and may change during any release. Only minor or major - version releases will raise minimum requirements for using or building Qiskit - (including adding new dependencies), but patch fixes might include support for - new versions of Python or other dependencies. Usually the minimum version of a - dependency is only increased when older dependency versions go out of support or - when it is not possible to maintain compatibility with the latest release of the - dependency and the older version. +A tentative release schedule is included below: + +![](/images/start/install/release_schedule.png) + +For an up-to-date release schedule, refer to the Qiskit Github project's +[milestones list](https://github.com/Qiskit/qiskit/milestones), which always contains the current release plan. + +With the release of a new major version, the previous major version is supported +for at least six months; only bug and security fixes are accepted during this time and only patch releases are published for this major version. A final +patch version is published when support is dropped, and that release +also documents the end of support for that major version series. A longer +support window is needed for the previous major version as this gives downstream +Qiskit consumers and their users a chance to migrate their code. +Downstream libraries that +depend on Qiskit should not raise their minimum required Qiskit version to a new +major version immediately after its release because the library's user base needs time +to migrate to the new API changes. Having an extended support window +for the previous major Qiskit version gives downstream projects time to ensure +compatibility with the next major version. Downstream projects can provide +support for two release series at a time to give their users a migration path. + +For the purposes of semantic versioning, the Qiskit public API is considered +any documented module, class, function, or method that is not marked as private +(with an underscore `_` prefix). However, there can be explicit exceptions made for +specific documented APIs. In such cases, these APIs will be clearly documented +as not being considered stable interfaces yet, and a user-visible warning will be +actively emitted on any use of these unstable interfaces. Additionally, in some +situations, an interface marked as private is considered part of the public +API. Typically this only occurs in two cases: either an abstract interface +definition where subclasses are intended to override/implement a private method +as part of defining an implementation of the interface, or advanced-usage +low-level methods that have stable interfaces but are not considered safe to use, +as the burden is on the user to uphold the class/safety invariants themselves +(the canonical example of this is the `QuantumCircuit._append` method). + +The supported Python versions, minimum supported Rust version (for building +Qiskit from source), and any Python package dependencies (including the minimum +supported versions of dependencies) used by Qiskit are not part of the backwards +compatibility guarantees and may change during any release. Only minor or major +version releases will raise minimum requirements for using or building Qiskit +(including adding new dependencies), but patch fixes might include support for +new versions of Python or other dependencies. Usually the minimum version of a +dependency is only increased when older dependency versions go out of support or +when it is not possible to maintain compatibility with the latest release of the +dependency and the older version.
- + Upgrade strategy - Whenever a new major version is released, the recommended upgrade path - is to first upgrade to use the most recent minor version on the previous major - version. Shortly before a new major version, a final minor version will - be published. This final minor version release `M.N+1.0` is equivalent to - `M.N.0` but with warnings and deprecations for any API changes that are - made on the new major version series. - - For example, immediately proceeding the 1.0.0 release, a 0.46.0 release will be - published. The 0.46.0 release will be equivalent to the 0.45.0 release but with - additional deprecation warnings that document the API changes that were made as - part of the 1.0.0 release. This pattern will be used for any future major - version releases. - - As a user of Qiskit, it's recommended that you first upgrade to this final minor - version first, so you can see any deprecation warnings and adjust your Qiskit - usage ahead of time before trying a potentially breaking release. The previous - major version will be supported for at least six months to give sufficient time - to upgrade. A typical pattern to manage this is to pin the max version to - avoid using the next major release series until you're sure of compatibility. - For example, specifying in a requirements file `qiskit<2` when the current - major Qiskit version is 1 will ensure that you're using a version of Qiskit - that won't have breaking API changes. - - Pre-emptively capping the version less than the next major version is necessary - to ensure you get a chance to see deprecation warnings before a - major version release. The normal release schedule means the last minor - version release which includes any final deprecation warnings will be released - shortly before the next major version and `pip` will default to using - the newest version available unless the version cap is set. +When a new major version is released, the recommended upgrade path +is to first upgrade to the most recent minor version on the previous major +version. Shortly before a new major version, a final minor version will +be published. This final minor version release `X.Y+1.0.0` is equivalent to +`X.Y.0` but with warnings and deprecations for any API changes that are +made on the new major version series. + +For example, immediately proceeding the 1.0.0 release, a 0.46.0 release will be +published. The 0.46.0 release will be equivalent to the 0.45.0 release but with +additional deprecation warnings that document the API changes that were made as +part of the 1.0.0 release. This pattern will be used for any future major +version releases. + +Qiskit users should first upgrade to this final minor +version to see any deprecation warnings and adjust their Qiskit +usage before trying a potentially breaking release. The previous +major version will be supported for at least six months to give sufficient time +to upgrade. A typical pattern to manage this is to pin the maximum version to +avoid using the next major release series until you're sure of compatibility. +For example, specifying `qiskit<2` in a requirements file when the current +major Qiskit version is 1 ensures that you're using a version of Qiskit +that doesn't have breaking API changes. + +Capping the version less than the next major version +ensures that you see any deprecation warnings before a +major version release. +Without the cap, `pip` installs +the newest version available by default.
- - Pre-releases + +Pre-releases - For each minor and major version release Qiskit will publish pre-releases that - are compatible with [PEP440](https://peps.python.org/pep-0440/). Typically - these are release candidates of the form `X.Y.0rc1`. The `rc` releases - will have a finalized API surface and are used to test a prospective release. +For each minor and major version release, Qiskit publishes pre-releases that +are compatible with [PEP440](https://peps.python.org/pep-0440/). Typically +these are release candidates of the form `X.Y.0rc1`. The `rc` releases +will have a finalized API surface and are used to test a prospective release. - Note that when one of the PEP440 pre-release suffixes (such as `a`, `b`, or `pre`) are - published, it does not have the same guarantees as an `rc` release, and is - only a preview release. The API might change between these pre-releases - and the final release with that version number. For example, `1.0.0pre1` might have - a different final API than `1.0.0`. +Note that when one of the PEP440 pre-release suffixes (such as `a`, `b`, or `pre`) are +published, it does not have the same guarantees as an `rc` release, and is +only a preview release. The API might change between these pre-releases +and the final release with that version number. For example, `1.0.0pre1` might have +a different final API than `1.0.0`.
- - Post-releases + +Post-releases - If there are issues with the packaging of a given release, a post-release may be - issued to correct this. These will follow the form `X.Y.Z.1` where the fourth - integer is used to indicate it is the first post-release of the `X.Y.Z` release. - For example, the qiskit-terra (the legacy package name for Qiskit) 0.25.2 - release had some issue with the sdist package publishing, and a post-release - 0.25.2.1 was published that corrected this issue. The code was identical, and - 0.25.2.1 only fixed the packaging issue for the release. +If there are issues with a release's packaging, a post-release might be +issued to correct this. These will follow the form `X.Y.Z.1` where the fourth +integer indicates that it is the first post-release of the `X.Y.Z` release. +For example, the qiskit-terra (the legacy package name for Qiskit) 0.25.2 +release had some issue with the sdist package publishing, and a post-release +0.25.2.1 was published that corrected this issue. The code was identical, and +0.25.2.1 only fixed the packaging issue for the release.
-## Next steps +## 次のステップ - - [Select and set up an IBM Quantum channel.](setup-channel) - - [Configure Qiskit locally.](configure-qiskit-local) - - Follow the steps in [Hello world](hello-world) to write and run a quantum program. - - Try one of the [workflow example tutorials.](https://learning.quantum.ibm.com/catalog/tutorials?category=workflow-example) + - [Select and set up an IBM Quantum channel](setup-channel)を行います。 + - [Configure Qiskit locally](configure-qiskit-local)します。 + - [Hello world](hello-world) の手順に従って、量子プログラムを作成して実行します。 + - [workflow example tutorials](https://learning.quantum.ibm.com/catalog/tutorials?category=workflow-example)の 1 つを試します。 diff --git a/translations/ja/start/setup-channel.mdx b/translations/ja/start/setup-channel.mdx index 166a782f25e..2ac42ace436 100644 --- a/translations/ja/start/setup-channel.mdx +++ b/translations/ja/start/setup-channel.mdx @@ -1,60 +1,60 @@ --- -title: Select and set up an IBM Quantum channel -description: Installation and setup instructions for IBM Quantum Platform or IBM Quantum on IBM Cloud to submit Qiskit and Qiskit Runtime jobs +title: IBM Quantum チャンネルの選択とセットアップ +description: Qiskit および Qiskit Runtime ジョブを送信するための IBM Quantum Platform または IBM Cloud 上の IBM Quantum のインストールおよびセットアップ手順 --- -# Select and set up an IBM Quantum channel +# IBM Quantum チャンネルの選択とセットアップ -You can access IBM Quantum systems by using the IBM Quantum Platform or IBM Cloud _channel_. _Channel_ is the term used to describe the method you use to access IBM Quantum services. +IBM 量子システムには、IBM Quantum Platform または IBM Cloud _チャンネル_を使ってアクセスすることができます。 _チャンネル_ とは、IBM Quantum サービスにアクセスするために使用する方法を説明するために使用される用語です。 ### IBM Quantum Platform -IBM Quantum Platform has Open (free access) and Premium (enterprise subscription) plans. See [IBM Quantum access plans](https://www.ibm.com/quantum/access-plans) for details. +IBM Quantum Platform にはオープン(無料アクセス)プランとプレミアム(エンタープライズサブスクリプション)プランがあります。 詳細は、[IBM Quantum access plans](https://www.ibm.com/quantum/access-plans)をご覧ください。 -You can make requests locally (on your laptop or other device) using the `qiskit-ibm-runtime` client or use a cloud-based environment, such as [IBM Quantum Lab](https://lab.quantum.ibm.com) (a Jupyter Notebook environment) or [IBM Quantum Composer](https://quantum.ibm.com/composer/files/new) (a virtual circuit composer). To make requests from a local environment, you need to [install and set up Qiskit with the Qiskit Runtime Client](install#local) and [set up to use IBM Quantum Platform.](#iqp) +`qiskit-ibm-runtime` クライアントを使ってローカル(お使いのノートパソコンまたはその他のデバイス)でリクエストすることも、[IBM Quantum Lab](https://lab.quantum.ibm.com)(Jupyter Notebook 環境)または [IBM Quantum Composer](https://quantum.ibm.com/composer/files/new)(仮想回路作成ツール)などのクラウド環境を使用することもできます。 ローカル環境からリクエストするには、[install and set up Qiskit with the Qiskit Runtime Client](install#local) と[set up to use IBM Quantum Platform](#iqp)を実行する必要があります。 - [IBM Quantum Lab](https://lab.quantum.ibm.com) and [IBM Quantum Composer](https://quantum.ibm.com/composer/files/new) are self-contained tools and require no setup. + [IBM Quantum Lab](https://lab.quantum.ibm.com) と [IBM Quantum Composer](https://quantum.ibm.com/composer/files/new)は自己完結型のツールであり、セットアップは不要です。 -Available plans: +利用可能なプラン: -- **Open Plan** - Run your quantum circuits on the world's best quantum systems for free (up to 10 minutes quantum time per month). +- **オープンプラン** - 世界最高の量子系で、量子回路を無料で実行します(月間最大量子時間は 10 分です)。 -- **Premium Plan** - Run quantum circuits on the world's best quantum systems using an enterprise quantum time subscription. +- **プレミアムプラン** - エンタープライズ量子時間サブスクリプションを使用して、世界最高の量子系で量子回路を実行します。 ### IBM Cloud -IBM Cloud offers pay-as-you-go access plans. See [IBM Quantum access plans](https://www.ibm.com/quantum/access-plans) for details. +IBM Cloud は、従量課金制のアクセスプランを提供しています。 詳細は、[IBM Quantum access plans](https://www.ibm.com/quantum/access-plans)をご覧ください。 -IBM Cloud has Lite (free access) and Standard (pay-as-you-go access) plans. See [Qiskit Runtime plans](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-plans) on IBM Cloud for details. +IBM Cloud にはライト(無料アクセス)プランと標準(従量課金制アクセス)プランがあります。 詳細は、IBM Cloud の [Qiskit Runtime plans](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-plans)をご覧ください。 -This channel does not support a cloud-based development environment. Therefore, you will need to [install and set up Qiskit and Qiskit Runtime](install#local) and [set up to use IBM Cloud.](#cloud) +このチャンネルではクラウドベースの開発環境はサポートされていません。 そのため、[install and set up Qiskit and Qiskit Runtime](install#local)および [set up to use IBM Cloud](#cloud)が必要となります。 -Available plans: +利用可能なプラン: -- **Standard (Pay-as-you-go) Plan** - Run quantum circuits on the world's best quantum systems and pay only for the quantum time you use. +- **標準(従量課金制)プラン** - 世界最高の量子系で量子回路を実行し、使用した量子時間に対してのみ支払います。 -- **Lite plan**: Debug and learn about quantum circuits using free simulators. +- **ライトプラン**: 無料のシミュレーターを使用して、量子回路のデバッグと量子回路について学習します。 -## Set up to use IBM Quantum Platform +## IBM Quantum Platform を使用するためのセットアップ -You need access credentials to use cloud-based IBM Quantum systems. +クラウドベースの IBM 量子システムを使用するには、アクセスするための資格情報が必要です。 -1. If you do not already have a user account, get one at the [IBM Quantum login page.](https://quantum.ibm.com/login) Your user account is associated with one or more [instances](../run/instances) (in the form hub / group / project) that give access to IBM Quantum services. Additionally, a unique token is assigned to each account, allowing for IBM Quantum access from Qiskit. The instructions in this section use our default instance. For instructions to choose a specific instance, see [Connect to an instance](../run/instances#connect-instance). +1. ユーザーアカウントをまだお持ちでない場合は、[IBM Quantum login page](https://quantum.ibm.com/login)でアカウントを取得します。ユーザーアカウントは、IBM Quantum サービスにアクセスを提供する 1 つ以上の[instances](../run/instances)(hub / group / project の形式)に関連付けられます。 また、各アカウントには一意のトークンが関連付けられるため、Qiskit から IBM Quantum にアクセスできるようになります。 このセクションの手順では、デフォルトのインスタンスを使用します。 特定のインスタンスを選択するための手順については、[Connect to an instance](../run/instances#connect-instance)をご覧ください。 - The Instances section in your [IBM Quantum account page](https://quantum.ibm.com/account) lists the instances that you can access. + [IBM Quantum account page](https://quantum.ibm.com/account)の Instances セクションには、アクセスできるインスタンスがリスト表示されています。 -2. Retrieve your IBM Quantum token from the [IBM Quantum account page,](https://quantum.ibm.com/account) then start Python. For example: +2. [IBM Quantum account page](https://quantum.ibm.com/account)から IBM Quantum トークンを取得し、Python を起動します。 例: ```shell python3 ``` -3. Authenticate to the service by calling `QiskitRuntimeService` with your IBM Cloud API key and CRN: +3. IBM Cloud API キーと CRN を指定して `QiskitRuntimeService` を呼び出し、サービスに対する認証を行います。 ```python from qiskit_ibm_runtime import QiskitRuntimeService @@ -63,43 +63,43 @@ You need access credentials to use cloud-based IBM Quantum systems. ``` - Or, optionally use the `save_account()` method to save your credentials for easy access later on, before initializing the service. + また、オプションで `save_account()` メソッドを使うと、後で簡単にアクセスできるように、サービスを初期化する前に資格情報を保存することができます。 ```python from qiskit_ibm_runtime import QiskitRuntimeService - # Save an IBM Quantum account and set it as your default account. + # IBM Quantum アカウントを保存し、デフォルトにアカウントに設定します。 QiskitRuntimeService.save_account(channel="ibm_quantum", token="", set_as_default=True) - # Load saved credentials + # 保存した資格情報を読み込みます。 service = QiskitRuntimeService() ``` - - If you save your credentials to disk, you can use `QiskitRuntimeService()` in the future to initialize your account. The `channel` parameter distinguishes between different account types. If you are saving multiple accounts per channel, consider using the `name` parameter to differentiate them. - - If you are saving multiple accounts per channel, consider using the `name` parameter to differentiate them. - - Credentials are saved to `$HOME/.qiskit/qiskit-ibm.json`. Do not manually edit this file. - - If you don't save your credentials, you must specify them every time you start a new session. - - The `channel` parameter allows you to distinguish between different account types. When initializing the account, IBM Cloud is the default account used if have saved credentials for an IBM Quantum Platform and an IBM Cloud account. + - 資格情報をディスクに保存すると、以降で `QiskitRuntimeService()` を使ってアカウントを初期化することができます。 `channel` パラメーターはアカウントタイプを区別します。 チャンネルごとに複数のアカウントを保存している場合は、アカウントを区別できるように `name` パラメーターを使用することを検討してください。 + - チャンネルごとに複数のアカウントを保存している場合は、アカウントを区別できるように `name` パラメーターを使用することを検討してください。 + - 資格情報は `$HOME/.qiskit/qiskit-ibm.json` に保存されます。 このファイルを手動で編集しないでください。 + - 資格情報を保存しない場合は、新しいセッションを開始するたびにその情報を指定する必要があります。 + - `channel` パラメーターを使うと、様々なアカウントタイプを区別することができます。 アカウントを初期化すると、IBM Quantum Platform と IBM Cloud アカウントの資格情報が保存されている場合のデフォルトのアカウントは IBM Cloud です。 - Account credentials are saved in plain text, so only do so if you are using a trusted device. + アカウントの資格情報はプレーンテキストで保存されるため、信頼できるデバイスを使用している場合にのみ保存するようにしてください。 - IBM Cloud is the default account used if you don't specify a different channel or account name. + 別のチャンネルやアカウント名を指定しない場合に使用されるデフォルトのアカウントは IBM Cloud です。 -4. Test your setup. Run a simple circuit using Sampler to ensure that your environment is set up properly: +4. セットアップを検証します。 Sampler を使用して単純な回路を実行し、環境が適切にセットアップされていることを確認します。 ```python from qiskit import QuantumCircuit from qiskit_ibm_runtime import QiskitRuntimeService, Sampler - # Create empty circuit + # 空の回路を作成します example_circuit = QuantumCircuit(2) example_circuit.measure_all() - # You'll need to specify the credentials when initializing QiskitRuntimeService, if they were not previously saved. + # QiskitRuntimeService を初期化する際に、過去に資格情報を保存していない場合はその情報を指定する必要があります。 service = QiskitRuntimeService() backend = service.backend("ibmq_qasm_simulator") job = Sampler(backend).run(example_circuit) @@ -109,31 +109,31 @@ You need access credentials to use cloud-based IBM Quantum systems. ``` -## Set up to use IBM Cloud +## IBM Cloud を使用するためのセットアップ -1. Start Python. For example: +1. Python を開始します。 例: ```shell python3 ``` -2. If you do not already have one, set up an IBM Cloud account from the [IBM Cloud Registration page](https://cloud.ibm.com/registration). +2. IBM Cloud アカウントをまだお持ちでない場合は、[IBM Cloud Registration page](https://cloud.ibm.com/registration)でアカウントをセットアップします。 -3. Create a service instance, if necessary. Open your [IBM Cloud Instances page](https://cloud.ibm.com/quantum/instances). If you have one or more instances shown, continue to the next step. Otherwise, click **Create instance**. When creating your instance you can name it, tag it, select a resource group for it, and select a performance strategy. Next, agree to the license agreements by checking the box in the bottom right corner of the page, and click **Create**. +3. 必要であれば、サービスインスタンスを作成します。 [IBM Cloud Instances page](https://cloud.ibm.com/quantum/instances)を開きます。 1 つ以上のインスタンスが表示される場合は、次の手順に進みます。 そうでない場合は **Create instance** をクリックします。 インスタンスの作成時には、インスタンスに名前やタグを付け、リソースグループを指定し、パフォーマンス戦略を選択することができます。 次に、ページの右下にあるボックスをオンにしてライセンス契約に同意し、**Create**をクリックします。 - If you are an administrator who needs to set up Qiskit Runtime on Cloud for your organization, refer to [Plan Qiskit Runtime for an organization](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-quickstart-org). + 組織の Qiskit Runtime を Cloud にセットアップする必要がある管理者は、[Plan Qiskit Runtime for an organization](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-quickstart-org)をご覧ください。 - When selecting a performance strategy there are two options available. One from IBM (default) another from Q-CTRL. The IBM performance strategy allows you to leverage all of the standard options available with [Qiskit Runtime](../api/qiskit-ibm-runtime) and the Q-CTRL strategy uses an automated preset. To learn more about the Q-CTRL option, visit the [Q-CTRL documentation](https://docs.q-ctrl.com/q-ctrl-embedded). + パフォーマンス戦略を選択する際は、2 つのオプションを利用できます。 1 つは IBM(デフォルト)で、もう 1 つは Q-CTRL の戦略です。 IBM のパフォーマンス戦略では、[Qiskit Runtime](../api/qiskit-ibm-runtime) で提供されるすべての標準オプションを活用できますが、Q-CTRL 戦略では自動プリセットが使用されます。 Q-CTRL のオプションの詳細については、[Q-CTRL documentation](https://docs.q-ctrl.com/q-ctrl-embedded)をご覧ください。 -4. Find your access credentials. - 1. Find your API key. From the [API keys page](https://cloud.ibm.com/iam/apikeys), view or create your API key, then copy it to a secure location so you can use it for authentication. - 2. Find your Cloud Resource Name (CRN). Open the [Instances page](https://cloud.ibm.com/quantum/instances) and click your instance. In the page that opens, click the icon to copy your CRN. Save it in a secure location so you can use it for authentication. +4. アクセス資格情報を見つけます。 + 1. API キーを見つけます。 [API keys page](https://cloud.ibm.com/iam/apikeys)から、API キーを表示または作成し、認証に使用できるように安全な場所にコピーします。 + 2. クラウドリソース名(CRN)を見つけます。 [Instances page](https://cloud.ibm.com/quantum/instances)を開き、インスタンスをクリックします。 開いたページで、アイコンをクリックして CRN をコピーします。 認証に使用できるように安全な場所に保存してください。 -5. Authenticate to the service by calling `QiskitRuntimeService` with your saved credentials or with your IBM Cloud API key and CRN: +5. 保存した資格情報または IBM Cloud API キーと CRN を指定して `QiskitRuntimeService` を呼び出し、サービスに対する認証を行います。 ```python from qiskit_ibm_runtime import QiskitRuntimeService @@ -142,41 +142,41 @@ You need access credentials to use cloud-based IBM Quantum systems. ``` - If you set up your instance in step 3 to include Q-CTRL performance management, when initializing the `QiskitRuntimeService()` you should include the additional argument `channel_strategy="q-ctrl"`. To learn more about Q-CTRL performance management strategy visit the [Q-CTRL documentation](https://docs.q-ctrl.com/q-ctrl-embedded). + ステップ 3 で Q-CTRL パフォーマンス管理を含めるようにインスタンスをセットアップした場合は、`QiskitRuntimeService()` を初期化する際に、`channel_strategy="q-ctrl"` 引数を追加する必要があります。 Q-CTRL パフォーマンス管理戦略についての詳細は、[Q-CTRL documentation](https://docs.q-ctrl.com/q-ctrl-embedded)をご覧ください。 - You can optionally use the `save_account()` method to save your credentials for easy access later on, before initializing the service. + オプションで `save_account()` メソッドを使うと、後で簡単にアクセスできるように、サービスを初期化する前に資格情報を保存することができます。 ```python from qiskit_ibm_runtime import QiskitRuntimeService - # Save account to disk. + # アカウントをディスクに保存します。 QiskitRuntimeService.save_account(channel="ibm_cloud", token="", instance="", name="") - # Load saved credentials + # 保存された資格情報を読み込みます service = QiskitRuntimeService(name="") ``` - - If you save your credentials to disk, you can use `QiskitRuntimeService()` in the future to initialize your account. The `channel` parameter distinguishes between different account types. When initializing the account, IBM Cloud is the default account used if you have saved credentials for both an IBM Quantum Platform and an IBM Cloud account. - - If you are saving multiple accounts per channel, consider using the `name` parameter to differentiate them. - - Credentials are saved to `$HOME/.qiskit/qiskit-ibm.json`. Do not manually edit this file. - - If you don't save your credentials, you must specify them every time you start a new session. + - 資格情報をディスクに保存すると、以降で `QiskitRuntimeService()` を使ってアカウントを初期化することができます。 `channel` パラメーターはアカウントタイプを区別します。 アカウントを初期化すると、IBM Quantum Platform と IBM Cloud アカウントの両方の資格情報が保存されている場合のデフォルトのアカウントは IBM Cloud です。 + - チャンネルごとに複数のアカウントを保存している場合は、アカウントを区別できるように `name` パラメーターを使用することを検討してください。 + - 資格情報は `$HOME/.qiskit/qiskit-ibm.json` に保存されます。 このファイルを手動で編集しないでください。 + - 資格情報を保存しない場合は、新しいセッションを開始するたびにその情報を指定する必要があります。 - Account credentials are saved in plain text, so only do so if you are using a trusted device. + アカウントの資格情報はプレーンテキストで保存されるため、信頼できるデバイスを使用している場合にのみ保存するようにしてください。 -6. Test your setup. Run a simple circuit using Sampler to ensure that your environment is set up properly: +6. セットアップを検証します。 Sampler を使用して単純な回路を実行し、環境が適切にセットアップされていることを確認します。 ````python from qiskit import QuantumCircuit from qiskit_ibm_runtime import QiskitRuntimeService, Sampler - # Create empty circuit + # 空の回路を作成します example_circuit = QuantumCircuit(2) example_circuit.measure_all() - # You'll need to specify the credentials when initializing QiskitRuntimeService, if they were not previously saved. + # QiskitRuntimeService を初期化する際に、過去に資格情報を保存していない場合はその情報を指定する必要があります。 service = QiskitRuntimeService() backend = service.backend("ibmq_qasm_simulator") job = Sampler(backend).run(example_circuit) @@ -185,13 +185,13 @@ You need access credentials to use cloud-based IBM Quantum systems. print(result) ``` -## Next steps +## 次のステップ -- [Configure Qiskit locally.](configure-qiskit-local) -- Follow the steps in [Hello world](hello-world) to write and run a quantum program. -- [Get started with IBM Quantum on Cloud.](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-get-started) -- Try one of the [workflow example tutorials.](https://learning.quantum.ibm.com/catalog/tutorials?category=workflow-example) +- [Configure Qiskit locally](configure-qiskit-local)します。 +- [Hello world](hello-world) の手順に従って、量子プログラムを作成して実行します。 +- [Get started with IBM Quantum on Cloud](https://cloud.ibm.com/docs/quantum-computing?topic=quantum-computing-get-started)。 +- [workflow example tutorials](https://learning.quantum.ibm.com/catalog/tutorials?category=workflow-example)の 1 つを試します。 ````