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

183 lines
5.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

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 (v0.29)
description: API reference for qiskit.ignis.verification.BConfig in qiskit v0.29
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.ignis.verification.BConfig
---
# 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">
Bases: `object`
This class is used to create a GHZ circuit with parallellized CNOT gates to increase fidelity
## Methods
<span id="qiskit-ignis-verification-bconfig-get-ghz-layout" />
### get\_ghz\_layout
<Function id="qiskit.ignis.verification.BConfig.get_ghz_layout" signature="BConfig.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>
<span id="qiskit-ignis-verification-bconfig-get-ghz-mqc" />
### get\_ghz\_mqc
<Function id="qiskit.ignis.verification.BConfig.get_ghz_mqc" signature="BConfig.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>
<span id="qiskit-ignis-verification-bconfig-get-ghz-mqc-para" />
### get\_ghz\_mqc\_para
<Function id="qiskit.ignis.verification.BConfig.get_ghz_mqc_para" signature="BConfig.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>
<span id="qiskit-ignis-verification-bconfig-get-ghz-po" />
### get\_ghz\_po
<Function id="qiskit.ignis.verification.BConfig.get_ghz_po" signature="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
**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>
<span id="qiskit-ignis-verification-bconfig-get-ghz-po-para" />
### get\_ghz\_po\_para
<Function id="qiskit.ignis.verification.BConfig.get_ghz_po_para" signature="BConfig.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>
<span id="qiskit-ignis-verification-bconfig-get-ghz-simple" />
### get\_ghz\_simple
<Function id="qiskit.ignis.verification.BConfig.get_ghz_simple" signature="BConfig.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>
<span id="qiskit-ignis-verification-bconfig-get-measurement-circ" />
### get\_measurement\_circ
<Function id="qiskit.ignis.verification.BConfig.get_measurement_circ" signature="BConfig.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>
<span id="qiskit-ignis-verification-bconfig-get-tier-dict" />
### get\_tier\_dict
<Function id="qiskit.ignis.verification.BConfig.get_tier_dict" signature="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]. 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>