Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.ignis.verification.BConfig

class BConfig(backend, indicator=True)

GitHub

This class is used to create a GHZ circuit with parallellized CNOT gates to increase fidelity

__init__

__init__(backend, indicator=True)

Initialize self. See help(type(self)) for accurate signature.


Methods

__init__(backend[, indicator])Initialize self.
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(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(n[, full_measurement])Get a parametrized MQC circuit.
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(n)Get a parametrized PO circuit.
get_ghz_simple(n[, full_measurement])Get simple GHZ circuit with measurement
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()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

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

get_ghz_mqc

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

get_ghz_mqc_para

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

get_ghz_po

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

get_ghz_po_para

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

get_ghz_simple

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

get_measurement_circ

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

get_tier_dict

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 backend’s GHZ state is parallelized.

Return type

Dict

Returns

Tier dictionary - [step in process, control-target connection]

Facilitates parallelized GHZ circuits

Was this page helpful?
Report a bug or request content on GitHub.