qiskit-documentation/docs/api/qiskit/0.25/qiskit.ignis.verification.B...

183 lines
11 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: BConfig
description: API reference for qiskit.ignis.verification.BConfig
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.ignis.verification.BConfig
---
# qiskit.ignis.verification.BConfig
<Class id="qiskit.ignis.verification.BConfig" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-ignis/tree/stable/0.6/qiskit/ignis/verification/entanglement/parallelize.py" signature="BConfig(backend, indicator=True)" modifiers="class">
This class is used to create a GHZ circuit with parallellized CNOT gates to increase fidelity
### \_\_init\_\_
<Function id="qiskit.ignis.verification.BConfig.__init__" signature="__init__(backend, indicator=True)">
Initialize self. See help(type(self)) for accurate signature.
</Function>
## Methods
| | |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`__init__`](#qiskit.ignis.verification.BConfig.__init__ "qiskit.ignis.verification.BConfig.__init__")(backend\[, indicator]) | Initialize self. |
| [`get_ghz_layout`](#qiskit.ignis.verification.BConfig.get_ghz_layout "qiskit.ignis.verification.BConfig.get_ghz_layout")(n\[, transpiled, barriered]) | Feeds the Tier Dict of the backend to create a basic qiskit GHZ circuit with no measurement; :type n: `int` :param n: number of qubits :type transpiled: `bool` :param transpiled: toggle on/off transpilation - useful for tomography :type barriered: `bool` :param barriered: yes/no whether to barrier each step of CNOT gates |
| [`get_ghz_mqc`](#qiskit.ignis.verification.BConfig.get_ghz_mqc "qiskit.ignis.verification.BConfig.get_ghz_mqc")(n, delta\[, full\_measurement]) | This function creates an MQC circuit with n qubits, where the middle phase rotation around the z axis is by delta |
| [`get_ghz_mqc_para`](#qiskit.ignis.verification.BConfig.get_ghz_mqc_para "qiskit.ignis.verification.BConfig.get_ghz_mqc_para")(n\[, full\_measurement]) | Get a parametrized MQC circuit. |
| [`get_ghz_po`](#qiskit.ignis.verification.BConfig.get_ghz_po "qiskit.ignis.verification.BConfig.get_ghz_po")(n, delta) | This function creates an Parity Oscillation circuit with n qubits, where the middle superposition rotation around the x and y axes is by delta |
| [`get_ghz_po_para`](#qiskit.ignis.verification.BConfig.get_ghz_po_para "qiskit.ignis.verification.BConfig.get_ghz_po_para")(n) | Get a parametrized PO circuit. |
| [`get_ghz_simple`](#qiskit.ignis.verification.BConfig.get_ghz_simple "qiskit.ignis.verification.BConfig.get_ghz_simple")(n\[, full\_measurement]) | Get simple GHZ circuit with measurement |
| [`get_measurement_circ`](#qiskit.ignis.verification.BConfig.get_measurement_circ "qiskit.ignis.verification.BConfig.get_measurement_circ")(n, qregname, cregname) | Creates a measurement circuit that can toggle between measuring the control qubit or measuring all qubits. |
| [`get_tier_dict`](#qiskit.ignis.verification.BConfig.get_tier_dict "qiskit.ignis.verification.BConfig.get_tier_dict")() | Take the nodes of the BConfig to create a Tier Dictionary, where keys are the steps in the process, and the values are the connections following pattern of: \[controlled qubit, NOT qubit]. |
### get\_ghz\_layout
<Function id="qiskit.ignis.verification.BConfig.get_ghz_layout" signature="get_ghz_layout(n, transpiled=True, barriered=True)">
Feeds the Tier Dict of the backend to create a basic qiskit GHZ circuit with no measurement; :type n: `int` :param n: number of qubits :type transpiled: `bool` :param transpiled: toggle on/off transpilation - useful for tomography :type barriered: `bool` :param barriered: yes/no whether to barrier each step of CNOT gates
**Return type**
`Tuple`\[`QuantumCircuit`, `Dict`]
**Returns**
A GHZ Circuit and its initial GHZ layout
</Function>
### get\_ghz\_mqc
<Function id="qiskit.ignis.verification.BConfig.get_ghz_mqc" signature="get_ghz_mqc(n, delta, full_measurement=True)">
This function creates an MQC circuit with n qubits, where the middle phase rotation around the z axis is by delta
**Parameters**
* **n** (`int`) number of qubits
* **delta** (`float`) the rotation of the middle phase around the z axis
* **full\_measurement** (`bool`) Whether to append full measurement, or only on the first qubit
**Return type**
`Tuple`\[`QuantumCircuit`, `Dict`]
**Returns**
The MQC circuit and the initial GHZ layout
</Function>
### get\_ghz\_mqc\_para
<Function id="qiskit.ignis.verification.BConfig.get_ghz_mqc_para" signature="get_ghz_mqc_para(n, full_measurement=True)">
Get a parametrized MQC circuit. Remember that get\_counts() method accepts an index now, not a circuit
**Parameters**
* **n** (`int`) number of qubits
* **full\_measurement** (`bool`) Whether to append full measurement, or only on the first qubit
**Return type**
`Tuple`\[`QuantumCircuit`, `Parameter`, `Dict`]
**Returns**
The MQC circuit, its delta parameter, and the initial GHZ layout
</Function>
### get\_ghz\_po
<Function id="qiskit.ignis.verification.BConfig.get_ghz_po" signature="get_ghz_po(n, delta)">
This function creates an Parity Oscillation circuit with n qubits, where the middle superposition rotation around the x and y axes is by delta
**Parameters**
* **n** (`int`) number of qubits
* **delta** (`float`) the middle superposition rotation
**Return type**
`Tuple`\[`QuantumCircuit`, `Dict`]
**Returns**
The Parity Oscillation circuit and the initial GHZ layout
</Function>
### get\_ghz\_po\_para
<Function id="qiskit.ignis.verification.BConfig.get_ghz_po_para" signature="get_ghz_po_para(n)">
Get a parametrized PO circuit. Remember that get\_counts() method accepts an index now, not a circuit. The two phase parameters are a quirk of the Parameter module
**Parameters**
**n** (`int`) number of qubits
**Return type**
`Tuple`\[`QuantumCircuit`, `List`\[`Parameter`], `Dict`]
**Returns**
**A parity oscillation circuit, its Delta/minus-delta parameters,**
and the initial ghz layout
</Function>
### get\_ghz\_simple
<Function id="qiskit.ignis.verification.BConfig.get_ghz_simple" signature="get_ghz_simple(n, full_measurement=True)">
Get simple GHZ circuit with measurement
**Parameters**
* **n** (`int`) number of qubits
* **full\_measurement** (`bool`) Whether to append full measurement, or only on the first qubit
**Return type**
`Tuple`\[`QuantumCircuit`, `QuantumRegister`, `Dict`]
**Returns**
A GHZ Circuit, its measurement circle quantum register and the initial GHZ layout
</Function>
### get\_measurement\_circ
<Function id="qiskit.ignis.verification.BConfig.get_measurement_circ" signature="get_measurement_circ(n, qregname, cregname, full_measurement=True)">
Creates a measurement circuit that can toggle between measuring the control qubit or measuring all qubits. The default is measurement of all qubits.
**Parameters**
* **n** (`int`) number of qubits
* **qregname** (`str`) name of the qubit register
* **cregname** (`str`) name of the classical register
* **full\_measurement** (`bool`) Whether to append full measurement, or only on the first qubit
**Return type**
`QuantumCircuit`
**Returns**
The measurement circuit
</Function>
### get\_tier\_dict
<Function id="qiskit.ignis.verification.BConfig.get_tier_dict" signature="get_tier_dict()">
Take the nodes of the BConfig to create a Tier Dictionary, where keys are the steps in the process, and the values are the connections following pattern of: \[controlled qubit, NOT qubit]. Thus the backends GHZ state is parallelized.
**Return type**
`Dict`
**Returns**
**Tier dictionary - \[step in process, control-target connection]**
Facilitates parallelized GHZ circuits
</Function>
</Class>