31 lines
1.9 KiB
Plaintext
31 lines
1.9 KiB
Plaintext
---
|
|
title: MCXSynthesisGrayCode (latest version)
|
|
description: API reference for qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisGrayCode in the latest version of qiskit
|
|
in_page_toc_min_heading_level: 1
|
|
python_api_type: class
|
|
python_api_name: qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisGrayCode
|
|
---
|
|
|
|
# MCXSynthesisGrayCode
|
|
|
|
<Class id="qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisGrayCode" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/passes/synthesis/hls_plugins.py#L1075-L1101" signature="qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisGrayCode" modifiers="class">
|
|
Bases: [`HighLevelSynthesisPlugin`](qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin "qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin")
|
|
|
|
Synthesis plugin for a multi-controlled X gate based on the Gray code.
|
|
|
|
This plugin name is :`mcx.gray_code` which can be used as the key on an [`HLSConfig`](qiskit.transpiler.passes.HLSConfig "qiskit.transpiler.passes.HLSConfig") object to use this method with [`HighLevelSynthesis`](qiskit.transpiler.passes.HighLevelSynthesis "qiskit.transpiler.passes.HighLevelSynthesis").
|
|
|
|
For a multi-controlled X gate with $k$ control qubits this synthesis method requires no additional clean auxiliary qubits. The synthesized circuit consists of $k + 1$ qubits.
|
|
|
|
It is not recommended to use this method for large values of $k + 1$ as it produces exponentially many gates.
|
|
|
|
## Methods
|
|
|
|
### run
|
|
|
|
<Function id="qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisGrayCode.run" github="https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/transpiler/passes/synthesis/hls_plugins.py#L1089-L1101" signature="run(high_level_object, coupling_map=None, target=None, qubits=None, **options)">
|
|
Run synthesis for the given MCX gate.
|
|
</Function>
|
|
</Class>
|
|
|