Skip to content

Commit

Permalink
New Crowdin translations by GitHub Action (#663)
Browse files Browse the repository at this point in the history
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
  • Loading branch information
github-actions[bot] and crowdin-bot authored Jan 22, 2024
1 parent 488f833 commit 0ec45b8
Show file tree
Hide file tree
Showing 14 changed files with 572 additions and 590 deletions.
38 changes: 19 additions & 19 deletions translations/ja/build/_toc.json
Original file line number Diff line number Diff line change
@@ -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/"
}
]
Expand Down
95 changes: 38 additions & 57 deletions translations/ja/build/bit-ordering.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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>
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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
Expand All @@ -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()
Expand All @@ -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
## 次のステップ

<Admonition type="tip" title="Recommendations">
- 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) リファレンスを詳しくご覧ください。
</Admonition>
Loading

0 comments on commit 0ec45b8

Please sign in to comment.