---
title: MCXSynthesisNDirtyM15 (dev version)
description: API reference for qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisNDirtyM15 in the dev version of qiskit
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit/dev/qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisNDirtyM15
---

# MCXSynthesisNDirtyM15

*class* `qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesisNDirtyM15`

[GitHub](https://github.com/Qiskit/qiskit/tree/main/qiskit/transpiler/passes/synthesis/hls_plugins.py#L1163-L1196)

Bases: [`HighLevelSynthesisPlugin`](/docs/api/qiskit/dev/qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin "qiskit.transpiler.passes.synthesis.plugin.HighLevelSynthesisPlugin")

Synthesis plugin for a multi-controlled X gate using dirty ancillas, following circuit (5) for three controls and Proposition 5 for four or more controls in Maslov (2016).

This plugin name is `mcx.n_dirty_m15`. For $k = 3$ control qubits it requires one dirty ancilla and produces 16 T gates and 14 CX gates. For $k \ge 4$ it requires $\lceil(k - 2) / 2\rceil$ dirty ancillas and produces $8k - 8$ T gates and $8k - 12$ CX gates.

The plugin supports the following plugin-specific options:

- num\_clean\_ancillas: The number of clean auxiliary qubits available.
- num\_dirty\_ancillas: The number of dirty auxiliary qubits available.

**References**

1. D. Maslov, *Advantages of using relative-phase Toffoli gates with an application to multiple control Toffoli optimization*, Phys. Rev. A 93, 022311 (2016), [arXiv:1508.03273](https://arxiv.org/abs/1508.03273)

## Methods

### run

`run(high_level_object, coupling_map=None, target=None, qubits=None, **options)`

[GitHub](https://github.com/Qiskit/qiskit/tree/main/qiskit/transpiler/passes/synthesis/hls_plugins.py#L1184-L1196)

Run synthesis for the given MCX gate.
