diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml
index 79659a27..7f2468d1 100644
--- a/.github/workflows/build_test.yml
+++ b/.github/workflows/build_test.yml
@@ -11,9 +11,11 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
+ continue-on-error: true
strategy:
+ fail-fast: false
matrix:
- python-version: [ "3.9", "3.10" ]
+ python-version: [ "3.10", "3.11", "3.12" ]
outputs:
error-check: ${{ steps.error-check.conclusion }}
steps:
diff --git a/.gitignore b/.gitignore
index 0752b089..8955a3ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,6 +83,7 @@ ipython_config.py
# pyenv
.python-version
+.python-base-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -131,3 +132,4 @@ dmypy.json
.vscode
.DS_Store
+.idea
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..0d297a67
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,11 @@
+clean_setup:
+ pyenv virtualenv-delete -f $(shell cat .python-version)
+ pyenv virtualenv $(shell cat .python-base-version) $(shell cat .python-version)
+ #make setup
+setup:
+ pip install -r requirements-dev.txt
+run_tests:
+ python -m unittest discover -s ./tests/ -p "test_*.py"
+upgrade_dependencies:
+ pip-compile --allow-unsafe --no-annotate requirements-dev.in --upgrade
+ pip-compile --allow-unsafe --no-annotate requirements.in --upgrade
diff --git a/docs/search.js b/docs/search.js
index 869d6d16..bc9dec31 100644
--- a/docs/search.js
+++ b/docs/search.js
@@ -1,6 +1,6 @@
window.pdocSearch = (function(){
/** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;uphase
and pauli
, detailed below.
A general class for quantum circuits, with a ZX / Gadget representation.
\n"}, {"fullname": "pauliopt.circuits.QISKIT_CONVERSION", "modulename": "pauliopt.circuits", "qualname": "QISKIT_CONVERSION", "kind": "variable", "doc": "\n", "default_value": "{'h': <function <lambda>>, 'x': <function <lambda>>, 'y': <function <lambda>>, 'z': <function <lambda>>, 's': <function <lambda>>, 'sdg': <function <lambda>>, 't': <function <lambda>>, 'tdg': <function <lambda>>, 'swap': <function <lambda>>, 'cx': <function <lambda>>, 'cy': <function <lambda>>, 'cz': <function <lambda>>, 'ccx': <function <lambda>>, 'ccz': <function <lambda>>, 'rx': <function <lambda>>, 'ry': <function <lambda>>, 'rz': <function <lambda>>, 'crx': <function <lambda>>, 'cry': <function <lambda>>, 'crz': <function <lambda>>}"}, {"fullname": "pauliopt.circuits.Circuit", "modulename": "pauliopt.circuits", "qualname": "Circuit", "kind": "class", "doc": "Class for representing quantum circuits.
\n"}, {"fullname": "pauliopt.circuits.Circuit.__init__", "modulename": "pauliopt.circuits", "qualname": "Circuit.__init__", "kind": "function", "doc": "\n", "signature": "(n_qubits, _gates=None)"}, {"fullname": "pauliopt.circuits.Circuit.n_qubits", "modulename": "pauliopt.circuits", "qualname": "Circuit.n_qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.circuits.Circuit.add_gate", "modulename": "pauliopt.circuits", "qualname": "Circuit.add_gate", "kind": "function", "doc": "\n", "signature": "(self, gate):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.add_gates", "modulename": "pauliopt.circuits", "qualname": "Circuit.add_gates", "kind": "function", "doc": "\n", "signature": "(self, gates):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.to_phase_circuit", "modulename": "pauliopt.circuits", "qualname": "Circuit.to_phase_circuit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.from_qiskit", "modulename": "pauliopt.circuits", "qualname": "Circuit.from_qiskit", "kind": "function", "doc": "\n", "signature": "(qc: qiskit.circuit.quantumcircuit.QuantumCircuit):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.to_qiskit", "modulename": "pauliopt.circuits", "qualname": "Circuit.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.clifford", "modulename": "pauliopt.clifford", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.clifford.tableau", "modulename": "pauliopt.clifford.tableau", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.clifford.tableau.mult_paulis", "modulename": "pauliopt.clifford.tableau", "qualname": "mult_paulis", "kind": "function", "doc": "Small helper function to multiply two Pauli strings and correctly update the sign.
\n\nArgs:\n p1 (np.ndarray): Pauli string 1\n p2 (np.ndarray): Pauli string 2\n sign1 (int): Sign of Pauli string 1\n sign2 (int): Sign of Pauli string 2\n n_qubits (int): Number of qubits in the Pauli strings
\n\nReturns:\n np.ndarray: Pauli string 1 * Pauli string 2
\n", "signature": "(p1, p2, sign1, sign2, n_qubits):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau", "kind": "class", "doc": "Class for storing and manipulating Clifford tableau.\nA Clifford tableau is a representation of a Clifford circuit as a\n2n x 2n binary matrix, where n is the number of qubits. The first n rows\nrepresent the stabilizers, and the last n rows represent the destabilizers.\nThe first n columns represent the X operators, and the last n columns\nrepresent the Z operators.\nThe sign of the operator in row i is given by the i-th entry of\nthe sign vector.
\n\nThe tableau is initialized as the identity matrix with a zero sign vector.
\n\nArgs:\n n_qubits (int): Number of qubits in the tableau.
\n\nA more readable representation of the tableau is given by the string:
\n\n>>> from pauliopt.clifford.tableau import CliffordTableau\n>>> ct = CliffordTableau(2)\n>>> print(ct)\n# Expected Output:\n# X/Z I/I | +\n# I/I X/Z | +\n>>> ct.append_h(0)\n>>> print(ct)\n# Expected Output:\n# Z/X I/I | +\n# I/I X/Z | +\n
\nTo get the raw $2n imes 2n$ matrix representation of the tableau, use:
\n\n>>> ct.tableau\n# Expected Output:\n# array([[0, 0, 1, 0],\n# [0, 1, 0, 0],\n# [1, 0, 0, 0],\n# [0, 0, 0, 1]], dtype=uint8)\n
\nTo get the sign vector, use:
\n\n>>> ct.signs\n# Expected Output:\n# array([0, 0, 0, 0], dtype=uint8)\n
\nCreate a CliffordTableau from a tableau and sign vector.
\n\nArgs:\n tableau (np.ndarray): $2n imes 2n$ binary matrix representing the tableau.\n signs (np.ndarray): $2n$-dimensional binary vector representing the sign vector.
\n\nReturns:\n CliffordTableau: CliffordTableau object.
\n", "signature": "(tableau, signs):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.from_qiskit_tableau", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.from_qiskit_tableau", "kind": "function", "doc": "Create a CliffordTableau from a qiskit Clifford object.
\n\nArgs:\n qiskit_ct (qiskit.quantum_info.Clifford): Clifford object.
\n\nReturns:\n CliffordTableau: CliffordTableau object.
\n", "signature": "(\tqiskit_ct: qiskit.quantum_info.operators.symplectic.clifford.Clifford):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.string_repr", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.string_repr", "kind": "function", "doc": "Get a string representation of the tableau.
\n\nArgs:\n sep (str): Separator between the pauli operators\n sign_sep (str): Separator between operators and sign.
\n", "signature": "(self, sep=' ', sign_sep='| '):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.x_out", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.x_out", "kind": "function", "doc": "Get the X operator in row row
and column col
.
Args:\n row (int): Row index.\n col (int): Column index.
\n", "signature": "(self, row, col):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.z_out", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.z_out", "kind": "function", "doc": "Get the Z operator in row row
and column col
.
Args:\n row (int): Row index.\n col (int): Column index.
\n", "signature": "(self, row, col):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.prepend_h", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.prepend_h", "kind": "function", "doc": "Prepend a Hadamard gate to the tableau.
\n\nArgs:\n qubit (int): Qubit the hadamard gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.append_h", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.append_h", "kind": "function", "doc": "Append a Hadamard gate to the tableau.
\n\nArgs:\n qubit (int): Qubit the hadamard gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.prepend_s", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.prepend_s", "kind": "function", "doc": "Prepend a S gate to the tableau.
\n\nArgs:\n qubit (int): Qubit the S gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.append_s", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.append_s", "kind": "function", "doc": "Append a S gate to the tableau.
\n\nArgs:\n qubit (int): Qubit the S gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.prepend_cnot", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.prepend_cnot", "kind": "function", "doc": "Prepend a CNOT gate to the tableau.
\n\nArgs:\n control (int): Control qubit.\n target (int): Target qubit.
\n", "signature": "(self, control, target):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.append_cnot", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.append_cnot", "kind": "function", "doc": "Append a CNOT gate to the tableau.
\n\nArgs:\n control (int): Control qubit.\n target (int): Target qubit.
\n", "signature": "(self, control, target):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.insert_pauli_row", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.insert_pauli_row", "kind": "function", "doc": "Insert a Pauli row into the tableau.
\n\nArgs:\n pauli (np.array): Pauli to be inserted.\n p_sign (int): Sign of the Pauli.\n row (int): Row to insert the Pauli.
\n", "signature": "(self, pauli, p_sign, row):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.inverse", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.inverse", "kind": "function", "doc": "Invert the tableau.
\n\nNote: this is will create a deep copy of the tableau.
\n\nReturns:\n CliffordTableau: Inverted tableau.
\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau.CliffordTableau.apply", "modulename": "pauliopt.clifford.tableau", "qualname": "CliffordTableau.apply", "kind": "function", "doc": "Apply a CliffordTableau to the current tableau.
\n\nNote: this is will create a deep copy of the tableau.
\n\nArgs:\n other (CliffordTableau): CliffordTableau to apply.
\n\nReturns:\n CliffordTableau: Applied CliffordTableau.
\n", "signature": "(self, other: pauliopt.clifford.tableau.CliffordTableau):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau_synthesis", "modulename": "pauliopt.clifford.tableau_synthesis", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.clifford.tableau_synthesis.heurisitc_fkt", "modulename": "pauliopt.clifford.tableau_synthesis", "qualname": "heurisitc_fkt", "kind": "function", "doc": "The heuristic function for picking the pivot in the tableau synthesis algorithm.
\n\nPick the pivot to eliminate the next column in the tableau synthesis algorithm.
\n\nWe currently use the heuristic function h to pick the pivot,\ni.e choose the row with the smallest heurisitc_fkt
value.
Helper function to update the dfs list in place. (See compute_steiner_tree)
\n\nHelper function to relabel the graph in place. (See compute_steiner_tree)
\n\nCompute the steiner tree of the sub_graph with the given nodes.\nThis function is a wrapper around the networkx steiner tree function.
\n\nIt will additionally swap the columns of the remaining tableau to further reduce\nthe amount of CNOTs if include_swaps is True.\nInclude_swaps requires lookup, swappable_nodes, permutation and n_qubits to be set.
\n\nsub_graph: The graph of the topology
include_swaps: Whether to include swaps in the steiner tree
Check if the given vertex is a cutting vertex in the given graph.
\n\nSanitization process for the stabilizer part.
\n\nEssentially:
\n\nSanitization process for the destabilizer part.
\n\nEssentially:
\n\nRemove the interactions of the destabilizer/stabilizer part.\nThis function assumed that all elements are Z or I.
\n\nInclude swaps requires swappable_nodes, permutation and include_swaps to be set.
\n\nSteiner reduce a column of the tableau.
\n\nArchitecture aware synthesis of a Clifford tableau.\nThis is the implementation of the algorithm described in Winderl et. al. [1]
\n\n\n\n\nThe synthesized circuit and a inital/final permutation
\n
References
\n\n[1] Winderl, Huang, et al. \"Architecture-Aware Synthesis of Stabilizer Circuits from Clifford Tableaus.\" arXiv preprint arXiv:2309.08972 (2023).
\n", "signature": "(\ttableau: pauliopt.clifford.tableau.CliffordTableau,\ttopo: pauliopt.topologies.Topology,\tinclude_swaps=True):", "funcdef": "def"}, {"fullname": "pauliopt.gates", "modulename": "pauliopt.gates", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.gates.Gate", "modulename": "pauliopt.gates", "qualname": "Gate", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "abc.ABC"}, {"fullname": "pauliopt.gates.Gate.qubits", "modulename": "pauliopt.gates", "qualname": "Gate.qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Gate.name", "modulename": "pauliopt.gates", "qualname": "Gate.name", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Gate.width", "modulename": "pauliopt.gates", "qualname": "Gate.width", "kind": "variable", "doc": "Width of gate used for drawing.
\n"}, {"fullname": "pauliopt.gates.Gate.draw_zx", "modulename": "pauliopt.gates", "qualname": "Gate.draw_zx", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Gate.draw_box", "modulename": "pauliopt.gates", "qualname": "Gate.draw_box", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Gate.draw", "modulename": "pauliopt.gates", "qualname": "Gate.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Gate.gadgets", "modulename": "pauliopt.gates", "qualname": "Gate.gadgets", "kind": "variable", "doc": "List of gadgets used to implement this gate.
\n"}, {"fullname": "pauliopt.gates.Gate.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Gate.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.PhaseGate", "modulename": "pauliopt.gates", "qualname": "PhaseGate", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.PhaseGate.phase", "modulename": "pauliopt.gates", "qualname": "PhaseGate.phase", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.H", "modulename": "pauliopt.gates", "qualname": "H", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.H.n_qubits", "modulename": "pauliopt.gates", "qualname": "H.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.H.width", "modulename": "pauliopt.gates", "qualname": "H.width", "kind": "variable", "doc": "Width of gate used for drawing.
\n", "default_value": "40"}, {"fullname": "pauliopt.gates.H.decomp", "modulename": "pauliopt.gates", "qualname": "H.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.H.draw", "modulename": "pauliopt.gates", "qualname": "H.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.H.to_qiskit", "modulename": "pauliopt.gates", "qualname": "H.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.X", "modulename": "pauliopt.gates", "qualname": "X", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.X.n_qubits", "modulename": "pauliopt.gates", "qualname": "X.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.X.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "X.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.X.decomp", "modulename": "pauliopt.gates", "qualname": "X.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.X.to_qiskit", "modulename": "pauliopt.gates", "qualname": "X.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Z", "modulename": "pauliopt.gates", "qualname": "Z", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Z.n_qubits", "modulename": "pauliopt.gates", "qualname": "Z.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Z.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Z.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Z.decomp", "modulename": "pauliopt.gates", "qualname": "Z.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Z.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Z.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Y", "modulename": "pauliopt.gates", "qualname": "Y", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Y.n_qubits", "modulename": "pauliopt.gates", "qualname": "Y.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Y.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Y.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Y.decomp", "modulename": "pauliopt.gates", "qualname": "Y.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Y.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Y.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.S", "modulename": "pauliopt.gates", "qualname": "S", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.S.n_qubits", "modulename": "pauliopt.gates", "qualname": "S.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.S.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "S.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.S.decomp", "modulename": "pauliopt.gates", "qualname": "S.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.S.to_qiskit", "modulename": "pauliopt.gates", "qualname": "S.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Sdg", "modulename": "pauliopt.gates", "qualname": "Sdg", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Sdg.n_qubits", "modulename": "pauliopt.gates", "qualname": "Sdg.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Sdg.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Sdg.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Sdg.decomp", "modulename": "pauliopt.gates", "qualname": "Sdg.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Sdg.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Sdg.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.T", "modulename": "pauliopt.gates", "qualname": "T", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.T.n_qubits", "modulename": "pauliopt.gates", "qualname": "T.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.T.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "T.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.T.decomp", "modulename": "pauliopt.gates", "qualname": "T.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.T.to_qiskit", "modulename": "pauliopt.gates", "qualname": "T.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Tdg", "modulename": "pauliopt.gates", "qualname": "Tdg", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Tdg.n_qubits", "modulename": "pauliopt.gates", "qualname": "Tdg.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Tdg.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Tdg.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Tdg.decomp", "modulename": "pauliopt.gates", "qualname": "Tdg.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Tdg.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Tdg.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.SWAP", "modulename": "pauliopt.gates", "qualname": "SWAP", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.SWAP.n_qubits", "modulename": "pauliopt.gates", "qualname": "SWAP.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.SWAP.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "SWAP.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.SWAP.decomp", "modulename": "pauliopt.gates", "qualname": "SWAP.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.SWAP.to_qiskit", "modulename": "pauliopt.gates", "qualname": "SWAP.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CX", "modulename": "pauliopt.gates", "qualname": "CX", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CX.n_qubits", "modulename": "pauliopt.gates", "qualname": "CX.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CX.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CX.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CX.width", "modulename": "pauliopt.gates", "qualname": "CX.width", "kind": "variable", "doc": "Width of gate used for drawing.
\n", "default_value": "40"}, {"fullname": "pauliopt.gates.CX.decomp", "modulename": "pauliopt.gates", "qualname": "CX.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CX.draw", "modulename": "pauliopt.gates", "qualname": "CX.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CX.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CX.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CY", "modulename": "pauliopt.gates", "qualname": "CY", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CY.n_qubits", "modulename": "pauliopt.gates", "qualname": "CY.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CY.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CY.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CY.decomp", "modulename": "pauliopt.gates", "qualname": "CY.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CY.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CY.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CZ", "modulename": "pauliopt.gates", "qualname": "CZ", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CZ.n_qubits", "modulename": "pauliopt.gates", "qualname": "CZ.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CZ.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CZ.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CZ.decomp", "modulename": "pauliopt.gates", "qualname": "CZ.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CZ.draw", "modulename": "pauliopt.gates", "qualname": "CZ.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CZ.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CZ.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CCX", "modulename": "pauliopt.gates", "qualname": "CCX", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CCX.n_qubits", "modulename": "pauliopt.gates", "qualname": "CCX.n_qubits", "kind": "variable", "doc": "\n", "default_value": "3"}, {"fullname": "pauliopt.gates.CCX.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CCX.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CCX.decomp", "modulename": "pauliopt.gates", "qualname": "CCX.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CCX.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CCX.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CCZ", "modulename": "pauliopt.gates", "qualname": "CCZ", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CCZ.n_qubits", "modulename": "pauliopt.gates", "qualname": "CCZ.n_qubits", "kind": "variable", "doc": "\n", "default_value": "3"}, {"fullname": "pauliopt.gates.CCZ.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CCZ.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CCZ.decomp", "modulename": "pauliopt.gates", "qualname": "CCZ.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CCZ.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CCZ.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Rx", "modulename": "pauliopt.gates", "qualname": "Rx", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.Rx.n_qubits", "modulename": "pauliopt.gates", "qualname": "Rx.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Rx.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Rx.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Rx.decomp", "modulename": "pauliopt.gates", "qualname": "Rx.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Rx.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Rx.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Ry", "modulename": "pauliopt.gates", "qualname": "Ry", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.Ry.n_qubits", "modulename": "pauliopt.gates", "qualname": "Ry.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Ry.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Ry.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Ry.decomp", "modulename": "pauliopt.gates", "qualname": "Ry.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Ry.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Ry.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Rz", "modulename": "pauliopt.gates", "qualname": "Rz", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.Rz.n_qubits", "modulename": "pauliopt.gates", "qualname": "Rz.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Rz.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Rz.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Rz.decomp", "modulename": "pauliopt.gates", "qualname": "Rz.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Rz.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Rz.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CRx", "modulename": "pauliopt.gates", "qualname": "CRx", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.CRx.n_qubits", "modulename": "pauliopt.gates", "qualname": "CRx.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CRx.draw_gadget", "modulename": "pauliopt.gates", "qualname": "CRx.draw_gadget", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CRx.decomp", "modulename": "pauliopt.gates", "qualname": "CRx.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CRx.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CRx.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CRy", "modulename": "pauliopt.gates", "qualname": "CRy", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.CRy.n_qubits", "modulename": "pauliopt.gates", "qualname": "CRy.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CRy.draw_gadget", "modulename": "pauliopt.gates", "qualname": "CRy.draw_gadget", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CRy.decomp", "modulename": "pauliopt.gates", "qualname": "CRy.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CRy.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CRy.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CRz", "modulename": "pauliopt.gates", "qualname": "CRz", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.CRz.n_qubits", "modulename": "pauliopt.gates", "qualname": "CRz.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CRz.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CRz.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CRz.decomp", "modulename": "pauliopt.gates", "qualname": "CRz.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CRz.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CRz.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CNOT", "modulename": "pauliopt.gates", "qualname": "CNOT", "kind": "variable", "doc": "\n", "default_value": "<class 'pauliopt.gates.CX'>"}, {"fullname": "pauliopt.gates.draw_gadget", "modulename": "pauliopt.gates", "qualname": "draw_gadget", "kind": "function", "doc": "\n", "signature": "(builder, base, row_width, params, gadget, text_above=True):", "funcdef": "def"}, {"fullname": "pauliopt.pauli", "modulename": "pauliopt.pauli", "kind": "module", "doc": "This module contains code to create and simplify circuits of Pauli gadgets,\nby conjugation with topologically-aware random circuits of Clifford gates.
\n\nCurrently in development.
\n"}, {"fullname": "pauliopt.pauli.anneal", "modulename": "pauliopt.pauli.anneal", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.anneal.pick_random_gate", "modulename": "pauliopt.pauli.anneal", "qualname": "pick_random_gate", "kind": "function", "doc": "\n", "signature": "(num_qubits, gate_set=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.anneal.compute_effect", "modulename": "pauliopt.pauli.anneal", "qualname": "compute_effect", "kind": "function", "doc": "\n", "signature": "(\tpp: pauliopt.pauli.pauli_polynomial.PauliPolynomial,\tgate: pauliopt.pauli.clifford_gates.CliffordGate,\ttopology: pauliopt.topologies.Topology,\tleg_cache=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.anneal.anneal", "modulename": "pauliopt.pauli.anneal", "qualname": "anneal", "kind": "function", "doc": "\n", "signature": "(\tpp: pauliopt.pauli.pauli_polynomial.PauliPolynomial,\ttopology,\tschedule=('geometric', 1.0, 0.1),\tnr_iterations=100):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates", "modulename": "pauliopt.pauli.clifford_gates", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType", "kind": "class", "doc": "An enumeration.
\n", "bases": "enum.Enum"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.CX", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.CX", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.CX: 'cx'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.CY", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.CY", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.CY: 'cy'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.CZ", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.CZ", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.CZ: 'cz'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.H", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.H", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.H: 'h'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.S", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.S", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.S: 's'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.V", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.V", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.V: 'v'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordGate", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordGate", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "abc.ABC"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordGate.c_type", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordGate.c_type", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordGate.propagate_pauli", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordGate.propagate_pauli", "kind": "function", "doc": "\n", "signature": "(self, gadget: pauliopt.pauli.pauli_gadget.PauliGadget):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "CliffordGate, abc.ABC"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.__init__", "kind": "function", "doc": "\n", "signature": "(type, qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.rules", "kind": "variable", "doc": "\n", "default_value": "None"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.qubit", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.qubit", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.propagate_pauli", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.propagate_pauli", "kind": "function", "doc": "\n", "signature": "(self, gadget: pauliopt.pauli.pauli_gadget.PauliGadget):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "CliffordGate, abc.ABC"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.__init__", "kind": "function", "doc": "\n", "signature": "(type, control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.rules", "kind": "variable", "doc": "\n", "default_value": "None"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.control", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.control", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.target", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.target", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.propagate_pauli", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.propagate_pauli", "kind": "function", "doc": "\n", "signature": "(self, gadget: pauliopt.pauli.pauli_gadget.PauliGadget):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.CX", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CX", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "ControlGate"}, {"fullname": "pauliopt.pauli.clifford_gates.CX.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CX.__init__", "kind": "function", "doc": "\n", "signature": "(control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.CX.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CX.rules", "kind": "variable", "doc": "\n", "default_value": "{'XX': (<Pauli.X: 'X'>, <Pauli.I: 'I'>, 1), 'XY': (<Pauli.Y: 'Y'>, <Pauli.Z: 'Z'>, 1), 'XZ': (<Pauli.Y: 'Y'>, <Pauli.Y: 'Y'>, -1), 'XI': (<Pauli.X: 'X'>, <Pauli.X: 'X'>, 1), 'YX': (<Pauli.Y: 'Y'>, <Pauli.I: 'I'>, 1), 'YY': (<Pauli.X: 'X'>, <Pauli.Z: 'Z'>, -1), 'YZ': (<Pauli.X: 'X'>, <Pauli.Y: 'Y'>, 1), 'YI': (<Pauli.Y: 'Y'>, <Pauli.X: 'X'>, 1), 'ZX': (<Pauli.Z: 'Z'>, <Pauli.X: 'X'>, 1), 'ZY': (<Pauli.I: 'I'>, <Pauli.Y: 'Y'>, 1), 'ZZ': (<Pauli.I: 'I'>, <Pauli.Z: 'Z'>, 1), 'ZI': (<Pauli.Z: 'Z'>, <Pauli.I: 'I'>, 1), 'IX': (<Pauli.I: 'I'>, <Pauli.X: 'X'>, 1), 'IY': (<Pauli.Z: 'Z'>, <Pauli.Y: 'Y'>, 1), 'IZ': (<Pauli.Z: 'Z'>, <Pauli.Z: 'Z'>, 1), 'II': (<Pauli.I: 'I'>, <Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.CZ", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CZ", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "ControlGate"}, {"fullname": "pauliopt.pauli.clifford_gates.CZ.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CZ.__init__", "kind": "function", "doc": "\n", "signature": "(control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.CZ.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CZ.rules", "kind": "variable", "doc": "\n", "default_value": "{'XX': (<Pauli.Y: 'Y'>, <Pauli.Y: 'Y'>, 1), 'XY': (<Pauli.Y: 'Y'>, <Pauli.X: 'X'>, -1), 'XZ': (<Pauli.X: 'X'>, <Pauli.I: 'I'>, 1), 'XI': (<Pauli.X: 'X'>, <Pauli.Z: 'Z'>, 1), 'YX': (<Pauli.X: 'X'>, <Pauli.Y: 'Y'>, -1), 'YY': (<Pauli.X: 'X'>, <Pauli.X: 'X'>, 1), 'YZ': (<Pauli.Y: 'Y'>, <Pauli.I: 'I'>, 1), 'YI': (<Pauli.Y: 'Y'>, <Pauli.Z: 'Z'>, 1), 'ZX': (<Pauli.I: 'I'>, <Pauli.X: 'X'>, 1), 'ZY': (<Pauli.I: 'I'>, <Pauli.Y: 'Y'>, 1), 'ZZ': (<Pauli.Z: 'Z'>, <Pauli.Z: 'Z'>, 1), 'ZI': (<Pauli.Z: 'Z'>, <Pauli.I: 'I'>, 1), 'IX': (<Pauli.Z: 'Z'>, <Pauli.X: 'X'>, 1), 'IY': (<Pauli.Z: 'Z'>, <Pauli.Y: 'Y'>, 1), 'IZ': (<Pauli.I: 'I'>, <Pauli.Z: 'Z'>, 1), 'II': (<Pauli.I: 'I'>, <Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.CY", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CY", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "ControlGate"}, {"fullname": "pauliopt.pauli.clifford_gates.CY.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CY.__init__", "kind": "function", "doc": "\n", "signature": "(control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.CY.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CY.rules", "kind": "variable", "doc": "\n", "default_value": "{'XX': (<Pauli.Y: 'Y'>, <Pauli.Z: 'Z'>, -1), 'XY': (<Pauli.X: 'X'>, <Pauli.I: 'I'>, 1), 'XZ': (<Pauli.Y: 'Y'>, <Pauli.X: 'X'>, 1), 'XI': (<Pauli.X: 'X'>, <Pauli.Y: 'Y'>, 1), 'YX': (<Pauli.X: 'X'>, <Pauli.Z: 'Z'>, 1), 'YY': (<Pauli.Y: 'Y'>, <Pauli.I: 'I'>, 1), 'YZ': (<Pauli.X: 'X'>, <Pauli.X: 'X'>, -1), 'YI': (<Pauli.Y: 'Y'>, <Pauli.Y: 'Y'>, 1), 'ZX': (<Pauli.I: 'I'>, <Pauli.X: 'X'>, 1), 'ZY': (<Pauli.Z: 'Z'>, <Pauli.Y: 'Y'>, 1), 'ZZ': (<Pauli.I: 'I'>, <Pauli.Z: 'Z'>, 1), 'ZI': (<Pauli.Z: 'Z'>, <Pauli.I: 'I'>, 1), 'IX': (<Pauli.Z: 'Z'>, <Pauli.X: 'X'>, 1), 'IY': (<Pauli.I: 'I'>, <Pauli.Y: 'Y'>, 1), 'IZ': (<Pauli.Z: 'Z'>, <Pauli.Z: 'Z'>, 1), 'II': (<Pauli.I: 'I'>, <Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.H", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "H", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "SingleQubitGate"}, {"fullname": "pauliopt.pauli.clifford_gates.H.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "H.__init__", "kind": "function", "doc": "\n", "signature": "(qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.H.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "H.rules", "kind": "variable", "doc": "\n", "default_value": "{'X': (<Pauli.Z: 'Z'>, 1), 'Y': (<Pauli.Y: 'Y'>, -1), 'Z': (<Pauli.X: 'X'>, 1), 'I': (<Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.S", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "S", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "SingleQubitGate"}, {"fullname": "pauliopt.pauli.clifford_gates.S.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "S.__init__", "kind": "function", "doc": "\n", "signature": "(qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.S.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "S.rules", "kind": "variable", "doc": "\n", "default_value": "{'X': (<Pauli.Y: 'Y'>, -1), 'Y': (<Pauli.X: 'X'>, 1), 'Z': (<Pauli.Z: 'Z'>, 1), 'I': (<Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.V", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "V", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "SingleQubitGate"}, {"fullname": "pauliopt.pauli.clifford_gates.V.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "V.__init__", "kind": "function", "doc": "\n", "signature": "(qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.V.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "V.rules", "kind": "variable", "doc": "\n", "default_value": "{'X': (<Pauli.X: 'X'>, 1), 'Y': (<Pauli.Z: 'Z'>, -1), 'Z': (<Pauli.Y: 'Y'>, 1), 'I': (<Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.generate_random_clifford", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "generate_random_clifford", "kind": "function", "doc": "\n", "signature": "(c_type: pauliopt.pauli.clifford_gates.CliffordType, n_qubits: int):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.clifford_to_qiskit", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "clifford_to_qiskit", "kind": "function", "doc": "\n", "signature": "(clifford: pauliopt.pauli.clifford_gates.CliffordGate):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_region", "modulename": "pauliopt.pauli.clifford_region", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.__init__", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.__init__", "kind": "function", "doc": "\n", "signature": "(num_qubits, gates=None)"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.gates", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.gates", "kind": "variable", "doc": "\n", "annotation": ": [<class 'pauliopt.pauli.clifford_gates.CliffordGate'>]"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.num_qubits", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.num_qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.add_gate", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.add_gate", "kind": "function", "doc": "\n", "signature": "(self, gate: pauliopt.pauli.clifford_gates.CliffordGate):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.to_qiskit", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget", "modulename": "pauliopt.pauli.pauli_gadget", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.decompose_cnot_ladder_z", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "decompose_cnot_ladder_z", "kind": "function", "doc": "\n", "signature": "(ctrl: int, trg: int, arch: pauliopt.topologies.Topology):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.find_minimal_cx_assignment", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "find_minimal_cx_assignment", "kind": "function", "doc": "\n", "signature": "(\tcolumn: <built-in function array>,\tarch: pauliopt.topologies.Topology):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.PPhase", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PPhase", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PPhase.__init__", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PPhase.__init__", "kind": "function", "doc": "\n", "signature": "(angle: pauliopt.utils.AngleExpr)"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.__init__", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.__init__", "kind": "function", "doc": "\n", "signature": "(\tangle: pauliopt.utils.AngleExpr,\tpaulis: List[pauliopt.pauli.utils.Pauli])"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.angle", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.angle", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.paulis", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.paulis", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.copy", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.copy", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.two_qubit_count", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.two_qubit_count", "kind": "function", "doc": "\n", "signature": "(self, topology, leg_cache=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.to_qiskit", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self, topology=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial", "modulename": "pauliopt.pauli.pauli_polynomial", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.__init__", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.__init__", "kind": "function", "doc": "\n", "signature": "(num_qubits)"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.num_qubits", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.num_qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.pauli_gadgets", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.pauli_gadgets", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.num_gadgets", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.num_gadgets", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.to_qiskit", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self, topology=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.propagate", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.propagate", "kind": "function", "doc": "\n", "signature": "(self, gate: pauliopt.pauli.clifford_gates.CliffordGate):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.copy", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.copy", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.two_qubit_count", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.two_qubit_count", "kind": "function", "doc": "\n", "signature": "(self, topology, leg_cache=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.to_svg", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.to_svg", "kind": "function", "doc": "\n", "signature": "(\tself,\thscale: float = 1.0,\tvscale: float = 1.0,\tscale: float = 1.0,\tsvg_code_only=False):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.utils", "modulename": "pauliopt.pauli.utils", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.utils.Pauli", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli", "kind": "class", "doc": "An enumeration.
\n", "bases": "enum.Enum"}, {"fullname": "pauliopt.pauli.utils.Pauli.I", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.I", "kind": "variable", "doc": "\n", "default_value": "<Pauli.I: 'I'>"}, {"fullname": "pauliopt.pauli.utils.Pauli.X", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.X", "kind": "variable", "doc": "\n", "default_value": "<Pauli.X: 'X'>"}, {"fullname": "pauliopt.pauli.utils.Pauli.Y", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.Y", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Y: 'Y'>"}, {"fullname": "pauliopt.pauli.utils.Pauli.Z", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.Z", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Z: 'Z'>"}, {"fullname": "pauliopt.pauli.utils.I", "modulename": "pauliopt.pauli.utils", "qualname": "I", "kind": "variable", "doc": "\n", "default_value": "<Pauli.I: 'I'>"}, {"fullname": "pauliopt.pauli.utils.X", "modulename": "pauliopt.pauli.utils", "qualname": "X", "kind": "variable", "doc": "\n", "default_value": "<Pauli.X: 'X'>"}, {"fullname": "pauliopt.pauli.utils.Y", "modulename": "pauliopt.pauli.utils", "qualname": "Y", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Y: 'Y'>"}, {"fullname": "pauliopt.pauli.utils.Z", "modulename": "pauliopt.pauli.utils", "qualname": "Z", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Z: 'Z'>"}, {"fullname": "pauliopt.phase", "modulename": "pauliopt.phase", "kind": "module", "doc": "This module contains code to create and simplify circuits of mixed ZX phase gadgets,\nby conjugation with topologically-aware random circuits of CX gates.
\n"}, {"fullname": "pauliopt.phase.cx_circuits", "modulename": "pauliopt.phase.cx_circuits", "kind": "module", "doc": "This module contains code to create CX circuits for the optimization\nof circuits of mixed phase gadgets.
\n"}, {"fullname": "pauliopt.phase.cx_circuits.GateLike", "modulename": "pauliopt.phase.cx_circuits", "qualname": "GateLike", "kind": "variable", "doc": "\n", "default_value": "typing.Union[typing.List[int], typing.Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.synthesis_methods", "modulename": "pauliopt.phase.cx_circuits", "qualname": "synthesis_methods", "kind": "variable", "doc": "\n", "default_value": "['permrowcol']"}, {"fullname": "pauliopt.phase.cx_circuits.permrowcol", "modulename": "pauliopt.phase.cx_circuits", "qualname": "permrowcol", "kind": "function", "doc": "Generates a sequence of CNOTs reallizing the given parity matrix up to permutation (if reallocate=True) using\nthe algorithm from https://arxiv.org/abs/2205.00724.
\n\nArgs:\n matrix (numpy.NDArray): The binary parity matrix\n topology (Topology): The target device topology\n parities_as_columns (bool): Whether the parities in the matrix are row-wise or column-wise. Defaults to False, i.e. row-wise.\n reallocate (bool, optional): Whether to qubits can re reallocated. Defaults to False.
\n\nRaises:\n ModuleNotFoundError: If 'networkx' or 'galois' is not installed.
\n\nReturns:\n List[Tuple[int]]: List of CNOTs realizing the given parity matrix\n List[int]: The output permutation of the qubit mapping. Equals [0..n] if reallocate==False.
\n", "signature": "(\tmatrix: numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]],\ttopology: pauliopt.topologies.Topology,\tparities_as_columns: bool = False,\treallocate: bool = False) -> Tuple[List[Tuple[int]], List[int]]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer", "kind": "class", "doc": "Container for a layer of CX gates constrained\nby a given qubit topology.
\n\nIt uses pauliopt.topologies.Matching
to keep track of which\ncouplings in the qubit topology are currently occupied by a CX gate,\nand to efficiently determine whether a CX gate can be added to the layer.
Readonly property exposing the qubit topology\nconstraining this CX circuit layer.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.num_gates", "kind": "variable", "doc": "Readonly property returning the number of gates in this\nCX circuit layer.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.gates", "kind": "variable", "doc": "Readonly property returning the collection of gates in this\nCX circuit layer.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.num_flippable_cxs", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.num_flippable_cxs", "kind": "variable", "doc": "Readonly property returning the number of CX gates in this\nCX circuit layer that can be flipped.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.flippable_cxs", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.flippable_cxs", "kind": "variable", "doc": "Readonly property returning the collection of CX gates that\nthat can be currently flipped in this layer, namely:
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.incident", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.incident", "kind": "function", "doc": "Returns the CX gate incident to the given qubit in this layer,\nor None
if there is no gate incident to the qubit.
Checks whether the given CX gate is in the layer:
\n", "signature": "(self, ctrl: int, trgt: int) -> bool:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.is_cx_flippable", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.is_cx_flippable", "kind": "function", "doc": "Checks whether the given CX gate can be flipped in this layer.\nThis is true if:
\n\nReturns a randomly selected flippable CX gate in this CX circuit layer,\nusing the given random number generator.
\n", "signature": "(self, rng: numpy.random._generator.Generator) -> Tuple[int, int]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.flip_cx", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.flip_cx", "kind": "function", "doc": "Adds/removes a CX gate with given control and target to/from the layer.\nRaises ValueError
if the gate cannot be added/removed.
The layer is modified in-place and then returned, as per the\nfluent API pattern.
\n", "signature": "(self, ctrl: int, trgt: int) -> pauliopt.phase.cx_circuits.CXCircuitLayer:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.clone", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.clone", "kind": "function", "doc": "Returns a copy of this CX layer.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuitLayer:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.to_qiskit", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self) -> Any:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.draw", "kind": "function", "doc": "Draws this CX circuit layer using NetworkX and Matplotlib.
\n\nThe layout
keyword argument can be used to select a NetworkX layout\nfrom the available ones (exposed by Topology.available_nx_layouts
).\nThe figsize
keyword argument is passed to matplotlib.pyplot.figure
:\nif specified, it determines the width and height of the figure being drawn.\nThe zcolor
and xcolor
keyword arguments are used to determine the colour\nof the Z and X dots in a CX gate (analogous to PhaseCircuit.to_svg
).\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
Container for a circuit of CX gates, consisting of a given number of layers\nand constrained by a given qubit topology.
\n", "bases": "typing.Sequence[pauliopt.phase.cx_circuits.CXCircuitLayer]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.__init__", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.__init__", "kind": "function", "doc": "\n", "signature": "(\ttopology: pauliopt.topologies.Topology,\tlayers: Sequence[pauliopt.phase.cx_circuits.CXCircuitLayer] = (),\toutput_mapping: Sequence[int] = None)"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.topology", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nconstraining this CX circuit.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.num_gates", "kind": "variable", "doc": "Readonly property returning the total number of gates in this\nCX circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.parity_matrix", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.parity_matrix", "kind": "function", "doc": "Generates the parity matrix representing this CX circuit.
\n\nArgs:\n parities_as_columns (bool, optional): Boolean determining whether the\n parity matrix should be represented with parities as columns in the matrix.\n Defaults to False, meaning that the parities are rows in the matrix.
\n\nReturns:\n numpy.NDArray containing 1s and 0s.
\n", "signature": "(\tself,\tparities_as_columns: bool = False) -> numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.dag", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.dag", "kind": "function", "doc": "Returns a copy of this CX circuit,\nwith the layers in reverse order.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.clone", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.clone", "kind": "function", "doc": "Returns a copy of this CX circuit.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.to_qiskit", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.to_qiskit", "kind": "function", "doc": "\n", "signature": "(\tself,\tmethod: Literal['permrowcol', 'naive'] = 'naive',\treallocate: bool = False,\tparities_as_columns: bool = False) -> Any:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.draw", "kind": "function", "doc": "Draws this CX circuit using NetworkX and Matplotlib.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
Generates a CXCircuit from a given parity matrix, constrained by the given topology
\n\nArgs:\n matrix (np.typing.NDArray): The parity matrix to be synthesized\n topology (Topology): The target device topology\n parities_as_columns (bool, optional): Whether the parities in the matrix are column-wise or row-wise. Defaults to False, i.e. row-wise.\n reallocate (bool, optional): Whether the qubits can be reallocated to different registers, i.e. synthesis up to permutation. Defaults to False.\n method (Literal[\"permrowcol\"], optional): Which synthesis method should be used. Currently only permrowcol is available.
\n\nReturns:\n CXCircuit: Synthesized circuit
\n", "signature": "(\tmatrix: numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]],\ttopology: pauliopt.topologies.Topology,\tparities_as_columns: bool = False,\treallocate: bool = False,\tmethod: Literal['permrowcol'] = 'permrowcol') -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView", "kind": "class", "doc": "Readonly view on a CX circuit layer.
\n"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.__init__", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.__init__", "kind": "function", "doc": "\n", "signature": "(layer: pauliopt.phase.cx_circuits.CXCircuitLayer)"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.topology", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nconstraining this CX circuit layer.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.gates", "kind": "variable", "doc": "Readonly property returning the collection of gates in this\nCX circuit layer.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.num_gates", "kind": "variable", "doc": "Readonly property returning the number of gates in this\nCX circuit layer.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.flippable_cxs", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.flippable_cxs", "kind": "variable", "doc": "Readonly property returning the collection of CX gates that\nthat can be currently flipped in this layer, namely:
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.incident", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.incident", "kind": "function", "doc": "Returns the CX gate incident to the given qubit in this layer,\nor None
if there is no gate incident to the qubit.
Checks whether the given CX gate is in the layer:
\n", "signature": "(self, ctrl: int, trgt: int) -> bool:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.is_cx_flippable", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.is_cx_flippable", "kind": "function", "doc": "Checks whether the given CX gate can be flipped in this layer.\nThis is true if:
\n\nReturns a copy of this CX layer.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuitLayer:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.draw", "kind": "function", "doc": "Draws this CX circuit layer using NetworkX and Matplotlib.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
Readonly view on a CX circuit.
\n", "bases": "typing.Sequence[pauliopt.phase.cx_circuits.CXCircuitLayerView]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.__init__", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.__init__", "kind": "function", "doc": "\n", "signature": "(circuit: pauliopt.phase.cx_circuits.CXCircuit)"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.topology", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nconstraining this CX circuit.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.num_gates", "kind": "variable", "doc": "Readonly property returning the number of gates in this\nCX circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.dag", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.dag", "kind": "function", "doc": "Returns a copy of this CX circuit,\nwith the layers in reverse order.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.clone", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.clone", "kind": "function", "doc": "Returns a copy of this CX circuit.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.draw", "kind": "function", "doc": "Draws this CX circuit using NetworkX and Matplotlib.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
This module contains code to optimize circuits of mixed ZX phase gadgets\nusing topologically-aware circuits of CNOTs.
\n"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingCostLogger", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingCostLogger", "kind": "class", "doc": "Protocol for logger of initial/final cost in annealing.
\n", "bases": "typing.Protocol"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingCostLogger.__init__", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingCostLogger.__init__", "kind": "function", "doc": "\n", "signature": "(*args, **kwargs)"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingIterLogger", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingIterLogger", "kind": "class", "doc": "Protocol for logging of iteration info in annealing.
\n", "bases": "typing.Protocol"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingIterLogger.__init__", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingIterLogger.__init__", "kind": "function", "doc": "\n", "signature": "(*args, **kwargs)"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers", "kind": "class", "doc": "Typed dictionary of loggers for annealing.
\n", "bases": "typing.TypedDict"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers.log_start", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers.log_start", "kind": "variable", "doc": "\n", "annotation": ": pauliopt.phase.optimized_circuits.AnnealingCostLogger"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers.log_iter", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers.log_iter", "kind": "variable", "doc": "\n", "annotation": ": pauliopt.phase.optimized_circuits.AnnealingIterLogger"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers.log_end", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers.log_end", "kind": "variable", "doc": "\n", "annotation": ": pauliopt.phase.optimized_circuits.AnnealingCostLogger"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit", "kind": "class", "doc": "Container for a phase circuit to be progressively optimized.\nThe original phase circuit is passed to the constructor, together\nwith a qubit topology and a fixed number of layers constraining the\nCX circuit to be used for simplification.
\n\nTo understand the structure of the optimized phase circuit,\nconsider the following code snippet:
\n\n opt_circ = PhaseCircuitCXBlockOptimizer(orig_circ, topology, num_cx_layers)\n # perform optimization using the methods of `opt_circ`\n phase_block = opt_circ.phase_block\n cx_block = opt_circ.cx_block\n
\nThe optimized circuit is obtained by composing three blocks:
\n\ncx_block.dag()
\n(the same CX gates of cx_block
, but in reverse order);phase_block
;cx_block
.An optional keyword argument circuit_rep
(default: 1) can be passed to the\nconstructor to indicate that the original circuit is to be repeated a certain\nnumber of times (default: 1). In the optimized circuit, this is achieved by\nrepeating the phase_block
part (at point 2. above) a number of times\ngiven by the circuit_rep
argument.\nThe first and last CX blocks are left unaltered (because the intermediate CX\nblocks would cancel each other out in pairs when repeating the optimized circuit).
Readonly property exposing the topology constraining the circuit optimization.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.num_qubits", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.num_qubits", "kind": "variable", "doc": "Readonly property exposing the number of qubits spanned by the circuit to be optimized.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.circuit_rep", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.circuit_rep", "kind": "variable", "doc": "Readonly property exposing the number of times that the original circuit is\nto be repeated, for use when computing CX counts.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.phase_block", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.phase_block", "kind": "variable", "doc": "Readonly property exposing a readonly view on the phase block of the optimized circuit.
\n", "annotation": ": pauliopt.phase.phase_circuits.PhaseCircuitView"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.cx_block", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.cx_block", "kind": "variable", "doc": "Readonly property exposing a readonly view on the CX block of the optimized circuit.
\n", "annotation": ": pauliopt.phase.cx_circuits.CXCircuitView"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.init_cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.init_cx_count", "kind": "variable", "doc": "Readonly property exposing the CX count for the original circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.cx_count", "kind": "variable", "doc": "Readonly property exposing the current CX count for the optimized circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.init_cx_blocks_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.init_cx_blocks_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for the two conjugating\nCX blocks at the time the circuit was instantiated.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.cx_blocks_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.cx_blocks_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for the conjugating\nCX blocks in the currently optimized circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.init_phase_block_cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.init_phase_block_cx_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for a single\nphase block at the time the circuit was instantiated.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.phase_block_cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.phase_block_cx_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for a single\nphase block in the currently optimized circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.clone", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.clone", "kind": "function", "doc": "Returns a copy of this optimized phase circuit.
\n", "signature": "(\tself,\trng_seed: Optional[int] = None) -> pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.to_qiskit", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.to_qiskit", "kind": "function", "doc": "Returns the optimized circuit as a Qiskit circuit.
\n\nThis method relies on the qiskit
library being available.\nSpecifically, the circuit
argument must be of type\nqiskit.providers.BaseBackend
.
Simplifies the phase block according to the commutation and fusion\nrules for phase gadgets.
\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.anneal", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.anneal", "kind": "function", "doc": "Performs a cycle of simulated annealing optimization,\nusing the given number of iterations, temperature schedule,\ninitial/final temperatures.
\n\nThe circuit is modified in-place and then returned, as per the\nfluent API pattern.
\n", "signature": "(\tself,\tnum_iters: int,\t*,\tschedule: Union[Tuple[Literal['linear', 'geometric', 'reciprocal', 'log'], Union[int, float], Union[int, float]], pauliopt.utils.TempSchedule] = ('linear', 1.0, 0.1),\tloggers: pauliopt.phase.optimized_circuits.AnnealingLoggers = {}):", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.random_flip_cx", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.random_flip_cx", "kind": "function", "doc": "Randomly flips a CX gate in the CX circuit used for the optimization,\nupdating both the CX circuit and the circuit being optimized.
\n\nReturns the layer index and gate (pair of control and target) that were\nflipped (e.g. in case the flip needs to be subsequently undone).
\n", "signature": "(self) -> Tuple[int, Tuple[int, int]]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.is_cx_flippable", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.is_cx_flippable", "kind": "function", "doc": "Checks whether the given CX gate can be flipped in the given layer.
\n", "signature": "(self, layer_idx: int, ctrl: int, trgt: int) -> bool:", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.flip_cx", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.flip_cx", "kind": "function", "doc": "Performs the actions needed to flip the given CX gate in the given layer\nof the CX circuit used for the optimization:
\n\nReturns an SVG representation of this optimized circuit, using\nthe ZX calculus to express phase gadgets and CX gates.
\n\nThe keyword arguments zcolor
and xcolor
can be used to\nspecify a colour for the Z and X basis spiders in the circuit.\nThe keyword arguments hscale
and vscale
can be used to\nscale the circuit representation horizontally and vertically.\nThe keyword argument scale
can be used to scale the circuit\nrepresentation isotropically.\nThe keyword argument svg_code_only
(default False
) can be used\nto specify that the SVG code itself be returned, rather than the\nIPython SVG
object.
This module contains code to create circuits of mixed ZX phase gadgets.
\n"}, {"fullname": "pauliopt.phase.phase_circuits.synthesis_methods", "modulename": "pauliopt.phase.phase_circuits", "qualname": "synthesis_methods", "kind": "variable", "doc": "\n", "default_value": "['naive', 'paritysynth', 'steiner-graysynth']"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget", "kind": "class", "doc": "Immutable container class for a phase gadget.
\n"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.__init__", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.__init__", "kind": "function", "doc": "\n", "signature": "(\tbasis: Literal['Z', 'X'],\tangle: pauliopt.utils.AngleExpr,\tqubits: Collection[int])"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.basis", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.basis", "kind": "variable", "doc": "Readonly property exposing the basis for this phase gadget.
\n", "annotation": ": Literal['Z', 'X']"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.angle", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.angle", "kind": "variable", "doc": "Readonly property exposing the angle for this phase gadget.
\n", "annotation": ": pauliopt.utils.AngleExpr"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.qubits", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.qubits", "kind": "variable", "doc": "Readonly property exposing the qubits spanned by this phase gadget.
\n", "annotation": ": FrozenSet[int]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.cx_count", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.cx_count", "kind": "function", "doc": "Returns the CX count for an implementation of this phase gadget\non the given topology based on minimum spanning trees (MST).
\n\nThe optional mapping
keyword argument can be used to specify a mapping of\nlogical (circuit) qubits to phyisical (topology) qubits.
Applies this phase gadget to a given qiskit quantum circuit
,\nusing the given topology
to determine a minimum spanning\ntree implementation of the gadget.
This method relies on the qiskit
library being available.\nSpecifically, the circuit
argument must be of type\nqiskit.providers.BaseBackend
.
Prints information about an implementation of this phase gadget\non the given topology based on minimum spanning trees (MST).
\n", "signature": "(self, topology: pauliopt.topologies.Topology) -> None:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.Z", "modulename": "pauliopt.phase.phase_circuits", "qualname": "Z", "kind": "class", "doc": "Constructs a Z phase gadget with the idiomatic syntax:
\n\n Z(angle) @ qubits\n
\nConstructs an X phase gadget with the idiomatic syntax:
\n\n X(angle) @ qubits\n
\nContainer class for a circuit of mixed ZX phase gadgets.
\n", "bases": "typing.Sequence[pauliopt.phase.phase_circuits.PhaseGadget]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.__init__", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.__init__", "kind": "function", "doc": "\n", "signature": "(\tnum_qubits: int,\tgadgets: Sequence[pauliopt.phase.phase_circuits.PhaseGadget] = ())"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.num_qubits", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.num_qubits", "kind": "variable", "doc": "Readonly property exposing the number of qubits spanned by this phase circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.num_gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.num_gadgets", "kind": "variable", "doc": "Readonly property exposing the number of phase gadgets in the circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.gadgets", "kind": "variable", "doc": "Readonly property returning the sequence of phase gadgets in this\nphase circuit, in order from first to last.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": Sequence[pauliopt.phase.phase_circuits.PhaseGadget]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.as_readonly", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.as_readonly", "kind": "variable", "doc": "Returns a readonly view on this circuit.
\n", "annotation": ": pauliopt.phase.phase_circuits.PhaseCircuitView"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.set_angles", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.set_angles", "kind": "function", "doc": "Sets all angles for this circuit.
\n", "signature": "(self, angles: Sequence[pauliopt.utils.AngleExpr]) -> None:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.refresh_angle_vars", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.refresh_angle_vars", "kind": "function", "doc": "\n", "signature": "(\tself,\tparams: Union[str, Callable[[int], pauliopt.utils.AngleVar]]) -> None:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.rx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.rx", "kind": "function", "doc": "Phase gadget implementation of single-qubit X rotation.
\n", "signature": "(\tself,\tqubit: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.rz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.rz", "kind": "function", "doc": "Phase gadget implementation of single-qubit Z rotation.
\n", "signature": "(\tself,\tqubit: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ry", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ry", "kind": "function", "doc": "Phase gadget implementation of single-qubit Y rotation.
\n", "signature": "(\tself,\tqubit: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.i", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.i", "kind": "function", "doc": "Phase gadget implementation of single-qubit I gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.x", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.x", "kind": "function", "doc": "Phase gadget implementation of single-qubit X gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.z", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.z", "kind": "function", "doc": "Phase gadget implementation of single-qubit X gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.y", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.y", "kind": "function", "doc": "Phase gadget implementation of single-qubit Y gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.s", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.s", "kind": "function", "doc": "Phase gadget implementation of single-qubit S gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.sdg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.sdg", "kind": "function", "doc": "Phase gadget implementation of single-qubit Sdg gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.v", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.v", "kind": "function", "doc": "Phase gadget implementation of single-qubit S gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.vdg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.vdg", "kind": "function", "doc": "Phase gadget implementation of single-qubit Sdg gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.t", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.t", "kind": "function", "doc": "Phase gadget implementation of single-qubit T gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.h", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.h", "kind": "function", "doc": "Phase gadget implementation of single-qubit Hadamard gate.
\n", "signature": "(\tself,\tqubit: int,\tbasis: Literal['Z', 'X'] = 'Z',\tsign: Literal[1, -1] = 1) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cu1", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cu1", "kind": "function", "doc": "Phase gadget implementation of CU1 gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.crz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.crz", "kind": "function", "doc": "Phase gadget implementation of CRZ gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cry", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cry", "kind": "function", "doc": "Phase gadget implementation of CRY gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.crx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.crx", "kind": "function", "doc": "Phase gadget implementation of CRX gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.Angle) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cz", "kind": "function", "doc": "Phase gadget implementation of CZ gate.
\n", "signature": "(self, leg1: int, leg2: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cy", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cy", "kind": "function", "doc": "Phase gadget implementation of CY gate.
\n", "signature": "(self, leg1: int, leg2: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cx", "kind": "function", "doc": "Phase gadget implementation of CX gate.
\n", "signature": "(self, ctrl: int, tgt: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.u3", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.u3", "kind": "function", "doc": "Phase gadget implementation of U3 gate.
\n", "signature": "(\tself,\tqubit: int,\ttheta: pauliopt.utils.AngleExpr,\tphi: pauliopt.utils.AngleExpr,\tlam: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ccz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ccz", "kind": "function", "doc": "Phase gadget implementation of CCZ gate.
\n", "signature": "(\tself,\tleg1: int,\tleg2: int,\tleg3: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ccy", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ccy", "kind": "function", "doc": "Phase gadget implementation of CCX gate.
\n", "signature": "(\tself,\tleg1: int,\tleg2: int,\tleg3: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ccx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ccx", "kind": "function", "doc": "Phase gadget implementation of CCX gate.
\n", "signature": "(\tself,\tleg1: int,\tleg2: int,\tleg3: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.add_gadget", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.add_gadget", "kind": "function", "doc": "Adds a phase gadget to the circuit.\nThis is rather less efficient than passing the gadgets in the constructor,\nbecause the internal numpy arrays have to be copied in the process.
\n\nThe circuit is modified in-place and then returned, as per the\nfluent interface pattern.
\n", "signature": "(\tself,\tgadget: pauliopt.phase.phase_circuits.PhaseGadget) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.copy", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.copy", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cx_count", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cx_count", "kind": "function", "doc": "Returns the CX count for an implementation of this phase gadget\n on the given topology based on minimum spanning trees (MST).
\n\nThe optional `mapping` keyword argument can be used to specify a mapping of\nlogical (circuit) qubits to phyisical (topology) qubits.\n
\n\nArgs:\n topology (Topology): Target device topology\n mapping (Optional[Union[Sequence[int], Dict[int, int]]], optional): Used qubit mapping. Defaults to None.\n method (Literal[\"naive\", \"paritysynth\", \"steiner\", optional): Synthesis method. Defaults to \"naive\".
\n\nRaises:\n TypeError: If topology is not a Topology and if mapping is not a permutation of range(self.num_qubits).
\n\nReturns:\n int: The CX count.
\n", "signature": "(\tself,\ttopology: pauliopt.topologies.Topology,\t*,\tmapping: Union[Sequence[int], Dict[int, int], NoneType] = None,\tmethod: Literal['naive', 'paritysynth', 'steiner-graysynth'] = 'naive') -> int:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.mapped", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.mapped", "kind": "function", "doc": "Returns a new phase circuit with the same gadgets but having\nqubits remapped according to the given mapping.
\n", "signature": "(\tself,\tmapping: Union[Sequence[int], Mapping[int, int]]) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.color_flip", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.color_flip", "kind": "function", "doc": "Returns a new phase circuit with the same gadgets but having\nall basis switched from Z to X and vice versa.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.dagger", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.dagger", "kind": "function", "doc": "Returns a new phase circuit with the same gadgets but having\nall angles negated.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.normalize", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.normalize", "kind": "function", "doc": "Fuse and reorder gadgets of the same basis.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.to_qiskit", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.to_qiskit", "kind": "function", "doc": "Generates a qiskit QuantumCircuit equivalent to this PhaseCircuit.
\n\nArgs:\n topology (Topology): Target device topology\n simplified (bool, optional): Simplifiy the PhaseCircuit before synthesis. Defaults to True.\n method (Literal[\"naive\", \"paritysynth\", \"steiner\", optional): Which method of synthesis should be used. Defaults to \"naive\".\n cx_synth (Literal[\"permrowcol\", \"naive\"], optional): Which method should be used for synthesizing the final CXCircuit. Defaults to \"naive\".\n return_cx (bool, optional): Whether to return the final CXCircuit separately without synthesizing it. Defaults to False.\n reallocate (bool, optional): Whether qubit reallocation is allowed when synthesizing the final CXCircuit. Defaults to False.
\n\nRaises:\n ModuleNotFoundError: Requires Qiskit to be installed
\n\nReturns:\n qiskit.QuantumCircuit: The synthesized equivalent circuit\n CXCircuit (optional): The final CNOTs of the circuit not yet concatinated to the qiskit circuit.
\n", "signature": "(\tself,\ttopology: pauliopt.topologies.Topology,\tsimplified: bool = True,\tmethod: Literal['naive', 'paritysynth', 'steiner-graysynth'] = 'naive',\tcx_synth: Literal['permrowcol', 'naive'] = 'naive',\treturn_cx: bool = False,\treallocate: bool = False) -> Any:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.to_svg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.to_svg", "kind": "function", "doc": "Returns an SVG representation of this circuit, using\nthe ZX calculus to express phase gadgets.
\n\nThe keyword arguments zcolor
and xcolor
can be used to\nspecify a colour for the Z and X basis spiders in the circuit.\nThe keyword arguments hscale
and vscale
can be used to\nscale the circuit representation horizontally and vertically.\nThe keyword argument scale
can be used to scale the circuit\nrepresentation isotropically.\nThe keyword argument svg_code_only
(default False
) can be used\nto specify that the SVG code itself be returned, rather than the\nIPython SVG
object.
Produces an exact copy of this phase circuit.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.conj_by_cx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.conj_by_cx", "kind": "function", "doc": "Conjugates this circuit by a CX gate with given control/target.\nThe circuit is modified in-place and then returned, as per the\nfluent interface pattern.
\n", "signature": "(self, ctrl: int, trgt: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.simplified", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.simplified", "kind": "function", "doc": "Returns a new phase circuit which has been simplified using the\ncommutation and fusion rules for gadgets.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.random", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.random", "kind": "function", "doc": "Generates a random circuit of mixed ZX phase gadgets on the given number of qubits,\nwith the given number of gadgets.
\n\nThe optional argument angle_subdivision
(default: 4) can be used to specify the\ndenominator in the random fractional multiples of pi used as values for the angles.
The optional arguments min_legs
(default: 1, minimum: 1) and max_legs
\n(default: None
, minimum min_legs
) can be used to specify the minimum and maximum\nnumber of legs for the phase gadgets. If None
, max_legs
is set to len(qubits)
.
The optional argument rng_seed
(default: None
) is used as seed for the RNG.
Constructs a phase circuit from a QASM program.
\n\nAn optional mapping from QASM qubits to circuit qubits can be supplied.
\n", "signature": "(\tqasm: Union[str, pauliopt.qasm.QASM],\t*,\tmapping: Union[Sequence[int], Mapping[int, int], NoneType] = None,\tallow_classical: bool = True) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView", "kind": "class", "doc": "Readonly view on a phase circuit.
\n"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.__init__", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.__init__", "kind": "function", "doc": "\n", "signature": "(circuit: pauliopt.phase.phase_circuits.PhaseCircuit)"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.num_qubits", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.num_qubits", "kind": "variable", "doc": "Readonly property exposing the number of qubits spanned by the phase circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.num_gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.num_gadgets", "kind": "variable", "doc": "Readonly property exposing the number of phase gadgets in the circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.gadgets", "kind": "variable", "doc": "Readonly property returning the sequence of phase gadgets in the\nphase circuit, in order from first to last.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": Sequence[pauliopt.phase.phase_circuits.PhaseGadget]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.to_svg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.to_svg", "kind": "function", "doc": "Returns an SVG representation of this circuit, using\nthe ZX calculus to express phase gadgets.
\n\nThe keyword arguments zcolor
and xcolor
can be used to\nspecify a colour for the Z and X basis spiders in the circuit.\nThe keyword arguments hscale
and vscale
can be used to\nscale the circuit representation horizontally and vertically.\nThe keyword argument svg_code_only
(default False
) can be used\nto specify that the SVG code itself be returned, rather than the\nIPython SVG
object.
Produces an exact copy of the phase circuit.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.qasm", "modulename": "pauliopt.qasm", "kind": "module", "doc": "QASM file parsing
\n"}, {"fullname": "pauliopt.qasm.assert_same_size_targets", "modulename": "pauliopt.qasm", "qualname": "assert_same_size_targets", "kind": "function", "doc": "Asserts that all register targets have the same size.
\n", "signature": "(*trgts: pauliopt.qasm.QASM.RegTarget):", "funcdef": "def"}, {"fullname": "pauliopt.qasm.QASM", "modulename": "pauliopt.qasm", "qualname": "QASM", "kind": "class", "doc": "QASM program.\nBased on the QASM spec from arXiv: 1707.03429
\n", "bases": "typing.Sequence[ForwardRef('QASM.Statement')]"}, {"fullname": "pauliopt.qasm.QASM.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.__init__", "kind": "function", "doc": "\n", "signature": "(*statements: pauliopt.qasm.QASM.Statement)"}, {"fullname": "pauliopt.qasm.QASM.num_qubits", "modulename": "pauliopt.qasm", "qualname": "QASM.num_qubits", "kind": "variable", "doc": "Number of qubits in this circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.qasm.QASM.num_bits", "modulename": "pauliopt.qasm", "qualname": "QASM.num_bits", "kind": "variable", "doc": "Number of bits in this circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.qasm.QASM.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.registers", "kind": "variable", "doc": "Iterator over the registers of this QASM program.
\n", "annotation": ": Iterator[Union[pauliopt.qasm.QASM.QReg, pauliopt.qasm.QASM.CReg]]"}, {"fullname": "pauliopt.qasm.QASM.Statement", "modulename": "pauliopt.qasm", "qualname": "QASM.Statement", "kind": "class", "doc": "QASM statement.
\n"}, {"fullname": "pauliopt.qasm.QASM.Statement.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Statement.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Statement.parse", "modulename": "pauliopt.qasm", "qualname": "QASM.Statement.parse", "kind": "function", "doc": "Attempts to parse a QASM statement from a line of code.
\n", "signature": "(line: str) -> pauliopt.qasm.QASM.Statement:", "funcdef": "def"}, {"fullname": "pauliopt.qasm.QASM.Version", "modulename": "pauliopt.qasm", "qualname": "QASM.Version", "kind": "class", "doc": "QASM version statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Version.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Version.__init__", "kind": "function", "doc": "\n", "signature": "(version: str)"}, {"fullname": "pauliopt.qasm.QASM.Version.version", "modulename": "pauliopt.qasm", "qualname": "QASM.Version.version", "kind": "variable", "doc": "QASM version.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.Reg", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg", "kind": "class", "doc": "Register.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Reg.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.__init__", "kind": "function", "doc": "\n", "signature": "(name: str, size: int)"}, {"fullname": "pauliopt.qasm.QASM.Reg.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Reg.name", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.name", "kind": "variable", "doc": "Register name.
\n"}, {"fullname": "pauliopt.qasm.QASM.Reg.size", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.size", "kind": "variable", "doc": "Register size.
\n"}, {"fullname": "pauliopt.qasm.QASM.QReg", "modulename": "pauliopt.qasm", "qualname": "QASM.QReg", "kind": "class", "doc": "Quantum register.
\n", "bases": "QASM.Reg"}, {"fullname": "pauliopt.qasm.QASM.QReg.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.QReg.__init__", "kind": "function", "doc": "\n", "signature": "(name: str, size: int)"}, {"fullname": "pauliopt.qasm.QASM.CReg", "modulename": "pauliopt.qasm", "qualname": "QASM.CReg", "kind": "class", "doc": "Classical register.
\n", "bases": "QASM.Reg"}, {"fullname": "pauliopt.qasm.QASM.CReg.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.CReg.__init__", "kind": "function", "doc": "\n", "signature": "(name: str, size: int)"}, {"fullname": "pauliopt.qasm.QASM.Include", "modulename": "pauliopt.qasm", "qualname": "QASM.Include", "kind": "class", "doc": "QASM include statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Include.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Include.__init__", "kind": "function", "doc": "\n", "signature": "(filename: str)"}, {"fullname": "pauliopt.qasm.QASM.Include.filename", "modulename": "pauliopt.qasm", "qualname": "QASM.Include.filename", "kind": "variable", "doc": "Filename.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.Comment", "modulename": "pauliopt.qasm", "qualname": "QASM.Comment", "kind": "class", "doc": "QASM comment statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Comment.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Comment.__init__", "kind": "function", "doc": "\n", "signature": "(text: str)"}, {"fullname": "pauliopt.qasm.QASM.Comment.text", "modulename": "pauliopt.qasm", "qualname": "QASM.Comment.text", "kind": "variable", "doc": "Comment text.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.RegTarget", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget", "kind": "class", "doc": "A qreg or creg target.
\n"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.__init__", "kind": "function", "doc": "\n", "signature": "(\tregister: Union[pauliopt.qasm.QASM.QReg, pauliopt.qasm.QASM.CReg],\tpos: Optional[int] = None)"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.register", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.register", "kind": "variable", "doc": "Register.
\n", "annotation": ": Union[pauliopt.qasm.QASM.QReg, pauliopt.qasm.QASM.CReg]"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.pos", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.pos", "kind": "variable", "doc": "Optional register position.
\n", "annotation": ": Optional[int]"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.size", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.size", "kind": "variable", "doc": "Size of this target
\n"}, {"fullname": "pauliopt.qasm.QASM.QRegTarget", "modulename": "pauliopt.qasm", "qualname": "QASM.QRegTarget", "kind": "class", "doc": "A qreg target.
\n", "bases": "QASM.RegTarget"}, {"fullname": "pauliopt.qasm.QASM.QRegTarget.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.QRegTarget.__init__", "kind": "function", "doc": "\n", "signature": "(register: pauliopt.qasm.QASM.QReg, pos: Optional[int] = None)"}, {"fullname": "pauliopt.qasm.QASM.QRegTarget.register", "modulename": "pauliopt.qasm", "qualname": "QASM.QRegTarget.register", "kind": "variable", "doc": "Register.
\n", "annotation": ": pauliopt.qasm.QASM.QReg"}, {"fullname": "pauliopt.qasm.QASM.CRegTarget", "modulename": "pauliopt.qasm", "qualname": "QASM.CRegTarget", "kind": "class", "doc": "A creg target.
\n", "bases": "QASM.RegTarget"}, {"fullname": "pauliopt.qasm.QASM.CRegTarget.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.CRegTarget.__init__", "kind": "function", "doc": "\n", "signature": "(register: pauliopt.qasm.QASM.CReg, pos: Optional[int] = None)"}, {"fullname": "pauliopt.qasm.QASM.CRegTarget.register", "modulename": "pauliopt.qasm", "qualname": "QASM.CRegTarget.register", "kind": "variable", "doc": "Register.
\n", "annotation": ": pauliopt.qasm.QASM.CReg"}, {"fullname": "pauliopt.qasm.QASM.UGate", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate", "kind": "class", "doc": "Statement for a U3 gate.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.UGate.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.__init__", "kind": "function", "doc": "\n", "signature": "(\ttheta: pauliopt.utils.Angle,\tphi: pauliopt.utils.Angle,\tlam: pauliopt.utils.Angle,\tqubit: pauliopt.qasm.QASM.QRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.UGate.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.UGate.theta", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.theta", "kind": "variable", "doc": "Theta angle for the U3 gate.
\n", "annotation": ": pauliopt.utils.Angle"}, {"fullname": "pauliopt.qasm.QASM.UGate.phi", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.phi", "kind": "variable", "doc": "Phi angle for the U3 gate.
\n", "annotation": ": pauliopt.utils.Angle"}, {"fullname": "pauliopt.qasm.QASM.UGate.lam", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.lam", "kind": "variable", "doc": "Lambda angle for the U3 gate.
\n", "annotation": ": pauliopt.utils.Angle"}, {"fullname": "pauliopt.qasm.QASM.UGate.qubit", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.qubit", "kind": "variable", "doc": "Qubit/qreg for the U3 gate.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.CXGate", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate", "kind": "class", "doc": "Statement for a CX gate.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.CXGate.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.__init__", "kind": "function", "doc": "\n", "signature": "(\tcontrol: pauliopt.qasm.QASM.QRegTarget,\ttarget: pauliopt.qasm.QASM.QRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.CXGate.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.CXGate.control", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.control", "kind": "variable", "doc": "Control qubit/qreg for the CX gate.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.CXGate.target", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.target", "kind": "variable", "doc": "Target qubit/qreg for the CX gate.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Measure", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure", "kind": "class", "doc": "Statement for a measurement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Measure.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.__init__", "kind": "function", "doc": "\n", "signature": "(\tqubit: pauliopt.qasm.QASM.QRegTarget,\tbit: pauliopt.qasm.QASM.CRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.Measure.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Measure.qubit", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.qubit", "kind": "variable", "doc": "Qubit/qreg to be measured.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Measure.bit", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.bit", "kind": "variable", "doc": "Bit/creg to store measurement outcome.
\n", "annotation": ": pauliopt.qasm.QASM.CRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Reset", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset", "kind": "class", "doc": "Statement for a reset.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Reset.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset.__init__", "kind": "function", "doc": "\n", "signature": "(qubit: pauliopt.qasm.QASM.QRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.Reset.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Reset.qubit", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset.qubit", "kind": "variable", "doc": "Qubit/qreg to be measured.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Gate", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate", "kind": "class", "doc": "Statement for a named gate.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Gate.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.__init__", "kind": "function", "doc": "\n", "signature": "(\tname: str,\ttargets: Sequence[pauliopt.qasm.QASM.RegTarget],\tparams: Sequence[pauliopt.utils.Angle] = ())"}, {"fullname": "pauliopt.qasm.QASM.Gate.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Gate.name", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.name", "kind": "variable", "doc": "Name for this gate.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.Gate.params", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.params", "kind": "variable", "doc": "Tuple of angle parameters for this gate.
\n", "annotation": ": Tuple[pauliopt.utils.Angle, ...]"}, {"fullname": "pauliopt.qasm.QASM.Gate.targets", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.targets", "kind": "variable", "doc": "Tuple of register targets for this gate.
\n", "annotation": ": Tuple[pauliopt.qasm.QASM.RegTarget, ...]"}, {"fullname": "pauliopt.qasm.QASM.Barrier", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier", "kind": "class", "doc": "Statement for a barrier.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Barrier.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier.__init__", "kind": "function", "doc": "\n", "signature": "(targets: Sequence[pauliopt.qasm.QASM.QRegTarget])"}, {"fullname": "pauliopt.qasm.QASM.Barrier.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Barrier.targets", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier.targets", "kind": "variable", "doc": "Tuple of register targets for this barrier.
\n", "annotation": ": Tuple[pauliopt.qasm.QASM.RegTarget, ...]"}, {"fullname": "pauliopt.qasm.QASM.Conditional", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional", "kind": "class", "doc": "Statement for a conditional statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Conditional.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.__init__", "kind": "function", "doc": "\n", "signature": "(\tregister: pauliopt.qasm.QASM.CReg,\tvalue: int,\tstatement: pauliopt.qasm.QASM.Statement)"}, {"fullname": "pauliopt.qasm.QASM.Conditional.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Conditional.register", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.register", "kind": "variable", "doc": "The register being tested in this conditional statement.
\n", "annotation": ": pauliopt.qasm.QASM.CReg"}, {"fullname": "pauliopt.qasm.QASM.Conditional.value", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.value", "kind": "variable", "doc": "The register value being tested in this conditional statement.
\n", "annotation": ": int"}, {"fullname": "pauliopt.qasm.QASM.Conditional.statement", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.statement", "kind": "variable", "doc": "The statement to execute if the given creg has the given value.
\n", "annotation": ": pauliopt.qasm.QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.parse", "modulename": "pauliopt.qasm", "qualname": "QASM.parse", "kind": "function", "doc": "Parses a QASM program into a QASM
object.
This module contains utility code to deal with qubit topologies.
\n"}, {"fullname": "pauliopt.topologies.Coupling", "modulename": "pauliopt.topologies", "qualname": "Coupling", "kind": "class", "doc": "Type for couplings in a qubit topology, i.e. unordered\npairs of adjacent qubits.
\n", "bases": "typing.FrozenSet[int]"}, {"fullname": "pauliopt.topologies.Coupling.as_pair", "modulename": "pauliopt.topologies", "qualname": "Coupling.as_pair", "kind": "variable", "doc": "Returns the coupling as a (increasingly) ordered pair.
\n", "annotation": ": Tuple[int, int]"}, {"fullname": "pauliopt.topologies.CouplingLike", "modulename": "pauliopt.topologies", "qualname": "CouplingLike", "kind": "variable", "doc": "Type alias for things that could be used to specify couplings,\nnamely any collection of int
(subject to additional restrictions).
In an ideal world, this should be \"int collections of len 2\",\nbut static typing does not yet allow for such a constraint.
\n", "default_value": "typing.Collection[int]"}, {"fullname": "pauliopt.topologies.TopologyDict", "modulename": "pauliopt.topologies", "qualname": "TopologyDict", "kind": "class", "doc": "The type of the dictionary returned by Topology.as_dict
,\nsuitable for JSON serialization.
Property exposing the number of qubits in the topology.
\n", "annotation": ": int"}, {"fullname": "pauliopt.topologies.TopologyDict.couplings", "modulename": "pauliopt.topologies", "qualname": "TopologyDict.couplings", "kind": "variable", "doc": "Property exposing the couplings between qubits in the topology.
\n", "annotation": ": List[List[int]]"}, {"fullname": "pauliopt.topologies.Layouts", "modulename": "pauliopt.topologies", "qualname": "Layouts", "kind": "variable", "doc": "Possible layout values for Topology.draw
Container class for a qubit topology.
\n"}, {"fullname": "pauliopt.topologies.Topology.__init__", "modulename": "pauliopt.topologies", "qualname": "Topology.__init__", "kind": "function", "doc": "\n", "signature": "(num_qubits: int, couplings: Collection[Collection[int]])"}, {"fullname": "pauliopt.topologies.Topology.num_qubits", "modulename": "pauliopt.topologies", "qualname": "Topology.num_qubits", "kind": "variable", "doc": "Readonly property returning the number of qubits in this topology.
\n", "annotation": ": int"}, {"fullname": "pauliopt.topologies.Topology.qubits", "modulename": "pauliopt.topologies", "qualname": "Topology.qubits", "kind": "variable", "doc": "Readonly property returning the range of qubits in this topology.
\n", "annotation": ": range"}, {"fullname": "pauliopt.topologies.Topology.couplings", "modulename": "pauliopt.topologies", "qualname": "Topology.couplings", "kind": "variable", "doc": "Readonly property exposing the couplings between qubits in this topology.
\n", "annotation": ": FrozenSet[pauliopt.topologies.Coupling]"}, {"fullname": "pauliopt.topologies.Topology.as_dict", "modulename": "pauliopt.topologies", "qualname": "Topology.as_dict", "kind": "variable", "doc": "Readonly property returning this topology as\na dictionary, for serialization purposes.
\n", "annotation": ": Union[str, pauliopt.topologies.TopologyDict]"}, {"fullname": "pauliopt.topologies.Topology.is_planar", "modulename": "pauliopt.topologies", "qualname": "Topology.is_planar", "kind": "variable", "doc": "Whether this qubit topology is a planar graph.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.topologies.Topology.available_nx_layouts", "modulename": "pauliopt.topologies", "qualname": "Topology.available_nx_layouts", "kind": "variable", "doc": "Readonly property returning the available layouts for this qubit topology.
\n", "annotation": ": Tuple[str, ...]"}, {"fullname": "pauliopt.topologies.Topology.to_nx", "modulename": "pauliopt.topologies", "qualname": "Topology.to_nx", "kind": "variable", "doc": "Readonly property returning a NetworkX graph version of this topology.\nRequires the 'networkx' library to work.
\n"}, {"fullname": "pauliopt.topologies.Topology.draw", "modulename": "pauliopt.topologies", "qualname": "Topology.draw", "kind": "function", "doc": "Draws this qubit topology using NetworkX and Matplotlib.
\n\nThe layout
keyword argument can be used to select a NetworkX layout\nfrom the available ones (exposed by Topology.available_nx_layouts
).\nThe figsize
keyword argument is passed to matplotlib.pyplot.figure
:\nif specified, it determines the width and height of the figure being drawn.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.\nIf the keyword argument filename
is set, the figure is also saved.
Readonly property exposing the (frozen) set of qubits adjacent\nto (i.e. couple with) the given qubit.
\n", "signature": "(self, qubit: int) -> FrozenSet[int]:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.incident", "modulename": "pauliopt.topologies", "qualname": "Topology.incident", "kind": "function", "doc": "Readonly property returning an iterator running over all couplings\nincident onto the given qubit.
\n\nThis is returned as an iterator, rather than a collection,\nbecause the couplings are generated on the fly (i.e. this is not\nmerely exposing some internal collection).
\n", "signature": "(self, qubit: int) -> Iterator[pauliopt.topologies.Coupling]:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.dist", "modulename": "pauliopt.topologies", "qualname": "Topology.dist", "kind": "function", "doc": "Returns the distance between two given qubits in the topology.
\n", "signature": "(self, fro: int, to: int) -> int:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.mapped_fwd", "modulename": "pauliopt.topologies", "qualname": "Topology.mapped_fwd", "kind": "function", "doc": "Returns a topology with the same couplings, but remapping the qubits using\nthe given mapping.
\n", "signature": "(\tself,\tmapping: Union[Sequence[int], Dict[int, int]]) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.shortest_path", "modulename": "pauliopt.topologies", "qualname": "Topology.shortest_path", "kind": "function", "doc": "Computes the shortest path using the next lookup table from the Floyd\u2013Warshall algorithm
\n", "signature": "(self, fro: int, to: int):", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.steiner_tree", "modulename": "pauliopt.topologies", "qualname": "Topology.steiner_tree", "kind": "function", "doc": "Computes the Steiner tree over the topology with given terminals.\nsubgraph
can be used to find the Steiner tree of a subgraph of the topology.\nRequires networkx to be installed to work.\nReturns a networkx Graph.
Returns a topology with the same couplings, but remapping the qubits using\nthe inverse of the given mapping.
\n", "signature": "(\tself,\tmapping: Union[Sequence[int], Dict[int, int]]) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.from_dict", "modulename": "pauliopt.topologies", "qualname": "Topology.from_dict", "kind": "function", "doc": "Creates a Topology
instance from a dictionary in the\nformat obtained from Topology.as_dict
,\nfor de-serialization purposes.
Creates a line topology on the given number of qubits.
\n", "signature": "(num_qubits: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.cycle", "modulename": "pauliopt.topologies", "qualname": "Topology.cycle", "kind": "function", "doc": "Creates a cycle topology on the given number of qubits.
\n", "signature": "(num_qubits: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.complete", "modulename": "pauliopt.topologies", "qualname": "Topology.complete", "kind": "function", "doc": "Creates a complete topology on the given number of qubits.
\n", "signature": "(num_qubits: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.grid", "modulename": "pauliopt.topologies", "qualname": "Topology.grid", "kind": "function", "doc": "Creates a grid topology with the given number of rows and cols.\nQubits are indexed by rows.
\n", "signature": "(num_rows: int, num_cols: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.periodic_grid", "modulename": "pauliopt.topologies", "qualname": "Topology.periodic_grid", "kind": "function", "doc": "Creates a periodic grid topology with the given number of rows and cols.\nQubits are indexed by rows.
\n", "signature": "(num_rows: int, num_cols: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.from_qiskit_config", "modulename": "pauliopt.topologies", "qualname": "Topology.from_qiskit_config", "kind": "function", "doc": "Static method to construct the topology from a\nQiskit backend configuration.
\n\nThis method relies on the qiskit
library being available.\nSpecifically, the config
argument must be of type\nqiskit.providers.models.QasmBackendConfiguration
.
Static method to construct the topology from a Qiskit backend.
\n\nThis method relies on the qiskit
library being available.\nSpecifically, the backend
argument must be of type\nqiskit.providers.Backend
.
Mutable container class for a matching on a qubit topology.
\n"}, {"fullname": "pauliopt.topologies.Matching.__init__", "modulename": "pauliopt.topologies", "qualname": "Matching.__init__", "kind": "function", "doc": "\n", "signature": "(topology: pauliopt.topologies.Topology)"}, {"fullname": "pauliopt.topologies.Matching.topology", "modulename": "pauliopt.topologies", "qualname": "Matching.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nunderlying this matching.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.topologies.Matching.matched_couplings", "modulename": "pauliopt.topologies", "qualname": "Matching.matched_couplings", "kind": "variable", "doc": "Readonly property returning the collection of couplings\ncurrently in this matching.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[pauliopt.topologies.Coupling]"}, {"fullname": "pauliopt.topologies.Matching.matched_qubits", "modulename": "pauliopt.topologies", "qualname": "Matching.matched_qubits", "kind": "variable", "doc": "Readonly property returning the collection of qubits\ncurrently matched in this matching.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[int]"}, {"fullname": "pauliopt.topologies.Matching.flippable_couplings", "modulename": "pauliopt.topologies", "qualname": "Matching.flippable_couplings", "kind": "variable", "doc": "Readonly property returning the collection of couplings\nthat can be currently flipped in this matching, namely:
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[pauliopt.topologies.Coupling]"}, {"fullname": "pauliopt.topologies.Matching.incident", "modulename": "pauliopt.topologies", "qualname": "Matching.incident", "kind": "function", "doc": "Returns the coupling incident to the given qubit in this matching,\nor None
if the qubit is not matched.
Checks whether the coupling can be flipped:
\n\nFlips the given coupling in the matching (removes it if it is already present,\nadds it if it is not yed present and can be added).\nRaises ValueError
if the coupling is not flippable.
The matching is modified in-place and then returned, as per the\nfluent API pattern.
\n", "signature": "(self, coupling: Collection[int]) -> pauliopt.topologies.Matching:", "funcdef": "def"}, {"fullname": "pauliopt.utils", "modulename": "pauliopt.utils", "kind": "module", "doc": "Utility classes and functions for the pauliopt
library.
A container class for angle expressions.
\n", "bases": "abc.ABC"}, {"fullname": "pauliopt.utils.AngleExpr.repr_latex", "modulename": "pauliopt.utils", "qualname": "AngleExpr.repr_latex", "kind": "variable", "doc": "LaTeX math mode representation of this number.
\n", "annotation": ": str"}, {"fullname": "pauliopt.utils.AngleExpr.to_qiskit", "modulename": "pauliopt.utils", "qualname": "AngleExpr.to_qiskit", "kind": "variable", "doc": "\n", "annotation": ": Any"}, {"fullname": "pauliopt.utils.AngleExpr.is_zero", "modulename": "pauliopt.utils", "qualname": "AngleExpr.is_zero", "kind": "variable", "doc": "\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.AngleExpr.is_pi", "modulename": "pauliopt.utils", "qualname": "AngleExpr.is_pi", "kind": "variable", "doc": "\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.AngleExpr.is_zero_or_pi", "modulename": "pauliopt.utils", "qualname": "AngleExpr.is_zero_or_pi", "kind": "variable", "doc": "\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle", "modulename": "pauliopt.utils", "qualname": "Angle", "kind": "class", "doc": "A container class for angles,\nas rational multiples of PI modulo 2PI.
\n", "bases": "AngleExpr"}, {"fullname": "pauliopt.utils.Angle.__init__", "modulename": "pauliopt.utils", "qualname": "Angle.__init__", "kind": "function", "doc": "\n", "signature": "(\ttheta: Union[pauliopt.utils.Angle, int, fractions.Fraction, str, decimal.Decimal])"}, {"fullname": "pauliopt.utils.Angle.value", "modulename": "pauliopt.utils", "qualname": "Angle.value", "kind": "variable", "doc": "The value of this angle as a fraction of PI.
\n", "annotation": ": fractions.Fraction"}, {"fullname": "pauliopt.utils.Angle.as_root_of_unity", "modulename": "pauliopt.utils", "qualname": "Angle.as_root_of_unity", "kind": "variable", "doc": "Returns (a,n)
where n
is the smallest such\nthat this angle is an $n$-th root of unity\nand 0 <= a < n
such that this is $e^{i 2\\pi \\frac{a}{n}}$
The order of this angle as a root of unity.
\n", "annotation": ": int"}, {"fullname": "pauliopt.utils.Angle.is_zero_or_pi", "modulename": "pauliopt.utils", "qualname": "Angle.is_zero_or_pi", "kind": "variable", "doc": "Whether this angle is a multiple of pi.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle.is_zero", "modulename": "pauliopt.utils", "qualname": "Angle.is_zero", "kind": "variable", "doc": "Whether this angle is a multiple of 2pi.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle.is_pi", "modulename": "pauliopt.utils", "qualname": "Angle.is_pi", "kind": "variable", "doc": "Whether this angle is an odd multiple of pi.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle.to_qiskit", "modulename": "pauliopt.utils", "qualname": "Angle.to_qiskit", "kind": "variable", "doc": "\n", "annotation": ": float"}, {"fullname": "pauliopt.utils.Angle.repr_latex", "modulename": "pauliopt.utils", "qualname": "Angle.repr_latex", "kind": "variable", "doc": "LaTeX math mode representation of this number.
\n", "annotation": ": str"}, {"fullname": "pauliopt.utils.Angle.random", "modulename": "pauliopt.utils", "qualname": "Angle.random", "kind": "function", "doc": "Generates a random angle with the given subdivision
:\nr * pi/subdivision
for random r in range(2*subdivision)
.
A constant for the angle 0.
\n", "annotation": ": Final[pauliopt.utils.Angle]", "default_value": "0"}, {"fullname": "pauliopt.utils.Angle.pi", "modulename": "pauliopt.utils", "qualname": "Angle.pi", "kind": "variable", "doc": "A constant for the angle pi.
\n", "annotation": ": Final[pauliopt.utils.Angle]", "default_value": "pi"}, {"fullname": "pauliopt.utils.pi", "modulename": "pauliopt.utils", "qualname": "pi", "kind": "variable", "doc": "Constant for Angle.pi
.
Constant for Angle.pi
.
A container class for angle expressions.
\n", "bases": "AngleExpr"}, {"fullname": "pauliopt.utils.AngleVar.__init__", "modulename": "pauliopt.utils", "qualname": "AngleVar.__init__", "kind": "function", "doc": "\n", "signature": "(label: str, latex_label: Optional[str] = None)"}, {"fullname": "pauliopt.utils.AngleVar.to_qiskit", "modulename": "pauliopt.utils", "qualname": "AngleVar.to_qiskit", "kind": "variable", "doc": "\n", "annotation": ": Any"}, {"fullname": "pauliopt.utils.AngleVar.repr_latex", "modulename": "pauliopt.utils", "qualname": "AngleVar.repr_latex", "kind": "variable", "doc": "LaTeX math mode representation of this number.
\n", "annotation": ": str"}, {"fullname": "pauliopt.utils.SVGBuilder", "modulename": "pauliopt.utils", "qualname": "SVGBuilder", "kind": "class", "doc": "Utility class for building certain SVG images.\nFollows the Fluent interface pattern.
\n"}, {"fullname": "pauliopt.utils.SVGBuilder.__init__", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.__init__", "kind": "function", "doc": "\n", "signature": "(width: int, height: int)"}, {"fullname": "pauliopt.utils.SVGBuilder.width", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.width", "kind": "variable", "doc": "The figure width.
\n", "annotation": ": int"}, {"fullname": "pauliopt.utils.SVGBuilder.height", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.height", "kind": "variable", "doc": "The figure height.
\n", "annotation": ": int"}, {"fullname": "pauliopt.utils.SVGBuilder.tags", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.tags", "kind": "variable", "doc": "The current sequence of tags.
\n", "annotation": ": Sequence[str]"}, {"fullname": "pauliopt.utils.SVGBuilder.line", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.line", "kind": "function", "doc": "Draws a line from given coordinates to given coordinates.
\n", "signature": "(\tself,\tfro: Tuple[int, int],\tto: Tuple[int, int]) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.line_bend", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.line_bend", "kind": "function", "doc": "\n", "signature": "(\tself,\tfro: Tuple[int, int],\tto: Tuple[int, int],\tleft=False,\tdegree=5):", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.add_diagonal_fill", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.add_diagonal_fill", "kind": "function", "doc": "\n", "signature": "(self, color_1: str, color_2: str, id: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.square", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.square", "kind": "function", "doc": "\n", "signature": "(\tself,\tcentre: Tuple[int, int],\twidth: int,\theight: int,\tfill) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.text_with_square", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.text_with_square", "kind": "function", "doc": "\n", "signature": "(\tself,\tcentre: Tuple[int, int],\twidth: int,\theight: int,\ttext: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.circle", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.circle", "kind": "function", "doc": "Draws a circle with given centre and radius.
\n", "signature": "(\tself,\tcentre: Tuple[int, int],\tr: int,\tfill: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.rect", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.rect", "kind": "function", "doc": "Draws a rectangle with given centre, width and height.
\n", "signature": "(\tself,\tcentre: Tuple[int, int],\twidth: int,\theight: int,\tfill: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.text", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.text", "kind": "function", "doc": "Draws text at the given position (stroke/fill not used).
\n", "signature": "(\tself,\tpos: Tuple[int, int],\ttext: str,\t*,\tfont_size: int = 10,\tcenter=False) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.TempSchedule", "modulename": "pauliopt.utils", "qualname": "TempSchedule", "kind": "class", "doc": "Protocol for a temperature schedule.\nThe temperature is a number (int or float) computed from the iteration\nnumber it
(starting from 0) and the total number of iterations num_iter
\n(passed as a keyword argument).
Protocol for a function constructing a temperature schedule\nfrom an initial and final temperatures.
\n", "bases": "typing.Protocol"}, {"fullname": "pauliopt.utils.TempScheduleProvider.__init__", "modulename": "pauliopt.utils", "qualname": "TempScheduleProvider.__init__", "kind": "function", "doc": "\n", "signature": "(*args, **kwargs)"}, {"fullname": "pauliopt.utils.linear_temp_schedule", "modulename": "pauliopt.utils", "qualname": "linear_temp_schedule", "kind": "function", "doc": "Returns a straight/linear temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.geometric_temp_schedule", "modulename": "pauliopt.utils", "qualname": "geometric_temp_schedule", "kind": "function", "doc": "Returns a geometric temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.reciprocal_temp_schedule", "modulename": "pauliopt.utils", "qualname": "reciprocal_temp_schedule", "kind": "function", "doc": "Returns a reciprocal temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.log_temp_schedule", "modulename": "pauliopt.utils", "qualname": "log_temp_schedule", "kind": "function", "doc": "Returns a logarithmic temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.StandardTempScheduleName", "modulename": "pauliopt.utils", "qualname": "StandardTempScheduleName", "kind": "variable", "doc": "Names of the standard temperature schedules.
\n", "default_value": "typing.Literal['linear', 'geometric', 'reciprocal', 'log']"}, {"fullname": "pauliopt.utils.StandardTempSchedule", "modulename": "pauliopt.utils", "qualname": "StandardTempSchedule", "kind": "variable", "doc": "Type for standard temperature schedules.
\n", "default_value": "typing.Tuple[typing.Literal['linear', 'geometric', 'reciprocal', 'log'], typing.Union[int, float], typing.Union[int, float]]"}, {"fullname": "pauliopt.utils.StandardTempSchedules", "modulename": "pauliopt.utils", "qualname": "StandardTempSchedules", "kind": "variable", "doc": "Dictionary of standard temperature schedule providers.
\n", "annotation": ": Final[Mapping[Literal['linear', 'geometric', 'reciprocal', 'log'], pauliopt.utils.TempScheduleProvider]]", "default_value": "{'linear': <function linear_temp_schedule>, 'geometric': <function geometric_temp_schedule>, 'reciprocal': <function reciprocal_temp_schedule>, 'log': <function log_temp_schedule>}"}]; + /** pdoc search index */const docs = [{"fullname": "pauliopt", "modulename": "pauliopt", "kind": "module", "doc": "A Python library to simplify quantum circuits of Pauli gadgets.\nIt consists of two sub-modules, phase
and pauli
, detailed below.
A general class for quantum circuits, with a ZX / Gadget representation.
\n"}, {"fullname": "pauliopt.circuits.QISKIT_CONVERSION", "modulename": "pauliopt.circuits", "qualname": "QISKIT_CONVERSION", "kind": "variable", "doc": "\n", "default_value": "{'h': <function <lambda>>, 'x': <function <lambda>>, 'y': <function <lambda>>, 'z': <function <lambda>>, 's': <function <lambda>>, 'sdg': <function <lambda>>, 't': <function <lambda>>, 'tdg': <function <lambda>>, 'swap': <function <lambda>>, 'cx': <function <lambda>>, 'cy': <function <lambda>>, 'cz': <function <lambda>>, 'ccx': <function <lambda>>, 'ccz': <function <lambda>>, 'rx': <function <lambda>>, 'ry': <function <lambda>>, 'rz': <function <lambda>>, 'crx': <function <lambda>>, 'cry': <function <lambda>>, 'crz': <function <lambda>>}"}, {"fullname": "pauliopt.circuits.Circuit", "modulename": "pauliopt.circuits", "qualname": "Circuit", "kind": "class", "doc": "Class for representing quantum circuits.
\n"}, {"fullname": "pauliopt.circuits.Circuit.__init__", "modulename": "pauliopt.circuits", "qualname": "Circuit.__init__", "kind": "function", "doc": "\n", "signature": "(n_qubits, _gates=None)"}, {"fullname": "pauliopt.circuits.Circuit.n_qubits", "modulename": "pauliopt.circuits", "qualname": "Circuit.n_qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.circuits.Circuit.add_gate", "modulename": "pauliopt.circuits", "qualname": "Circuit.add_gate", "kind": "function", "doc": "\n", "signature": "(self, gate):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.add_gates", "modulename": "pauliopt.circuits", "qualname": "Circuit.add_gates", "kind": "function", "doc": "\n", "signature": "(self, gates):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.to_phase_circuit", "modulename": "pauliopt.circuits", "qualname": "Circuit.to_phase_circuit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.from_qiskit", "modulename": "pauliopt.circuits", "qualname": "Circuit.from_qiskit", "kind": "function", "doc": "\n", "signature": "(qc: qiskit.circuit.quantumcircuit.QuantumCircuit):", "funcdef": "def"}, {"fullname": "pauliopt.circuits.Circuit.to_qiskit", "modulename": "pauliopt.circuits", "qualname": "Circuit.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.clifford", "modulename": "pauliopt.clifford", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.clifford.clifford", "modulename": "pauliopt.clifford.clifford", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.clifford.clifford.mult_paulis", "modulename": "pauliopt.clifford.clifford", "qualname": "mult_paulis", "kind": "function", "doc": "Small helper function to multiply two Pauli strings and correctly update the sign.
\n\nArgs:\n p1 (np.ndarray): Pauli string 1\n p2 (np.ndarray): Pauli string 2\n sign1 (int): Sign of Pauli string 1\n sign2 (int): Sign of Pauli string 2\n n_qubits (int): Number of qubits in the Pauli strings
\n\nReturns:\n np.ndarray: Pauli string 1 * Pauli string 2
\n", "signature": "(p1, p2, sign1, sign2, n_qubits):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau", "kind": "class", "doc": "Class for storing and manipulating Clifford clifford.\nA Clifford clifford is a representation of a Clifford circuit as a\n2n x 2n binary matrix, where n is the number of qubits. The first n rows\nrepresent the stabilizers, and the last n rows represent the destabilizers.\nThe first n columns represent the X operators, and the last n columns\nrepresent the Z operators.\nThe sign of the operator in row i is given by the i-th entry of\nthe sign vector.
\n\nThe clifford is initialized as the identity matrix with a zero sign vector.
\n\nArgs:\n n_qubits (int): Number of qubits in the clifford.
\n\nA more readable representation of the clifford is given by the string:
\n\n>>> from pauliopt.clifford.clifford import CliffordTableau\n>>> ct = CliffordTableau(2)\n>>> print(ct)\n# Expected Output:\n# X/Z I/I | +\n# I/I X/Z | +\n>>> ct.append_h(0)\n>>> print(ct)\n# Expected Output:\n# Z/X I/I | +\n# I/I X/Z | +\n
\nTo get the raw $2n imes 2n$ matrix representation of the clifford, use:
\n\n>>> ct.clifford\n# Expected Output:\n# array([[0, 0, 1, 0],\n# [0, 1, 0, 0],\n# [1, 0, 0, 0],\n# [0, 0, 0, 1]], dtype=uint8)\n
\nTo get the sign vector, use:
\n\n>>> ct.signs\n# Expected Output:\n# array([0, 0, 0, 0], dtype=uint8)\n
\nCreate a CliffordTableau from a clifford and sign vector.
\n\nArgs:\n clifford (np.ndarray): $2n imes 2n$ binary matrix representing the clifford.\n signs (np.ndarray): $2n$-dimensional binary vector representing the sign vector.
\n\nReturns:\n CliffordTableau: CliffordTableau object.
\n", "signature": "(clifford, signs):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.from_qiskit_tableau", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.from_qiskit_tableau", "kind": "function", "doc": "Create a CliffordTableau from a qiskit Clifford object.
\n\nArgs:\n qiskit_ct (qiskit.quantum_info.Clifford): Clifford object.
\n\nReturns:\n CliffordTableau: CliffordTableau object.
\n", "signature": "(\tqiskit_ct: qiskit.quantum_info.operators.symplectic.clifford.Clifford):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.string_repr", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.string_repr", "kind": "function", "doc": "Get a string representation of the clifford.
\n\nArgs:\n sep (str): Separator between the pauli operators\n sign_sep (str): Separator between operators and sign.
\n", "signature": "(self, sep=' ', sign_sep='| '):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.x_out", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.x_out", "kind": "function", "doc": "Get the X operator in row row
and column col
.
Args:\n row (int): Row index.\n col (int): Column index.
\n", "signature": "(self, row, col):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.z_out", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.z_out", "kind": "function", "doc": "Get the Z operator in row row
and column col
.
Args:\n row (int): Row index.\n col (int): Column index.
\n", "signature": "(self, row, col):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.prepend_h", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.prepend_h", "kind": "function", "doc": "Prepend a Hadamard gate to the clifford.
\n\nArgs:\n qubit (int): Qubit the hadamard gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.append_h", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.append_h", "kind": "function", "doc": "Append a Hadamard gate to the clifford.
\n\nArgs:\n qubit (int): Qubit the hadamard gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.prepend_s", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.prepend_s", "kind": "function", "doc": "Prepend a S gate to the clifford.
\n\nArgs:\n qubit (int): Qubit the S gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.append_s", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.append_s", "kind": "function", "doc": "Append a S gate to the clifford.
\n\nArgs:\n qubit (int): Qubit the S gate is applied to.
\n", "signature": "(self, qubit):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.prepend_cnot", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.prepend_cnot", "kind": "function", "doc": "Prepend a CNOT gate to the clifford.
\n\nArgs:\n control (int): Control qubit.\n target (int): Target qubit.
\n", "signature": "(self, control, target):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.append_cnot", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.append_cnot", "kind": "function", "doc": "Append a CNOT gate to the clifford.
\n\nArgs:\n control (int): Control qubit.\n target (int): Target qubit.
\n", "signature": "(self, control, target):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.insert_pauli_row", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.insert_pauli_row", "kind": "function", "doc": "Insert a Pauli row into the clifford.
\n\nArgs:\n pauli (np.array): Pauli to be inserted.\n p_sign (int): Sign of the Pauli.\n row (int): Row to insert the Pauli.
\n", "signature": "(self, pauli, p_sign, row):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.inverse", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.inverse", "kind": "function", "doc": "Invert the clifford.
\n\nNote: this is will create a deep copy of the clifford.
\n\nReturns:\n CliffordTableau: Inverted clifford.
\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.clifford.CliffordTableau.apply", "modulename": "pauliopt.clifford.clifford", "qualname": "CliffordTableau.apply", "kind": "function", "doc": "Apply a CliffordTableau to the current clifford.
\n\nNote: this is will create a deep copy of the clifford.
\n\nArgs:\n other (CliffordTableau): CliffordTableau to apply.
\n\nReturns:\n CliffordTableau: Applied CliffordTableau.
\n", "signature": "(self, other: pauliopt.clifford.clifford.CliffordTableau):", "funcdef": "def"}, {"fullname": "pauliopt.clifford.tableau_synthesis", "modulename": "pauliopt.clifford.tableau_synthesis", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.clifford.tableau_synthesis.heurisitc_fkt", "modulename": "pauliopt.clifford.tableau_synthesis", "qualname": "heurisitc_fkt", "kind": "function", "doc": "The heuristic function for picking the pivot in the clifford synthesis algorithm.
\n\nPick the pivot to eliminate the next column in the clifford synthesis algorithm.
\n\nWe currently use the heuristic function h to pick the pivot,\ni.e choose the row with the smallest heurisitc_fkt
value.
Helper function to update the dfs list in place. (See compute_steiner_tree)
\n\nHelper function to relabel the graph in place. (See compute_steiner_tree)
\n\nCompute the steiner tree of the sub_graph with the given nodes.\nThis function is a wrapper around the networkx steiner tree function.
\n\nIt will additionally swap the columns of the remaining clifford to further reduce\nthe amount of CNOTs if include_swaps is True.\nInclude_swaps requires lookup, swappable_nodes, permutation and n_qubits to be set.
\n\nsub_graph: The graph of the topology
include_swaps: Whether to include swaps in the steiner tree
Check if the given vertex is a cutting vertex in the given graph.
\n\nSanitization process for the stabilizer part.
\n\nEssentially:
\n\nSanitization process for the destabilizer part.
\n\nEssentially:
\n\nRemove the interactions of the destabilizer/stabilizer part.\nThis function assumed that all elements are Z or I.
\n\nInclude swaps requires swappable_nodes, permutation and include_swaps to be set.
\n\nSteiner reduce a column of the clifford.
\n\nArchitecture aware synthesis of a Clifford clifford.\nThis is the implementation of the algorithm described in Winderl et. al. [1]
\n\n\n\n\nThe synthesized circuit and a inital/final permutation
\n
References
\n\n[1] Winderl, Huang, et al. \"Architecture-Aware Synthesis of Stabilizer Circuits from Clifford Tableaus.\" arXiv preprint arXiv:2309.08972 (2023).
\n", "signature": "(\tclifford: pauliopt.clifford.clifford.CliffordTableau,\ttopo: pauliopt.topologies.Topology,\tinclude_swaps=True):", "funcdef": "def"}, {"fullname": "pauliopt.gates", "modulename": "pauliopt.gates", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.gates.Gate", "modulename": "pauliopt.gates", "qualname": "Gate", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "abc.ABC"}, {"fullname": "pauliopt.gates.Gate.qubits", "modulename": "pauliopt.gates", "qualname": "Gate.qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Gate.name", "modulename": "pauliopt.gates", "qualname": "Gate.name", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Gate.width", "modulename": "pauliopt.gates", "qualname": "Gate.width", "kind": "variable", "doc": "Width of gate used for drawing.
\n"}, {"fullname": "pauliopt.gates.Gate.draw_zx", "modulename": "pauliopt.gates", "qualname": "Gate.draw_zx", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Gate.draw_box", "modulename": "pauliopt.gates", "qualname": "Gate.draw_box", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Gate.draw", "modulename": "pauliopt.gates", "qualname": "Gate.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Gate.gadgets", "modulename": "pauliopt.gates", "qualname": "Gate.gadgets", "kind": "variable", "doc": "List of gadgets used to implement this gate.
\n"}, {"fullname": "pauliopt.gates.Gate.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Gate.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.PhaseGate", "modulename": "pauliopt.gates", "qualname": "PhaseGate", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.PhaseGate.phase", "modulename": "pauliopt.gates", "qualname": "PhaseGate.phase", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.H", "modulename": "pauliopt.gates", "qualname": "H", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.H.n_qubits", "modulename": "pauliopt.gates", "qualname": "H.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.H.width", "modulename": "pauliopt.gates", "qualname": "H.width", "kind": "variable", "doc": "Width of gate used for drawing.
\n", "default_value": "40"}, {"fullname": "pauliopt.gates.H.decomp", "modulename": "pauliopt.gates", "qualname": "H.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.H.draw", "modulename": "pauliopt.gates", "qualname": "H.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.H.to_qiskit", "modulename": "pauliopt.gates", "qualname": "H.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.X", "modulename": "pauliopt.gates", "qualname": "X", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.X.n_qubits", "modulename": "pauliopt.gates", "qualname": "X.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.X.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "X.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.X.decomp", "modulename": "pauliopt.gates", "qualname": "X.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.X.to_qiskit", "modulename": "pauliopt.gates", "qualname": "X.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Z", "modulename": "pauliopt.gates", "qualname": "Z", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Z.n_qubits", "modulename": "pauliopt.gates", "qualname": "Z.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Z.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Z.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Z.decomp", "modulename": "pauliopt.gates", "qualname": "Z.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Z.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Z.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Y", "modulename": "pauliopt.gates", "qualname": "Y", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Y.n_qubits", "modulename": "pauliopt.gates", "qualname": "Y.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Y.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Y.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Y.decomp", "modulename": "pauliopt.gates", "qualname": "Y.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Y.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Y.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.S", "modulename": "pauliopt.gates", "qualname": "S", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.S.n_qubits", "modulename": "pauliopt.gates", "qualname": "S.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.S.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "S.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.S.decomp", "modulename": "pauliopt.gates", "qualname": "S.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.S.to_qiskit", "modulename": "pauliopt.gates", "qualname": "S.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Sdg", "modulename": "pauliopt.gates", "qualname": "Sdg", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Sdg.n_qubits", "modulename": "pauliopt.gates", "qualname": "Sdg.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Sdg.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Sdg.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Sdg.decomp", "modulename": "pauliopt.gates", "qualname": "Sdg.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Sdg.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Sdg.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.T", "modulename": "pauliopt.gates", "qualname": "T", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.T.n_qubits", "modulename": "pauliopt.gates", "qualname": "T.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.T.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "T.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.T.decomp", "modulename": "pauliopt.gates", "qualname": "T.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.T.to_qiskit", "modulename": "pauliopt.gates", "qualname": "T.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Tdg", "modulename": "pauliopt.gates", "qualname": "Tdg", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.Tdg.n_qubits", "modulename": "pauliopt.gates", "qualname": "Tdg.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Tdg.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Tdg.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Tdg.decomp", "modulename": "pauliopt.gates", "qualname": "Tdg.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Tdg.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Tdg.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.SWAP", "modulename": "pauliopt.gates", "qualname": "SWAP", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.SWAP.n_qubits", "modulename": "pauliopt.gates", "qualname": "SWAP.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.SWAP.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "SWAP.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.SWAP.decomp", "modulename": "pauliopt.gates", "qualname": "SWAP.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.SWAP.to_qiskit", "modulename": "pauliopt.gates", "qualname": "SWAP.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CX", "modulename": "pauliopt.gates", "qualname": "CX", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CX.n_qubits", "modulename": "pauliopt.gates", "qualname": "CX.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CX.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CX.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CX.width", "modulename": "pauliopt.gates", "qualname": "CX.width", "kind": "variable", "doc": "Width of gate used for drawing.
\n", "default_value": "40"}, {"fullname": "pauliopt.gates.CX.decomp", "modulename": "pauliopt.gates", "qualname": "CX.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CX.draw", "modulename": "pauliopt.gates", "qualname": "CX.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CX.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CX.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CY", "modulename": "pauliopt.gates", "qualname": "CY", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CY.n_qubits", "modulename": "pauliopt.gates", "qualname": "CY.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CY.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CY.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CY.decomp", "modulename": "pauliopt.gates", "qualname": "CY.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CY.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CY.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CZ", "modulename": "pauliopt.gates", "qualname": "CZ", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CZ.n_qubits", "modulename": "pauliopt.gates", "qualname": "CZ.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CZ.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CZ.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CZ.decomp", "modulename": "pauliopt.gates", "qualname": "CZ.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CZ.draw", "modulename": "pauliopt.gates", "qualname": "CZ.draw", "kind": "function", "doc": "\n", "signature": "(self, builder, base, row_width, params):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CZ.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CZ.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CCX", "modulename": "pauliopt.gates", "qualname": "CCX", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CCX.n_qubits", "modulename": "pauliopt.gates", "qualname": "CCX.n_qubits", "kind": "variable", "doc": "\n", "default_value": "3"}, {"fullname": "pauliopt.gates.CCX.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CCX.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CCX.decomp", "modulename": "pauliopt.gates", "qualname": "CCX.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CCX.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CCX.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CCZ", "modulename": "pauliopt.gates", "qualname": "CCZ", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "Gate"}, {"fullname": "pauliopt.gates.CCZ.n_qubits", "modulename": "pauliopt.gates", "qualname": "CCZ.n_qubits", "kind": "variable", "doc": "\n", "default_value": "3"}, {"fullname": "pauliopt.gates.CCZ.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CCZ.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CCZ.decomp", "modulename": "pauliopt.gates", "qualname": "CCZ.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CCZ.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CCZ.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Rx", "modulename": "pauliopt.gates", "qualname": "Rx", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.Rx.n_qubits", "modulename": "pauliopt.gates", "qualname": "Rx.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Rx.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Rx.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Rx.decomp", "modulename": "pauliopt.gates", "qualname": "Rx.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Rx.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Rx.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Ry", "modulename": "pauliopt.gates", "qualname": "Ry", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.Ry.n_qubits", "modulename": "pauliopt.gates", "qualname": "Ry.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Ry.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Ry.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Ry.decomp", "modulename": "pauliopt.gates", "qualname": "Ry.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Ry.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Ry.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.Rz", "modulename": "pauliopt.gates", "qualname": "Rz", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.Rz.n_qubits", "modulename": "pauliopt.gates", "qualname": "Rz.n_qubits", "kind": "variable", "doc": "\n", "default_value": "1"}, {"fullname": "pauliopt.gates.Rz.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "Rz.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.Rz.decomp", "modulename": "pauliopt.gates", "qualname": "Rz.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.Rz.to_qiskit", "modulename": "pauliopt.gates", "qualname": "Rz.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CRx", "modulename": "pauliopt.gates", "qualname": "CRx", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.CRx.n_qubits", "modulename": "pauliopt.gates", "qualname": "CRx.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CRx.draw_gadget", "modulename": "pauliopt.gates", "qualname": "CRx.draw_gadget", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CRx.decomp", "modulename": "pauliopt.gates", "qualname": "CRx.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CRx.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CRx.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CRy", "modulename": "pauliopt.gates", "qualname": "CRy", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.CRy.n_qubits", "modulename": "pauliopt.gates", "qualname": "CRy.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CRy.draw_gadget", "modulename": "pauliopt.gates", "qualname": "CRy.draw_gadget", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CRy.decomp", "modulename": "pauliopt.gates", "qualname": "CRy.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CRy.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CRy.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CRz", "modulename": "pauliopt.gates", "qualname": "CRz", "kind": "class", "doc": "Base class for quantum gates.
\n", "bases": "PhaseGate"}, {"fullname": "pauliopt.gates.CRz.n_qubits", "modulename": "pauliopt.gates", "qualname": "CRz.n_qubits", "kind": "variable", "doc": "\n", "default_value": "2"}, {"fullname": "pauliopt.gates.CRz.draw_as_zx", "modulename": "pauliopt.gates", "qualname": "CRz.draw_as_zx", "kind": "variable", "doc": "\n", "default_value": "True"}, {"fullname": "pauliopt.gates.CRz.decomp", "modulename": "pauliopt.gates", "qualname": "CRz.decomp", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.gates.CRz.to_qiskit", "modulename": "pauliopt.gates", "qualname": "CRz.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.gates.CNOT", "modulename": "pauliopt.gates", "qualname": "CNOT", "kind": "variable", "doc": "\n", "default_value": "<class 'pauliopt.gates.CX'>"}, {"fullname": "pauliopt.gates.draw_gadget", "modulename": "pauliopt.gates", "qualname": "draw_gadget", "kind": "function", "doc": "\n", "signature": "(builder, base, row_width, params, gadget, text_above=True):", "funcdef": "def"}, {"fullname": "pauliopt.pauli", "modulename": "pauliopt.pauli", "kind": "module", "doc": "This module contains code to create and simplify circuits of Pauli gadgets,\nby conjugation with topologically-aware random circuits of Clifford gates.
\n\nCurrently in development.
\n"}, {"fullname": "pauliopt.pauli.anneal", "modulename": "pauliopt.pauli.anneal", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.anneal.pick_random_gate", "modulename": "pauliopt.pauli.anneal", "qualname": "pick_random_gate", "kind": "function", "doc": "\n", "signature": "(num_qubits, gate_set=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.anneal.compute_effect", "modulename": "pauliopt.pauli.anneal", "qualname": "compute_effect", "kind": "function", "doc": "\n", "signature": "(\tpp: pauliopt.pauli.pauli_polynomial.PauliPolynomial,\tgate: pauliopt.pauli.clifford_gates.CliffordGate,\ttopology: pauliopt.topologies.Topology,\tleg_cache=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.anneal.anneal", "modulename": "pauliopt.pauli.anneal", "qualname": "anneal", "kind": "function", "doc": "\n", "signature": "(\tpp: pauliopt.pauli.pauli_polynomial.PauliPolynomial,\ttopology,\tschedule=('geometric', 1.0, 0.1),\tnr_iterations=100):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates", "modulename": "pauliopt.pauli.clifford_gates", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType", "kind": "class", "doc": "An enumeration.
\n", "bases": "enum.Enum"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.CX", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.CX", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.CX: 'cx'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.CY", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.CY", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.CY: 'cy'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.CZ", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.CZ", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.CZ: 'cz'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.H", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.H", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.H: 'h'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.S", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.S", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.S: 's'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordType.V", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordType.V", "kind": "variable", "doc": "\n", "default_value": "<CliffordType.V: 'v'>"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordGate", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordGate", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "abc.ABC"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordGate.c_type", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordGate.c_type", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.CliffordGate.propagate_pauli", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CliffordGate.propagate_pauli", "kind": "function", "doc": "\n", "signature": "(self, gadget: pauliopt.pauli.pauli_gadget.PauliGadget):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "CliffordGate, abc.ABC"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.__init__", "kind": "function", "doc": "\n", "signature": "(type, qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.rules", "kind": "variable", "doc": "\n", "default_value": "None"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.qubit", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.qubit", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.SingleQubitGate.propagate_pauli", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "SingleQubitGate.propagate_pauli", "kind": "function", "doc": "\n", "signature": "(self, gadget: pauliopt.pauli.pauli_gadget.PauliGadget):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "CliffordGate, abc.ABC"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.__init__", "kind": "function", "doc": "\n", "signature": "(type, control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.rules", "kind": "variable", "doc": "\n", "default_value": "None"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.control", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.control", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.target", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.target", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_gates.ControlGate.propagate_pauli", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "ControlGate.propagate_pauli", "kind": "function", "doc": "\n", "signature": "(self, gadget: pauliopt.pauli.pauli_gadget.PauliGadget):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.CX", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CX", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "ControlGate"}, {"fullname": "pauliopt.pauli.clifford_gates.CX.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CX.__init__", "kind": "function", "doc": "\n", "signature": "(control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.CX.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CX.rules", "kind": "variable", "doc": "\n", "default_value": "{'XX': (<Pauli.X: 'X'>, <Pauli.I: 'I'>, 1), 'XY': (<Pauli.Y: 'Y'>, <Pauli.Z: 'Z'>, 1), 'XZ': (<Pauli.Y: 'Y'>, <Pauli.Y: 'Y'>, -1), 'XI': (<Pauli.X: 'X'>, <Pauli.X: 'X'>, 1), 'YX': (<Pauli.Y: 'Y'>, <Pauli.I: 'I'>, 1), 'YY': (<Pauli.X: 'X'>, <Pauli.Z: 'Z'>, -1), 'YZ': (<Pauli.X: 'X'>, <Pauli.Y: 'Y'>, 1), 'YI': (<Pauli.Y: 'Y'>, <Pauli.X: 'X'>, 1), 'ZX': (<Pauli.Z: 'Z'>, <Pauli.X: 'X'>, 1), 'ZY': (<Pauli.I: 'I'>, <Pauli.Y: 'Y'>, 1), 'ZZ': (<Pauli.I: 'I'>, <Pauli.Z: 'Z'>, 1), 'ZI': (<Pauli.Z: 'Z'>, <Pauli.I: 'I'>, 1), 'IX': (<Pauli.I: 'I'>, <Pauli.X: 'X'>, 1), 'IY': (<Pauli.Z: 'Z'>, <Pauli.Y: 'Y'>, 1), 'IZ': (<Pauli.Z: 'Z'>, <Pauli.Z: 'Z'>, 1), 'II': (<Pauli.I: 'I'>, <Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.CZ", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CZ", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "ControlGate"}, {"fullname": "pauliopt.pauli.clifford_gates.CZ.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CZ.__init__", "kind": "function", "doc": "\n", "signature": "(control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.CZ.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CZ.rules", "kind": "variable", "doc": "\n", "default_value": "{'XX': (<Pauli.Y: 'Y'>, <Pauli.Y: 'Y'>, 1), 'XY': (<Pauli.Y: 'Y'>, <Pauli.X: 'X'>, -1), 'XZ': (<Pauli.X: 'X'>, <Pauli.I: 'I'>, 1), 'XI': (<Pauli.X: 'X'>, <Pauli.Z: 'Z'>, 1), 'YX': (<Pauli.X: 'X'>, <Pauli.Y: 'Y'>, -1), 'YY': (<Pauli.X: 'X'>, <Pauli.X: 'X'>, 1), 'YZ': (<Pauli.Y: 'Y'>, <Pauli.I: 'I'>, 1), 'YI': (<Pauli.Y: 'Y'>, <Pauli.Z: 'Z'>, 1), 'ZX': (<Pauli.I: 'I'>, <Pauli.X: 'X'>, 1), 'ZY': (<Pauli.I: 'I'>, <Pauli.Y: 'Y'>, 1), 'ZZ': (<Pauli.Z: 'Z'>, <Pauli.Z: 'Z'>, 1), 'ZI': (<Pauli.Z: 'Z'>, <Pauli.I: 'I'>, 1), 'IX': (<Pauli.Z: 'Z'>, <Pauli.X: 'X'>, 1), 'IY': (<Pauli.Z: 'Z'>, <Pauli.Y: 'Y'>, 1), 'IZ': (<Pauli.I: 'I'>, <Pauli.Z: 'Z'>, 1), 'II': (<Pauli.I: 'I'>, <Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.CY", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CY", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "ControlGate"}, {"fullname": "pauliopt.pauli.clifford_gates.CY.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CY.__init__", "kind": "function", "doc": "\n", "signature": "(control, target)"}, {"fullname": "pauliopt.pauli.clifford_gates.CY.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "CY.rules", "kind": "variable", "doc": "\n", "default_value": "{'XX': (<Pauli.Y: 'Y'>, <Pauli.Z: 'Z'>, -1), 'XY': (<Pauli.X: 'X'>, <Pauli.I: 'I'>, 1), 'XZ': (<Pauli.Y: 'Y'>, <Pauli.X: 'X'>, 1), 'XI': (<Pauli.X: 'X'>, <Pauli.Y: 'Y'>, 1), 'YX': (<Pauli.X: 'X'>, <Pauli.Z: 'Z'>, 1), 'YY': (<Pauli.Y: 'Y'>, <Pauli.I: 'I'>, 1), 'YZ': (<Pauli.X: 'X'>, <Pauli.X: 'X'>, -1), 'YI': (<Pauli.Y: 'Y'>, <Pauli.Y: 'Y'>, 1), 'ZX': (<Pauli.I: 'I'>, <Pauli.X: 'X'>, 1), 'ZY': (<Pauli.Z: 'Z'>, <Pauli.Y: 'Y'>, 1), 'ZZ': (<Pauli.I: 'I'>, <Pauli.Z: 'Z'>, 1), 'ZI': (<Pauli.Z: 'Z'>, <Pauli.I: 'I'>, 1), 'IX': (<Pauli.Z: 'Z'>, <Pauli.X: 'X'>, 1), 'IY': (<Pauli.I: 'I'>, <Pauli.Y: 'Y'>, 1), 'IZ': (<Pauli.Z: 'Z'>, <Pauli.Z: 'Z'>, 1), 'II': (<Pauli.I: 'I'>, <Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.H", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "H", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "SingleQubitGate"}, {"fullname": "pauliopt.pauli.clifford_gates.H.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "H.__init__", "kind": "function", "doc": "\n", "signature": "(qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.H.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "H.rules", "kind": "variable", "doc": "\n", "default_value": "{'X': (<Pauli.Z: 'Z'>, 1), 'Y': (<Pauli.Y: 'Y'>, -1), 'Z': (<Pauli.X: 'X'>, 1), 'I': (<Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.S", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "S", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "SingleQubitGate"}, {"fullname": "pauliopt.pauli.clifford_gates.S.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "S.__init__", "kind": "function", "doc": "\n", "signature": "(qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.S.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "S.rules", "kind": "variable", "doc": "\n", "default_value": "{'X': (<Pauli.Y: 'Y'>, -1), 'Y': (<Pauli.X: 'X'>, 1), 'Z': (<Pauli.Z: 'Z'>, 1), 'I': (<Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.V", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "V", "kind": "class", "doc": "Helper class that provides a standard way to create an ABC using\ninheritance.
\n", "bases": "SingleQubitGate"}, {"fullname": "pauliopt.pauli.clifford_gates.V.__init__", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "V.__init__", "kind": "function", "doc": "\n", "signature": "(qubit)"}, {"fullname": "pauliopt.pauli.clifford_gates.V.rules", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "V.rules", "kind": "variable", "doc": "\n", "default_value": "{'X': (<Pauli.X: 'X'>, 1), 'Y': (<Pauli.Z: 'Z'>, -1), 'Z': (<Pauli.Y: 'Y'>, 1), 'I': (<Pauli.I: 'I'>, 1)}"}, {"fullname": "pauliopt.pauli.clifford_gates.generate_random_clifford", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "generate_random_clifford", "kind": "function", "doc": "\n", "signature": "(c_type: pauliopt.pauli.clifford_gates.CliffordType, n_qubits: int):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_gates.clifford_to_qiskit", "modulename": "pauliopt.pauli.clifford_gates", "qualname": "clifford_to_qiskit", "kind": "function", "doc": "\n", "signature": "(clifford: pauliopt.pauli.clifford_gates.CliffordGate):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_region", "modulename": "pauliopt.pauli.clifford_region", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.__init__", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.__init__", "kind": "function", "doc": "\n", "signature": "(num_qubits, gates=None)"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.gates", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.gates", "kind": "variable", "doc": "\n", "annotation": ": [<class 'pauliopt.pauli.clifford_gates.CliffordGate'>]"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.num_qubits", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.num_qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.add_gate", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.add_gate", "kind": "function", "doc": "\n", "signature": "(self, gate: pauliopt.pauli.clifford_gates.CliffordGate):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.clifford_region.CliffordRegion.to_qiskit", "modulename": "pauliopt.pauli.clifford_region", "qualname": "CliffordRegion.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget", "modulename": "pauliopt.pauli.pauli_gadget", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.decompose_cnot_ladder_z", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "decompose_cnot_ladder_z", "kind": "function", "doc": "\n", "signature": "(ctrl: int, trg: int, arch: pauliopt.topologies.Topology):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.find_minimal_cx_assignment", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "find_minimal_cx_assignment", "kind": "function", "doc": "\n", "signature": "(\tcolumn: <built-in function array>,\tarch: pauliopt.topologies.Topology):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.PPhase", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PPhase", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PPhase.__init__", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PPhase.__init__", "kind": "function", "doc": "\n", "signature": "(angle: pauliopt.utils.AngleExpr)"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.__init__", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.__init__", "kind": "function", "doc": "\n", "signature": "(\tangle: pauliopt.utils.AngleExpr,\tpaulis: List[pauliopt.pauli.utils.Pauli])"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.angle", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.angle", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.paulis", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.paulis", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.copy", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.copy", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.two_qubit_count", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.two_qubit_count", "kind": "function", "doc": "\n", "signature": "(self, topology, leg_cache=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_gadget.PauliGadget.to_qiskit", "modulename": "pauliopt.pauli.pauli_gadget", "qualname": "PauliGadget.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self, topology=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial", "modulename": "pauliopt.pauli.pauli_polynomial", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial", "kind": "class", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.__init__", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.__init__", "kind": "function", "doc": "\n", "signature": "(num_qubits)"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.num_qubits", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.num_qubits", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.pauli_gadgets", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.pauli_gadgets", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.num_gadgets", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.num_gadgets", "kind": "variable", "doc": "\n"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.to_qiskit", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self, topology=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.propagate", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.propagate", "kind": "function", "doc": "\n", "signature": "(self, gate: pauliopt.pauli.clifford_gates.CliffordGate):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.copy", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.copy", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.two_qubit_count", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.two_qubit_count", "kind": "function", "doc": "\n", "signature": "(self, topology, leg_cache=None):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.pauli_polynomial.PauliPolynomial.to_svg", "modulename": "pauliopt.pauli.pauli_polynomial", "qualname": "PauliPolynomial.to_svg", "kind": "function", "doc": "\n", "signature": "(\tself,\thscale: float = 1.0,\tvscale: float = 1.0,\tscale: float = 1.0,\tsvg_code_only=False):", "funcdef": "def"}, {"fullname": "pauliopt.pauli.utils", "modulename": "pauliopt.pauli.utils", "kind": "module", "doc": "\n"}, {"fullname": "pauliopt.pauli.utils.Pauli", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli", "kind": "class", "doc": "An enumeration.
\n", "bases": "enum.Enum"}, {"fullname": "pauliopt.pauli.utils.Pauli.I", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.I", "kind": "variable", "doc": "\n", "default_value": "<Pauli.I: 'I'>"}, {"fullname": "pauliopt.pauli.utils.Pauli.X", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.X", "kind": "variable", "doc": "\n", "default_value": "<Pauli.X: 'X'>"}, {"fullname": "pauliopt.pauli.utils.Pauli.Y", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.Y", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Y: 'Y'>"}, {"fullname": "pauliopt.pauli.utils.Pauli.Z", "modulename": "pauliopt.pauli.utils", "qualname": "Pauli.Z", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Z: 'Z'>"}, {"fullname": "pauliopt.pauli.utils.I", "modulename": "pauliopt.pauli.utils", "qualname": "I", "kind": "variable", "doc": "\n", "default_value": "<Pauli.I: 'I'>"}, {"fullname": "pauliopt.pauli.utils.X", "modulename": "pauliopt.pauli.utils", "qualname": "X", "kind": "variable", "doc": "\n", "default_value": "<Pauli.X: 'X'>"}, {"fullname": "pauliopt.pauli.utils.Y", "modulename": "pauliopt.pauli.utils", "qualname": "Y", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Y: 'Y'>"}, {"fullname": "pauliopt.pauli.utils.Z", "modulename": "pauliopt.pauli.utils", "qualname": "Z", "kind": "variable", "doc": "\n", "default_value": "<Pauli.Z: 'Z'>"}, {"fullname": "pauliopt.phase", "modulename": "pauliopt.phase", "kind": "module", "doc": "This module contains code to create and simplify circuits of mixed ZX phase gadgets,\nby conjugation with topologically-aware random circuits of CX gates.
\n"}, {"fullname": "pauliopt.phase.cx_circuits", "modulename": "pauliopt.phase.cx_circuits", "kind": "module", "doc": "This module contains code to create CX circuits for the optimization\nof circuits of mixed phase gadgets.
\n"}, {"fullname": "pauliopt.phase.cx_circuits.GateLike", "modulename": "pauliopt.phase.cx_circuits", "qualname": "GateLike", "kind": "variable", "doc": "\n", "default_value": "typing.Union[typing.List[int], typing.Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.synthesis_methods", "modulename": "pauliopt.phase.cx_circuits", "qualname": "synthesis_methods", "kind": "variable", "doc": "\n", "default_value": "['permrowcol']"}, {"fullname": "pauliopt.phase.cx_circuits.permrowcol", "modulename": "pauliopt.phase.cx_circuits", "qualname": "permrowcol", "kind": "function", "doc": "Generates a sequence of CNOTs reallizing the given parity matrix up to permutation (if reallocate=True) using\nthe algorithm from https://arxiv.org/abs/2205.00724.
\n\nArgs:\n matrix (numpy.NDArray): The binary parity matrix\n topology (Topology): The target device topology\n parities_as_columns (bool): Whether the parities in the matrix are row-wise or column-wise. Defaults to False, i.e. row-wise.\n reallocate (bool, optional): Whether to qubits can re reallocated. Defaults to False.
\n\nRaises:\n ModuleNotFoundError: If 'networkx' or 'galois' is not installed.
\n\nReturns:\n List[Tuple[int]]: List of CNOTs realizing the given parity matrix\n List[int]: The output permutation of the qubit mapping. Equals [0..n] if reallocate==False.
\n", "signature": "(\tmatrix: numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]],\ttopology: pauliopt.topologies.Topology,\tparities_as_columns: bool = False,\treallocate: bool = False) -> Tuple[List[Tuple[int]], List[int]]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer", "kind": "class", "doc": "Container for a layer of CX gates constrained\nby a given qubit topology.
\n\nIt uses pauliopt.topologies.Matching
to keep track of which\ncouplings in the qubit topology are currently occupied by a CX gate,\nand to efficiently determine whether a CX gate can be added to the layer.
Readonly property exposing the qubit topology\nconstraining this CX circuit layer.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.num_gates", "kind": "variable", "doc": "Readonly property returning the number of gates in this\nCX circuit layer.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.gates", "kind": "variable", "doc": "Readonly property returning the collection of gates in this\nCX circuit layer.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.num_flippable_cxs", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.num_flippable_cxs", "kind": "variable", "doc": "Readonly property returning the number of CX gates in this\nCX circuit layer that can be flipped.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.flippable_cxs", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.flippable_cxs", "kind": "variable", "doc": "Readonly property returning the collection of CX gates that\nthat can be currently flipped in this layer, namely:
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.incident", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.incident", "kind": "function", "doc": "Returns the CX gate incident to the given qubit in this layer,\nor None
if there is no gate incident to the qubit.
Checks whether the given CX gate is in the layer:
\n", "signature": "(self, ctrl: int, trgt: int) -> bool:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.is_cx_flippable", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.is_cx_flippable", "kind": "function", "doc": "Checks whether the given CX gate can be flipped in this layer.\nThis is true if:
\n\nReturns a randomly selected flippable CX gate in this CX circuit layer,\nusing the given random number generator.
\n", "signature": "(self, rng: numpy.random._generator.Generator) -> Tuple[int, int]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.flip_cx", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.flip_cx", "kind": "function", "doc": "Adds/removes a CX gate with given control and target to/from the layer.\nRaises ValueError
if the gate cannot be added/removed.
The layer is modified in-place and then returned, as per the\nfluent API pattern.
\n", "signature": "(self, ctrl: int, trgt: int) -> pauliopt.phase.cx_circuits.CXCircuitLayer:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.clone", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.clone", "kind": "function", "doc": "Returns a copy of this CX layer.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuitLayer:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.to_qiskit", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.to_qiskit", "kind": "function", "doc": "\n", "signature": "(self) -> Any:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayer.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayer.draw", "kind": "function", "doc": "Draws this CX circuit layer using NetworkX and Matplotlib.
\n\nThe layout
keyword argument can be used to select a NetworkX layout\nfrom the available ones (exposed by Topology.available_nx_layouts
).\nThe figsize
keyword argument is passed to matplotlib.pyplot.figure
:\nif specified, it determines the width and height of the figure being drawn.\nThe zcolor
and xcolor
keyword arguments are used to determine the colour\nof the Z and X dots in a CX gate (analogous to PhaseCircuit.to_svg
).\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
Container for a circuit of CX gates, consisting of a given number of layers\nand constrained by a given qubit topology.
\n", "bases": "typing.Sequence[pauliopt.phase.cx_circuits.CXCircuitLayer]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.__init__", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.__init__", "kind": "function", "doc": "\n", "signature": "(\ttopology: pauliopt.topologies.Topology,\tlayers: Sequence[pauliopt.phase.cx_circuits.CXCircuitLayer] = (),\toutput_mapping: Sequence[int] = None)"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.topology", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nconstraining this CX circuit.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.num_gates", "kind": "variable", "doc": "Readonly property returning the total number of gates in this\nCX circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.parity_matrix", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.parity_matrix", "kind": "function", "doc": "Generates the parity matrix representing this CX circuit.
\n\nArgs:\n parities_as_columns (bool, optional): Boolean determining whether the\n parity matrix should be represented with parities as columns in the matrix.\n Defaults to False, meaning that the parities are rows in the matrix.
\n\nReturns:\n numpy.NDArray containing 1s and 0s.
\n", "signature": "(\tself,\tparities_as_columns: bool = False) -> numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.dag", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.dag", "kind": "function", "doc": "Returns a copy of this CX circuit,\nwith the layers in reverse order.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.clone", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.clone", "kind": "function", "doc": "Returns a copy of this CX circuit.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.to_qiskit", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.to_qiskit", "kind": "function", "doc": "\n", "signature": "(\tself,\tmethod: Literal['permrowcol', 'naive'] = 'naive',\treallocate: bool = False,\tparities_as_columns: bool = False) -> Any:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuit.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuit.draw", "kind": "function", "doc": "Draws this CX circuit using NetworkX and Matplotlib.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
Generates a CXCircuit from a given parity matrix, constrained by the given topology
\n\nArgs:\n matrix (np.typing.NDArray): The parity matrix to be synthesized\n topology (Topology): The target device topology\n parities_as_columns (bool, optional): Whether the parities in the matrix are column-wise or row-wise. Defaults to False, i.e. row-wise.\n reallocate (bool, optional): Whether the qubits can be reallocated to different registers, i.e. synthesis up to permutation. Defaults to False.\n method (Literal[\"permrowcol\"], optional): Which synthesis method should be used. Currently only permrowcol is available.
\n\nReturns:\n CXCircuit: Synthesized circuit
\n", "signature": "(\tmatrix: numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]],\ttopology: pauliopt.topologies.Topology,\tparities_as_columns: bool = False,\treallocate: bool = False,\tmethod: Literal['permrowcol'] = 'permrowcol') -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView", "kind": "class", "doc": "Readonly view on a CX circuit layer.
\n"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.__init__", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.__init__", "kind": "function", "doc": "\n", "signature": "(layer: pauliopt.phase.cx_circuits.CXCircuitLayer)"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.topology", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nconstraining this CX circuit layer.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.gates", "kind": "variable", "doc": "Readonly property returning the collection of gates in this\nCX circuit layer.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.num_gates", "kind": "variable", "doc": "Readonly property returning the number of gates in this\nCX circuit layer.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.flippable_cxs", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.flippable_cxs", "kind": "variable", "doc": "Readonly property returning the collection of CX gates that\nthat can be currently flipped in this layer, namely:
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[Tuple[int, int]]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.incident", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.incident", "kind": "function", "doc": "Returns the CX gate incident to the given qubit in this layer,\nor None
if there is no gate incident to the qubit.
Checks whether the given CX gate is in the layer:
\n", "signature": "(self, ctrl: int, trgt: int) -> bool:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.is_cx_flippable", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.is_cx_flippable", "kind": "function", "doc": "Checks whether the given CX gate can be flipped in this layer.\nThis is true if:
\n\nReturns a copy of this CX layer.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuitLayer:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitLayerView.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitLayerView.draw", "kind": "function", "doc": "Draws this CX circuit layer using NetworkX and Matplotlib.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
Readonly view on a CX circuit.
\n", "bases": "typing.Sequence[pauliopt.phase.cx_circuits.CXCircuitLayerView]"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.__init__", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.__init__", "kind": "function", "doc": "\n", "signature": "(circuit: pauliopt.phase.cx_circuits.CXCircuit)"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.topology", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nconstraining this CX circuit.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.num_gates", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.num_gates", "kind": "variable", "doc": "Readonly property returning the number of gates in this\nCX circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.dag", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.dag", "kind": "function", "doc": "Returns a copy of this CX circuit,\nwith the layers in reverse order.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.clone", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.clone", "kind": "function", "doc": "Returns a copy of this CX circuit.
\n", "signature": "(self) -> pauliopt.phase.cx_circuits.CXCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.cx_circuits.CXCircuitView.draw", "modulename": "pauliopt.phase.cx_circuits", "qualname": "CXCircuitView.draw", "kind": "function", "doc": "Draws this CX circuit using NetworkX and Matplotlib.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.
This module contains code to optimize circuits of mixed ZX phase gadgets\nusing topologically-aware circuits of CNOTs.
\n"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingCostLogger", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingCostLogger", "kind": "class", "doc": "Protocol for logger of initial/final cost in annealing.
\n", "bases": "typing.Protocol"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingCostLogger.__init__", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingCostLogger.__init__", "kind": "function", "doc": "\n", "signature": "(*args, **kwargs)"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingIterLogger", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingIterLogger", "kind": "class", "doc": "Protocol for logging of iteration info in annealing.
\n", "bases": "typing.Protocol"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingIterLogger.__init__", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingIterLogger.__init__", "kind": "function", "doc": "\n", "signature": "(*args, **kwargs)"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers", "kind": "class", "doc": "Typed dictionary of loggers for annealing.
\n", "bases": "typing.TypedDict"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers.log_start", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers.log_start", "kind": "variable", "doc": "\n", "annotation": ": pauliopt.phase.optimized_circuits.AnnealingCostLogger"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers.log_iter", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers.log_iter", "kind": "variable", "doc": "\n", "annotation": ": pauliopt.phase.optimized_circuits.AnnealingIterLogger"}, {"fullname": "pauliopt.phase.optimized_circuits.AnnealingLoggers.log_end", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "AnnealingLoggers.log_end", "kind": "variable", "doc": "\n", "annotation": ": pauliopt.phase.optimized_circuits.AnnealingCostLogger"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit", "kind": "class", "doc": "Container for a phase circuit to be progressively optimized.\nThe original phase circuit is passed to the constructor, together\nwith a qubit topology and a fixed number of layers constraining the\nCX circuit to be used for simplification.
\n\nTo understand the structure of the optimized phase circuit,\nconsider the following code snippet:
\n\n opt_circ = PhaseCircuitCXBlockOptimizer(orig_circ, topology, num_cx_layers)\n # perform optimization using the methods of `opt_circ`\n phase_block = opt_circ.phase_block\n cx_block = opt_circ.cx_block\n
\nThe optimized circuit is obtained by composing three blocks:
\n\ncx_block.dag()
\n(the same CX gates of cx_block
, but in reverse order);phase_block
;cx_block
.An optional keyword argument circuit_rep
(default: 1) can be passed to the\nconstructor to indicate that the original circuit is to be repeated a certain\nnumber of times (default: 1). In the optimized circuit, this is achieved by\nrepeating the phase_block
part (at point 2. above) a number of times\ngiven by the circuit_rep
argument.\nThe first and last CX blocks are left unaltered (because the intermediate CX\nblocks would cancel each other out in pairs when repeating the optimized circuit).
Readonly property exposing the topology constraining the circuit optimization.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.num_qubits", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.num_qubits", "kind": "variable", "doc": "Readonly property exposing the number of qubits spanned by the circuit to be optimized.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.circuit_rep", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.circuit_rep", "kind": "variable", "doc": "Readonly property exposing the number of times that the original circuit is\nto be repeated, for use when computing CX counts.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.phase_block", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.phase_block", "kind": "variable", "doc": "Readonly property exposing a readonly view on the phase block of the optimized circuit.
\n", "annotation": ": pauliopt.phase.phase_circuits.PhaseCircuitView"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.cx_block", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.cx_block", "kind": "variable", "doc": "Readonly property exposing a readonly view on the CX block of the optimized circuit.
\n", "annotation": ": pauliopt.phase.cx_circuits.CXCircuitView"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.init_cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.init_cx_count", "kind": "variable", "doc": "Readonly property exposing the CX count for the original circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.cx_count", "kind": "variable", "doc": "Readonly property exposing the current CX count for the optimized circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.init_cx_blocks_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.init_cx_blocks_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for the two conjugating\nCX blocks at the time the circuit was instantiated.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.cx_blocks_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.cx_blocks_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for the conjugating\nCX blocks in the currently optimized circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.init_phase_block_cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.init_phase_block_cx_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for a single\nphase block at the time the circuit was instantiated.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.phase_block_cx_count", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.phase_block_cx_count", "kind": "variable", "doc": "Readonly property exposing the overall CX count for a single\nphase block in the currently optimized circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.clone", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.clone", "kind": "function", "doc": "Returns a copy of this optimized phase circuit.
\n", "signature": "(\tself,\trng_seed: Optional[int] = None) -> pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.to_qiskit", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.to_qiskit", "kind": "function", "doc": "Returns the optimized circuit as a Qiskit circuit.
\n\nThis method relies on the qiskit
library being available.\nSpecifically, the circuit
argument must be of type\nqiskit.providers.BaseBackend
.
Simplifies the phase block according to the commutation and fusion\nrules for phase gadgets.
\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.anneal", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.anneal", "kind": "function", "doc": "Performs a cycle of simulated annealing optimization,\nusing the given number of iterations, temperature schedule,\ninitial/final temperatures.
\n\nThe circuit is modified in-place and then returned, as per the\nfluent API pattern.
\n", "signature": "(\tself,\tnum_iters: int,\t*,\tschedule: Union[Tuple[Literal['linear', 'geometric', 'reciprocal', 'log'], Union[int, float], Union[int, float]], pauliopt.utils.TempSchedule] = ('linear', 1.0, 0.1),\tloggers: pauliopt.phase.optimized_circuits.AnnealingLoggers = {}):", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.random_flip_cx", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.random_flip_cx", "kind": "function", "doc": "Randomly flips a CX gate in the CX circuit used for the optimization,\nupdating both the CX circuit and the circuit being optimized.
\n\nReturns the layer index and gate (pair of control and target) that were\nflipped (e.g. in case the flip needs to be subsequently undone).
\n", "signature": "(self) -> Tuple[int, Tuple[int, int]]:", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.is_cx_flippable", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.is_cx_flippable", "kind": "function", "doc": "Checks whether the given CX gate can be flipped in the given layer.
\n", "signature": "(self, layer_idx: int, ctrl: int, trgt: int) -> bool:", "funcdef": "def"}, {"fullname": "pauliopt.phase.optimized_circuits.OptimizedPhaseCircuit.flip_cx", "modulename": "pauliopt.phase.optimized_circuits", "qualname": "OptimizedPhaseCircuit.flip_cx", "kind": "function", "doc": "Performs the actions needed to flip the given CX gate in the given layer\nof the CX circuit used for the optimization:
\n\nReturns an SVG representation of this optimized circuit, using\nthe ZX calculus to express phase gadgets and CX gates.
\n\nThe keyword arguments zcolor
and xcolor
can be used to\nspecify a colour for the Z and X basis spiders in the circuit.\nThe keyword arguments hscale
and vscale
can be used to\nscale the circuit representation horizontally and vertically.\nThe keyword argument scale
can be used to scale the circuit\nrepresentation isotropically.\nThe keyword argument svg_code_only
(default False
) can be used\nto specify that the SVG code itself be returned, rather than the\nIPython SVG
object.
This module contains code to create circuits of mixed ZX phase gadgets.
\n"}, {"fullname": "pauliopt.phase.phase_circuits.synthesis_methods", "modulename": "pauliopt.phase.phase_circuits", "qualname": "synthesis_methods", "kind": "variable", "doc": "\n", "default_value": "['naive', 'paritysynth', 'steiner-graysynth']"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget", "kind": "class", "doc": "Immutable container class for a phase gadget.
\n"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.__init__", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.__init__", "kind": "function", "doc": "\n", "signature": "(\tbasis: Literal['Z', 'X'],\tangle: pauliopt.utils.AngleExpr,\tqubits: Collection[int])"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.basis", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.basis", "kind": "variable", "doc": "Readonly property exposing the basis for this phase gadget.
\n", "annotation": ": Literal['Z', 'X']"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.angle", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.angle", "kind": "variable", "doc": "Readonly property exposing the angle for this phase gadget.
\n", "annotation": ": pauliopt.utils.AngleExpr"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.qubits", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.qubits", "kind": "variable", "doc": "Readonly property exposing the qubits spanned by this phase gadget.
\n", "annotation": ": FrozenSet[int]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseGadget.cx_count", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseGadget.cx_count", "kind": "function", "doc": "Returns the CX count for an implementation of this phase gadget\non the given topology based on minimum spanning trees (MST).
\n\nThe optional mapping
keyword argument can be used to specify a mapping of\nlogical (circuit) qubits to phyisical (topology) qubits.
Applies this phase gadget to a given qiskit quantum circuit
,\nusing the given topology
to determine a minimum spanning\ntree implementation of the gadget.
This method relies on the qiskit
library being available.\nSpecifically, the circuit
argument must be of type\nqiskit.providers.BaseBackend
.
Prints information about an implementation of this phase gadget\non the given topology based on minimum spanning trees (MST).
\n", "signature": "(self, topology: pauliopt.topologies.Topology) -> None:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.Z", "modulename": "pauliopt.phase.phase_circuits", "qualname": "Z", "kind": "class", "doc": "Constructs a Z phase gadget with the idiomatic syntax:
\n\n Z(angle) @ qubits\n
\nConstructs an X phase gadget with the idiomatic syntax:
\n\n X(angle) @ qubits\n
\nContainer class for a circuit of mixed ZX phase gadgets.
\n", "bases": "typing.Sequence[pauliopt.phase.phase_circuits.PhaseGadget]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.__init__", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.__init__", "kind": "function", "doc": "\n", "signature": "(\tnum_qubits: int,\tgadgets: Sequence[pauliopt.phase.phase_circuits.PhaseGadget] = ())"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.num_qubits", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.num_qubits", "kind": "variable", "doc": "Readonly property exposing the number of qubits spanned by this phase circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.num_gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.num_gadgets", "kind": "variable", "doc": "Readonly property exposing the number of phase gadgets in the circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.gadgets", "kind": "variable", "doc": "Readonly property returning the sequence of phase gadgets in this\nphase circuit, in order from first to last.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": Sequence[pauliopt.phase.phase_circuits.PhaseGadget]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.as_readonly", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.as_readonly", "kind": "variable", "doc": "Returns a readonly view on this circuit.
\n", "annotation": ": pauliopt.phase.phase_circuits.PhaseCircuitView"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.set_angles", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.set_angles", "kind": "function", "doc": "Sets all angles for this circuit.
\n", "signature": "(self, angles: Sequence[pauliopt.utils.AngleExpr]) -> None:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.refresh_angle_vars", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.refresh_angle_vars", "kind": "function", "doc": "\n", "signature": "(\tself,\tparams: Union[str, Callable[[int], pauliopt.utils.AngleVar]]) -> None:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.rx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.rx", "kind": "function", "doc": "Phase gadget implementation of single-qubit X rotation.
\n", "signature": "(\tself,\tqubit: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.rz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.rz", "kind": "function", "doc": "Phase gadget implementation of single-qubit Z rotation.
\n", "signature": "(\tself,\tqubit: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ry", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ry", "kind": "function", "doc": "Phase gadget implementation of single-qubit Y rotation.
\n", "signature": "(\tself,\tqubit: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.i", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.i", "kind": "function", "doc": "Phase gadget implementation of single-qubit I gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.x", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.x", "kind": "function", "doc": "Phase gadget implementation of single-qubit X gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.z", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.z", "kind": "function", "doc": "Phase gadget implementation of single-qubit X gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.y", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.y", "kind": "function", "doc": "Phase gadget implementation of single-qubit Y gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.s", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.s", "kind": "function", "doc": "Phase gadget implementation of single-qubit S gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.sdg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.sdg", "kind": "function", "doc": "Phase gadget implementation of single-qubit Sdg gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.v", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.v", "kind": "function", "doc": "Phase gadget implementation of single-qubit S gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.vdg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.vdg", "kind": "function", "doc": "Phase gadget implementation of single-qubit Sdg gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.t", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.t", "kind": "function", "doc": "Phase gadget implementation of single-qubit T gate.
\n", "signature": "(self, qubit: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.h", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.h", "kind": "function", "doc": "Phase gadget implementation of single-qubit Hadamard gate.
\n", "signature": "(\tself,\tqubit: int,\tbasis: Literal['Z', 'X'] = 'Z',\tsign: Literal[1, -1] = 1) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cu1", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cu1", "kind": "function", "doc": "Phase gadget implementation of CU1 gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.crz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.crz", "kind": "function", "doc": "Phase gadget implementation of CRZ gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cry", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cry", "kind": "function", "doc": "Phase gadget implementation of CRY gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.crx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.crx", "kind": "function", "doc": "Phase gadget implementation of CRX gate.
\n", "signature": "(\tself,\tctrl: int,\ttgt: int,\tangle: pauliopt.utils.Angle) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cz", "kind": "function", "doc": "Phase gadget implementation of CZ gate.
\n", "signature": "(self, leg1: int, leg2: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cy", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cy", "kind": "function", "doc": "Phase gadget implementation of CY gate.
\n", "signature": "(self, leg1: int, leg2: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cx", "kind": "function", "doc": "Phase gadget implementation of CX gate.
\n", "signature": "(self, ctrl: int, tgt: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.u3", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.u3", "kind": "function", "doc": "Phase gadget implementation of U3 gate.
\n", "signature": "(\tself,\tqubit: int,\ttheta: pauliopt.utils.AngleExpr,\tphi: pauliopt.utils.AngleExpr,\tlam: pauliopt.utils.AngleExpr) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ccz", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ccz", "kind": "function", "doc": "Phase gadget implementation of CCZ gate.
\n", "signature": "(\tself,\tleg1: int,\tleg2: int,\tleg3: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ccy", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ccy", "kind": "function", "doc": "Phase gadget implementation of CCX gate.
\n", "signature": "(\tself,\tleg1: int,\tleg2: int,\tleg3: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.ccx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.ccx", "kind": "function", "doc": "Phase gadget implementation of CCX gate.
\n", "signature": "(\tself,\tleg1: int,\tleg2: int,\tleg3: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.add_gadget", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.add_gadget", "kind": "function", "doc": "Adds a phase gadget to the circuit.\nThis is rather less efficient than passing the gadgets in the constructor,\nbecause the internal numpy arrays have to be copied in the process.
\n\nThe circuit is modified in-place and then returned, as per the\nfluent interface pattern.
\n", "signature": "(\tself,\tgadget: pauliopt.phase.phase_circuits.PhaseGadget) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.copy", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.copy", "kind": "function", "doc": "\n", "signature": "(self):", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.cx_count", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.cx_count", "kind": "function", "doc": "Returns the CX count for an implementation of this phase gadget\n on the given topology based on minimum spanning trees (MST).
\n\nThe optional `mapping` keyword argument can be used to specify a mapping of\nlogical (circuit) qubits to phyisical (topology) qubits.\n
\n\nArgs:\n topology (Topology): Target device topology\n mapping (Optional[Union[Sequence[int], Dict[int, int]]], optional): Used qubit mapping. Defaults to None.\n method (Literal[\"naive\", \"paritysynth\", \"steiner\", optional): Synthesis method. Defaults to \"naive\".
\n\nRaises:\n TypeError: If topology is not a Topology and if mapping is not a permutation of range(self.num_qubits).
\n\nReturns:\n int: The CX count.
\n", "signature": "(\tself,\ttopology: pauliopt.topologies.Topology,\t*,\tmapping: Union[Sequence[int], Dict[int, int], NoneType] = None,\tmethod: Literal['naive', 'paritysynth', 'steiner-graysynth'] = 'naive') -> int:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.mapped", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.mapped", "kind": "function", "doc": "Returns a new phase circuit with the same gadgets but having\nqubits remapped according to the given mapping.
\n", "signature": "(\tself,\tmapping: Union[Sequence[int], Mapping[int, int]]) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.color_flip", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.color_flip", "kind": "function", "doc": "Returns a new phase circuit with the same gadgets but having\nall basis switched from Z to X and vice versa.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.dagger", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.dagger", "kind": "function", "doc": "Returns a new phase circuit with the same gadgets but having\nall angles negated.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.normalize", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.normalize", "kind": "function", "doc": "Fuse and reorder gadgets of the same basis.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.to_qiskit", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.to_qiskit", "kind": "function", "doc": "Generates a qiskit QuantumCircuit equivalent to this PhaseCircuit.
\n\nArgs:\n topology (Topology): Target device topology\n simplified (bool, optional): Simplifiy the PhaseCircuit before synthesis. Defaults to True.\n method (Literal[\"naive\", \"paritysynth\", \"steiner\", optional): Which method of synthesis should be used. Defaults to \"naive\".\n cx_synth (Literal[\"permrowcol\", \"naive\"], optional): Which method should be used for synthesizing the final CXCircuit. Defaults to \"naive\".\n return_cx (bool, optional): Whether to return the final CXCircuit separately without synthesizing it. Defaults to False.\n reallocate (bool, optional): Whether qubit reallocation is allowed when synthesizing the final CXCircuit. Defaults to False.
\n\nRaises:\n ModuleNotFoundError: Requires Qiskit to be installed
\n\nReturns:\n qiskit.QuantumCircuit: The synthesized equivalent circuit\n CXCircuit (optional): The final CNOTs of the circuit not yet concatinated to the qiskit circuit.
\n", "signature": "(\tself,\ttopology: pauliopt.topologies.Topology,\tsimplified: bool = True,\tmethod: Literal['naive', 'paritysynth', 'steiner-graysynth'] = 'naive',\tcx_synth: Literal['permrowcol', 'naive'] = 'naive',\treturn_cx: bool = False,\treallocate: bool = False) -> Any:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.to_svg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.to_svg", "kind": "function", "doc": "Returns an SVG representation of this circuit, using\nthe ZX calculus to express phase gadgets.
\n\nThe keyword arguments zcolor
and xcolor
can be used to\nspecify a colour for the Z and X basis spiders in the circuit.\nThe keyword arguments hscale
and vscale
can be used to\nscale the circuit representation horizontally and vertically.\nThe keyword argument scale
can be used to scale the circuit\nrepresentation isotropically.\nThe keyword argument svg_code_only
(default False
) can be used\nto specify that the SVG code itself be returned, rather than the\nIPython SVG
object.
Produces an exact copy of this phase circuit.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.conj_by_cx", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.conj_by_cx", "kind": "function", "doc": "Conjugates this circuit by a CX gate with given control/target.\nThe circuit is modified in-place and then returned, as per the\nfluent interface pattern.
\n", "signature": "(self, ctrl: int, trgt: int) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.simplified", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.simplified", "kind": "function", "doc": "Returns a new phase circuit which has been simplified using the\ncommutation and fusion rules for gadgets.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuit.random", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuit.random", "kind": "function", "doc": "Generates a random circuit of mixed ZX phase gadgets on the given number of qubits,\nwith the given number of gadgets.
\n\nThe optional argument angle_subdivision
(default: 4) can be used to specify the\ndenominator in the random fractional multiples of pi used as values for the angles.
The optional arguments min_legs
(default: 1, minimum: 1) and max_legs
\n(default: None
, minimum min_legs
) can be used to specify the minimum and maximum\nnumber of legs for the phase gadgets. If None
, max_legs
is set to len(qubits)
.
The optional argument rng_seed
(default: None
) is used as seed for the RNG.
Constructs a phase circuit from a QASM program.
\n\nAn optional mapping from QASM qubits to circuit qubits can be supplied.
\n", "signature": "(\tqasm: Union[str, pauliopt.qasm.QASM],\t*,\tmapping: Union[Sequence[int], Mapping[int, int], NoneType] = None,\tallow_classical: bool = True) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView", "kind": "class", "doc": "Readonly view on a phase circuit.
\n"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.__init__", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.__init__", "kind": "function", "doc": "\n", "signature": "(circuit: pauliopt.phase.phase_circuits.PhaseCircuit)"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.num_qubits", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.num_qubits", "kind": "variable", "doc": "Readonly property exposing the number of qubits spanned by the phase circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.num_gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.num_gadgets", "kind": "variable", "doc": "Readonly property exposing the number of phase gadgets in the circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.gadgets", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.gadgets", "kind": "variable", "doc": "Readonly property returning the sequence of phase gadgets in the\nphase circuit, in order from first to last.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": Sequence[pauliopt.phase.phase_circuits.PhaseGadget]"}, {"fullname": "pauliopt.phase.phase_circuits.PhaseCircuitView.to_svg", "modulename": "pauliopt.phase.phase_circuits", "qualname": "PhaseCircuitView.to_svg", "kind": "function", "doc": "Returns an SVG representation of this circuit, using\nthe ZX calculus to express phase gadgets.
\n\nThe keyword arguments zcolor
and xcolor
can be used to\nspecify a colour for the Z and X basis spiders in the circuit.\nThe keyword arguments hscale
and vscale
can be used to\nscale the circuit representation horizontally and vertically.\nThe keyword argument svg_code_only
(default False
) can be used\nto specify that the SVG code itself be returned, rather than the\nIPython SVG
object.
Produces an exact copy of the phase circuit.
\n", "signature": "(self) -> pauliopt.phase.phase_circuits.PhaseCircuit:", "funcdef": "def"}, {"fullname": "pauliopt.qasm", "modulename": "pauliopt.qasm", "kind": "module", "doc": "QASM file parsing
\n"}, {"fullname": "pauliopt.qasm.assert_same_size_targets", "modulename": "pauliopt.qasm", "qualname": "assert_same_size_targets", "kind": "function", "doc": "Asserts that all register targets have the same size.
\n", "signature": "(*trgts: pauliopt.qasm.QASM.RegTarget):", "funcdef": "def"}, {"fullname": "pauliopt.qasm.QASM", "modulename": "pauliopt.qasm", "qualname": "QASM", "kind": "class", "doc": "QASM program.\nBased on the QASM spec from arXiv: 1707.03429
\n", "bases": "typing.Sequence[ForwardRef('QASM.Statement')]"}, {"fullname": "pauliopt.qasm.QASM.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.__init__", "kind": "function", "doc": "\n", "signature": "(*statements: pauliopt.qasm.QASM.Statement)"}, {"fullname": "pauliopt.qasm.QASM.num_qubits", "modulename": "pauliopt.qasm", "qualname": "QASM.num_qubits", "kind": "variable", "doc": "Number of qubits in this circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.qasm.QASM.num_bits", "modulename": "pauliopt.qasm", "qualname": "QASM.num_bits", "kind": "variable", "doc": "Number of bits in this circuit.
\n", "annotation": ": int"}, {"fullname": "pauliopt.qasm.QASM.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.registers", "kind": "variable", "doc": "Iterator over the registers of this QASM program.
\n", "annotation": ": Iterator[Union[pauliopt.qasm.QASM.QReg, pauliopt.qasm.QASM.CReg]]"}, {"fullname": "pauliopt.qasm.QASM.Statement", "modulename": "pauliopt.qasm", "qualname": "QASM.Statement", "kind": "class", "doc": "QASM statement.
\n"}, {"fullname": "pauliopt.qasm.QASM.Statement.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Statement.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Statement.parse", "modulename": "pauliopt.qasm", "qualname": "QASM.Statement.parse", "kind": "function", "doc": "Attempts to parse a QASM statement from a line of code.
\n", "signature": "(line: str) -> pauliopt.qasm.QASM.Statement:", "funcdef": "def"}, {"fullname": "pauliopt.qasm.QASM.Version", "modulename": "pauliopt.qasm", "qualname": "QASM.Version", "kind": "class", "doc": "QASM version statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Version.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Version.__init__", "kind": "function", "doc": "\n", "signature": "(version: str)"}, {"fullname": "pauliopt.qasm.QASM.Version.version", "modulename": "pauliopt.qasm", "qualname": "QASM.Version.version", "kind": "variable", "doc": "QASM version.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.Reg", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg", "kind": "class", "doc": "Register.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Reg.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.__init__", "kind": "function", "doc": "\n", "signature": "(name: str, size: int)"}, {"fullname": "pauliopt.qasm.QASM.Reg.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Reg.name", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.name", "kind": "variable", "doc": "Register name.
\n"}, {"fullname": "pauliopt.qasm.QASM.Reg.size", "modulename": "pauliopt.qasm", "qualname": "QASM.Reg.size", "kind": "variable", "doc": "Register size.
\n"}, {"fullname": "pauliopt.qasm.QASM.QReg", "modulename": "pauliopt.qasm", "qualname": "QASM.QReg", "kind": "class", "doc": "Quantum register.
\n", "bases": "QASM.Reg"}, {"fullname": "pauliopt.qasm.QASM.QReg.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.QReg.__init__", "kind": "function", "doc": "\n", "signature": "(name: str, size: int)"}, {"fullname": "pauliopt.qasm.QASM.CReg", "modulename": "pauliopt.qasm", "qualname": "QASM.CReg", "kind": "class", "doc": "Classical register.
\n", "bases": "QASM.Reg"}, {"fullname": "pauliopt.qasm.QASM.CReg.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.CReg.__init__", "kind": "function", "doc": "\n", "signature": "(name: str, size: int)"}, {"fullname": "pauliopt.qasm.QASM.Include", "modulename": "pauliopt.qasm", "qualname": "QASM.Include", "kind": "class", "doc": "QASM include statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Include.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Include.__init__", "kind": "function", "doc": "\n", "signature": "(filename: str)"}, {"fullname": "pauliopt.qasm.QASM.Include.filename", "modulename": "pauliopt.qasm", "qualname": "QASM.Include.filename", "kind": "variable", "doc": "Filename.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.Comment", "modulename": "pauliopt.qasm", "qualname": "QASM.Comment", "kind": "class", "doc": "QASM comment statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Comment.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Comment.__init__", "kind": "function", "doc": "\n", "signature": "(text: str)"}, {"fullname": "pauliopt.qasm.QASM.Comment.text", "modulename": "pauliopt.qasm", "qualname": "QASM.Comment.text", "kind": "variable", "doc": "Comment text.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.RegTarget", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget", "kind": "class", "doc": "A qreg or creg target.
\n"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.__init__", "kind": "function", "doc": "\n", "signature": "(\tregister: Union[pauliopt.qasm.QASM.QReg, pauliopt.qasm.QASM.CReg],\tpos: Optional[int] = None)"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.register", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.register", "kind": "variable", "doc": "Register.
\n", "annotation": ": Union[pauliopt.qasm.QASM.QReg, pauliopt.qasm.QASM.CReg]"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.pos", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.pos", "kind": "variable", "doc": "Optional register position.
\n", "annotation": ": Optional[int]"}, {"fullname": "pauliopt.qasm.QASM.RegTarget.size", "modulename": "pauliopt.qasm", "qualname": "QASM.RegTarget.size", "kind": "variable", "doc": "Size of this target
\n"}, {"fullname": "pauliopt.qasm.QASM.QRegTarget", "modulename": "pauliopt.qasm", "qualname": "QASM.QRegTarget", "kind": "class", "doc": "A qreg target.
\n", "bases": "QASM.RegTarget"}, {"fullname": "pauliopt.qasm.QASM.QRegTarget.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.QRegTarget.__init__", "kind": "function", "doc": "\n", "signature": "(register: pauliopt.qasm.QASM.QReg, pos: Optional[int] = None)"}, {"fullname": "pauliopt.qasm.QASM.QRegTarget.register", "modulename": "pauliopt.qasm", "qualname": "QASM.QRegTarget.register", "kind": "variable", "doc": "Register.
\n", "annotation": ": pauliopt.qasm.QASM.QReg"}, {"fullname": "pauliopt.qasm.QASM.CRegTarget", "modulename": "pauliopt.qasm", "qualname": "QASM.CRegTarget", "kind": "class", "doc": "A creg target.
\n", "bases": "QASM.RegTarget"}, {"fullname": "pauliopt.qasm.QASM.CRegTarget.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.CRegTarget.__init__", "kind": "function", "doc": "\n", "signature": "(register: pauliopt.qasm.QASM.CReg, pos: Optional[int] = None)"}, {"fullname": "pauliopt.qasm.QASM.CRegTarget.register", "modulename": "pauliopt.qasm", "qualname": "QASM.CRegTarget.register", "kind": "variable", "doc": "Register.
\n", "annotation": ": pauliopt.qasm.QASM.CReg"}, {"fullname": "pauliopt.qasm.QASM.UGate", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate", "kind": "class", "doc": "Statement for a U3 gate.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.UGate.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.__init__", "kind": "function", "doc": "\n", "signature": "(\ttheta: pauliopt.utils.Angle,\tphi: pauliopt.utils.Angle,\tlam: pauliopt.utils.Angle,\tqubit: pauliopt.qasm.QASM.QRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.UGate.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.UGate.theta", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.theta", "kind": "variable", "doc": "Theta angle for the U3 gate.
\n", "annotation": ": pauliopt.utils.Angle"}, {"fullname": "pauliopt.qasm.QASM.UGate.phi", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.phi", "kind": "variable", "doc": "Phi angle for the U3 gate.
\n", "annotation": ": pauliopt.utils.Angle"}, {"fullname": "pauliopt.qasm.QASM.UGate.lam", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.lam", "kind": "variable", "doc": "Lambda angle for the U3 gate.
\n", "annotation": ": pauliopt.utils.Angle"}, {"fullname": "pauliopt.qasm.QASM.UGate.qubit", "modulename": "pauliopt.qasm", "qualname": "QASM.UGate.qubit", "kind": "variable", "doc": "Qubit/qreg for the U3 gate.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.CXGate", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate", "kind": "class", "doc": "Statement for a CX gate.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.CXGate.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.__init__", "kind": "function", "doc": "\n", "signature": "(\tcontrol: pauliopt.qasm.QASM.QRegTarget,\ttarget: pauliopt.qasm.QASM.QRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.CXGate.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.CXGate.control", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.control", "kind": "variable", "doc": "Control qubit/qreg for the CX gate.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.CXGate.target", "modulename": "pauliopt.qasm", "qualname": "QASM.CXGate.target", "kind": "variable", "doc": "Target qubit/qreg for the CX gate.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Measure", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure", "kind": "class", "doc": "Statement for a measurement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Measure.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.__init__", "kind": "function", "doc": "\n", "signature": "(\tqubit: pauliopt.qasm.QASM.QRegTarget,\tbit: pauliopt.qasm.QASM.CRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.Measure.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Measure.qubit", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.qubit", "kind": "variable", "doc": "Qubit/qreg to be measured.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Measure.bit", "modulename": "pauliopt.qasm", "qualname": "QASM.Measure.bit", "kind": "variable", "doc": "Bit/creg to store measurement outcome.
\n", "annotation": ": pauliopt.qasm.QASM.CRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Reset", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset", "kind": "class", "doc": "Statement for a reset.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Reset.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset.__init__", "kind": "function", "doc": "\n", "signature": "(qubit: pauliopt.qasm.QASM.QRegTarget)"}, {"fullname": "pauliopt.qasm.QASM.Reset.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Reset.qubit", "modulename": "pauliopt.qasm", "qualname": "QASM.Reset.qubit", "kind": "variable", "doc": "Qubit/qreg to be measured.
\n", "annotation": ": pauliopt.qasm.QASM.QRegTarget"}, {"fullname": "pauliopt.qasm.QASM.Gate", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate", "kind": "class", "doc": "Statement for a named gate.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Gate.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.__init__", "kind": "function", "doc": "\n", "signature": "(\tname: str,\ttargets: Sequence[pauliopt.qasm.QASM.RegTarget],\tparams: Sequence[pauliopt.utils.Angle] = ())"}, {"fullname": "pauliopt.qasm.QASM.Gate.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Gate.name", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.name", "kind": "variable", "doc": "Name for this gate.
\n", "annotation": ": str"}, {"fullname": "pauliopt.qasm.QASM.Gate.params", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.params", "kind": "variable", "doc": "Tuple of angle parameters for this gate.
\n", "annotation": ": Tuple[pauliopt.utils.Angle, ...]"}, {"fullname": "pauliopt.qasm.QASM.Gate.targets", "modulename": "pauliopt.qasm", "qualname": "QASM.Gate.targets", "kind": "variable", "doc": "Tuple of register targets for this gate.
\n", "annotation": ": Tuple[pauliopt.qasm.QASM.RegTarget, ...]"}, {"fullname": "pauliopt.qasm.QASM.Barrier", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier", "kind": "class", "doc": "Statement for a barrier.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Barrier.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier.__init__", "kind": "function", "doc": "\n", "signature": "(targets: Sequence[pauliopt.qasm.QASM.QRegTarget])"}, {"fullname": "pauliopt.qasm.QASM.Barrier.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Barrier.targets", "modulename": "pauliopt.qasm", "qualname": "QASM.Barrier.targets", "kind": "variable", "doc": "Tuple of register targets for this barrier.
\n", "annotation": ": Tuple[pauliopt.qasm.QASM.RegTarget, ...]"}, {"fullname": "pauliopt.qasm.QASM.Conditional", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional", "kind": "class", "doc": "Statement for a conditional statement.
\n", "bases": "QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.Conditional.__init__", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.__init__", "kind": "function", "doc": "\n", "signature": "(\tregister: pauliopt.qasm.QASM.CReg,\tvalue: int,\tstatement: pauliopt.qasm.QASM.Statement)"}, {"fullname": "pauliopt.qasm.QASM.Conditional.registers", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.registers", "kind": "variable", "doc": "List of registers involved in this statement.
\n", "annotation": ": Sequence[pauliopt.qasm.QASM.Reg]"}, {"fullname": "pauliopt.qasm.QASM.Conditional.register", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.register", "kind": "variable", "doc": "The register being tested in this conditional statement.
\n", "annotation": ": pauliopt.qasm.QASM.CReg"}, {"fullname": "pauliopt.qasm.QASM.Conditional.value", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.value", "kind": "variable", "doc": "The register value being tested in this conditional statement.
\n", "annotation": ": int"}, {"fullname": "pauliopt.qasm.QASM.Conditional.statement", "modulename": "pauliopt.qasm", "qualname": "QASM.Conditional.statement", "kind": "variable", "doc": "The statement to execute if the given creg has the given value.
\n", "annotation": ": pauliopt.qasm.QASM.Statement"}, {"fullname": "pauliopt.qasm.QASM.parse", "modulename": "pauliopt.qasm", "qualname": "QASM.parse", "kind": "function", "doc": "Parses a QASM program into a QASM
object.
This module contains utility code to deal with qubit topologies.
\n"}, {"fullname": "pauliopt.topologies.Coupling", "modulename": "pauliopt.topologies", "qualname": "Coupling", "kind": "class", "doc": "Type for couplings in a qubit topology, i.e. unordered\npairs of adjacent qubits.
\n", "bases": "typing.FrozenSet[int]"}, {"fullname": "pauliopt.topologies.Coupling.as_pair", "modulename": "pauliopt.topologies", "qualname": "Coupling.as_pair", "kind": "variable", "doc": "Returns the coupling as a (increasingly) ordered pair.
\n", "annotation": ": Tuple[int, int]"}, {"fullname": "pauliopt.topologies.CouplingLike", "modulename": "pauliopt.topologies", "qualname": "CouplingLike", "kind": "variable", "doc": "Type alias for things that could be used to specify couplings,\nnamely any collection of int
(subject to additional restrictions).
In an ideal world, this should be \"int collections of len 2\",\nbut static typing does not yet allow for such a constraint.
\n", "default_value": "typing.Collection[int]"}, {"fullname": "pauliopt.topologies.TopologyDict", "modulename": "pauliopt.topologies", "qualname": "TopologyDict", "kind": "class", "doc": "The type of the dictionary returned by Topology.as_dict
,\nsuitable for JSON serialization.
Property exposing the number of qubits in the topology.
\n", "annotation": ": int"}, {"fullname": "pauliopt.topologies.TopologyDict.couplings", "modulename": "pauliopt.topologies", "qualname": "TopologyDict.couplings", "kind": "variable", "doc": "Property exposing the couplings between qubits in the topology.
\n", "annotation": ": List[List[int]]"}, {"fullname": "pauliopt.topologies.Layouts", "modulename": "pauliopt.topologies", "qualname": "Layouts", "kind": "variable", "doc": "Possible layout values for Topology.draw
Container class for a qubit topology.
\n"}, {"fullname": "pauliopt.topologies.Topology.__init__", "modulename": "pauliopt.topologies", "qualname": "Topology.__init__", "kind": "function", "doc": "\n", "signature": "(num_qubits: int, couplings: Collection[Collection[int]])"}, {"fullname": "pauliopt.topologies.Topology.num_qubits", "modulename": "pauliopt.topologies", "qualname": "Topology.num_qubits", "kind": "variable", "doc": "Readonly property returning the number of qubits in this topology.
\n", "annotation": ": int"}, {"fullname": "pauliopt.topologies.Topology.qubits", "modulename": "pauliopt.topologies", "qualname": "Topology.qubits", "kind": "variable", "doc": "Readonly property returning the range of qubits in this topology.
\n", "annotation": ": range"}, {"fullname": "pauliopt.topologies.Topology.couplings", "modulename": "pauliopt.topologies", "qualname": "Topology.couplings", "kind": "variable", "doc": "Readonly property exposing the couplings between qubits in this topology.
\n", "annotation": ": FrozenSet[pauliopt.topologies.Coupling]"}, {"fullname": "pauliopt.topologies.Topology.as_dict", "modulename": "pauliopt.topologies", "qualname": "Topology.as_dict", "kind": "variable", "doc": "Readonly property returning this topology as\na dictionary, for serialization purposes.
\n", "annotation": ": Union[str, pauliopt.topologies.TopologyDict]"}, {"fullname": "pauliopt.topologies.Topology.is_planar", "modulename": "pauliopt.topologies", "qualname": "Topology.is_planar", "kind": "variable", "doc": "Whether this qubit topology is a planar graph.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.topologies.Topology.available_nx_layouts", "modulename": "pauliopt.topologies", "qualname": "Topology.available_nx_layouts", "kind": "variable", "doc": "Readonly property returning the available layouts for this qubit topology.
\n", "annotation": ": Tuple[str, ...]"}, {"fullname": "pauliopt.topologies.Topology.to_nx", "modulename": "pauliopt.topologies", "qualname": "Topology.to_nx", "kind": "variable", "doc": "Readonly property returning a NetworkX graph version of this topology.\nRequires the 'networkx' library to work.
\n"}, {"fullname": "pauliopt.topologies.Topology.draw", "modulename": "pauliopt.topologies", "qualname": "Topology.draw", "kind": "function", "doc": "Draws this qubit topology using NetworkX and Matplotlib.
\n\nThe layout
keyword argument can be used to select a NetworkX layout\nfrom the available ones (exposed by Topology.available_nx_layouts
).\nThe figsize
keyword argument is passed to matplotlib.pyplot.figure
:\nif specified, it determines the width and height of the figure being drawn.\nKeyword arguments kwargs
are those of networkx.draw_networkx
.\nIf the keyword argument filename
is set, the figure is also saved.
Readonly property exposing the (frozen) set of qubits adjacent\nto (i.e. couple with) the given qubit.
\n", "signature": "(self, qubit: int) -> FrozenSet[int]:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.incident", "modulename": "pauliopt.topologies", "qualname": "Topology.incident", "kind": "function", "doc": "Readonly property returning an iterator running over all couplings\nincident onto the given qubit.
\n\nThis is returned as an iterator, rather than a collection,\nbecause the couplings are generated on the fly (i.e. this is not\nmerely exposing some internal collection).
\n", "signature": "(self, qubit: int) -> Iterator[pauliopt.topologies.Coupling]:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.dist", "modulename": "pauliopt.topologies", "qualname": "Topology.dist", "kind": "function", "doc": "Returns the distance between two given qubits in the topology.
\n", "signature": "(self, fro: int, to: int) -> int:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.mapped_fwd", "modulename": "pauliopt.topologies", "qualname": "Topology.mapped_fwd", "kind": "function", "doc": "Returns a topology with the same couplings, but remapping the qubits using\nthe given mapping.
\n", "signature": "(\tself,\tmapping: Union[Sequence[int], Dict[int, int]]) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.shortest_path", "modulename": "pauliopt.topologies", "qualname": "Topology.shortest_path", "kind": "function", "doc": "Computes the shortest path using the next lookup table from the Floyd\u2013Warshall algorithm
\n", "signature": "(self, fro: int, to: int):", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.steiner_tree", "modulename": "pauliopt.topologies", "qualname": "Topology.steiner_tree", "kind": "function", "doc": "Computes the Steiner tree over the topology with given terminals.\nsubgraph
can be used to find the Steiner tree of a subgraph of the topology.\nRequires networkx to be installed to work.\nReturns a networkx Graph.
Returns a topology with the same couplings, but remapping the qubits using\nthe inverse of the given mapping.
\n", "signature": "(\tself,\tmapping: Union[Sequence[int], Dict[int, int]]) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.from_dict", "modulename": "pauliopt.topologies", "qualname": "Topology.from_dict", "kind": "function", "doc": "Creates a Topology
instance from a dictionary in the\nformat obtained from Topology.as_dict
,\nfor de-serialization purposes.
Creates a line topology on the given number of qubits.
\n", "signature": "(num_qubits: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.cycle", "modulename": "pauliopt.topologies", "qualname": "Topology.cycle", "kind": "function", "doc": "Creates a cycle topology on the given number of qubits.
\n", "signature": "(num_qubits: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.complete", "modulename": "pauliopt.topologies", "qualname": "Topology.complete", "kind": "function", "doc": "Creates a complete topology on the given number of qubits.
\n", "signature": "(num_qubits: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.grid", "modulename": "pauliopt.topologies", "qualname": "Topology.grid", "kind": "function", "doc": "Creates a grid topology with the given number of rows and cols.\nQubits are indexed by rows.
\n", "signature": "(num_rows: int, num_cols: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.periodic_grid", "modulename": "pauliopt.topologies", "qualname": "Topology.periodic_grid", "kind": "function", "doc": "Creates a periodic grid topology with the given number of rows and cols.\nQubits are indexed by rows.
\n", "signature": "(num_rows: int, num_cols: int) -> pauliopt.topologies.Topology:", "funcdef": "def"}, {"fullname": "pauliopt.topologies.Topology.from_qiskit_config", "modulename": "pauliopt.topologies", "qualname": "Topology.from_qiskit_config", "kind": "function", "doc": "Static method to construct the topology from a\nQiskit backend configuration.
\n\nThis method relies on the qiskit
library being available.\nSpecifically, the config
argument must be of type\nqiskit.providers.models.QasmBackendConfiguration
.
Static method to construct the topology from a Qiskit backend.
\n\nThis method relies on the qiskit
library being available.\nSpecifically, the backend
argument must be of type\nqiskit.providers.Backend
.
Mutable container class for a matching on a qubit topology.
\n"}, {"fullname": "pauliopt.topologies.Matching.__init__", "modulename": "pauliopt.topologies", "qualname": "Matching.__init__", "kind": "function", "doc": "\n", "signature": "(topology: pauliopt.topologies.Topology)"}, {"fullname": "pauliopt.topologies.Matching.topology", "modulename": "pauliopt.topologies", "qualname": "Matching.topology", "kind": "variable", "doc": "Readonly property exposing the qubit topology\nunderlying this matching.
\n", "annotation": ": pauliopt.topologies.Topology"}, {"fullname": "pauliopt.topologies.Matching.matched_couplings", "modulename": "pauliopt.topologies", "qualname": "Matching.matched_couplings", "kind": "variable", "doc": "Readonly property returning the collection of couplings\ncurrently in this matching.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[pauliopt.topologies.Coupling]"}, {"fullname": "pauliopt.topologies.Matching.matched_qubits", "modulename": "pauliopt.topologies", "qualname": "Matching.matched_qubits", "kind": "variable", "doc": "Readonly property returning the collection of qubits\ncurrently matched in this matching.
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[int]"}, {"fullname": "pauliopt.topologies.Matching.flippable_couplings", "modulename": "pauliopt.topologies", "qualname": "Matching.flippable_couplings", "kind": "variable", "doc": "Readonly property returning the collection of couplings\nthat can be currently flipped in this matching, namely:
\n\nThis collection is freshly generated at every call.
\n", "annotation": ": FrozenSet[pauliopt.topologies.Coupling]"}, {"fullname": "pauliopt.topologies.Matching.incident", "modulename": "pauliopt.topologies", "qualname": "Matching.incident", "kind": "function", "doc": "Returns the coupling incident to the given qubit in this matching,\nor None
if the qubit is not matched.
Checks whether the coupling can be flipped:
\n\nFlips the given coupling in the matching (removes it if it is already present,\nadds it if it is not yed present and can be added).\nRaises ValueError
if the coupling is not flippable.
The matching is modified in-place and then returned, as per the\nfluent API pattern.
\n", "signature": "(self, coupling: Collection[int]) -> pauliopt.topologies.Matching:", "funcdef": "def"}, {"fullname": "pauliopt.utils", "modulename": "pauliopt.utils", "kind": "module", "doc": "Utility classes and functions for the pauliopt
library.
A container class for angle expressions.
\n", "bases": "abc.ABC"}, {"fullname": "pauliopt.utils.AngleExpr.repr_latex", "modulename": "pauliopt.utils", "qualname": "AngleExpr.repr_latex", "kind": "variable", "doc": "LaTeX math mode representation of this number.
\n", "annotation": ": str"}, {"fullname": "pauliopt.utils.AngleExpr.to_qiskit", "modulename": "pauliopt.utils", "qualname": "AngleExpr.to_qiskit", "kind": "variable", "doc": "\n", "annotation": ": Any"}, {"fullname": "pauliopt.utils.AngleExpr.is_zero", "modulename": "pauliopt.utils", "qualname": "AngleExpr.is_zero", "kind": "variable", "doc": "\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.AngleExpr.is_pi", "modulename": "pauliopt.utils", "qualname": "AngleExpr.is_pi", "kind": "variable", "doc": "\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.AngleExpr.is_zero_or_pi", "modulename": "pauliopt.utils", "qualname": "AngleExpr.is_zero_or_pi", "kind": "variable", "doc": "\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle", "modulename": "pauliopt.utils", "qualname": "Angle", "kind": "class", "doc": "A container class for angles,\nas rational multiples of PI modulo 2PI.
\n", "bases": "AngleExpr"}, {"fullname": "pauliopt.utils.Angle.__init__", "modulename": "pauliopt.utils", "qualname": "Angle.__init__", "kind": "function", "doc": "\n", "signature": "(\ttheta: Union[pauliopt.utils.Angle, int, fractions.Fraction, str, decimal.Decimal])"}, {"fullname": "pauliopt.utils.Angle.value", "modulename": "pauliopt.utils", "qualname": "Angle.value", "kind": "variable", "doc": "The value of this angle as a fraction of PI.
\n", "annotation": ": fractions.Fraction"}, {"fullname": "pauliopt.utils.Angle.as_root_of_unity", "modulename": "pauliopt.utils", "qualname": "Angle.as_root_of_unity", "kind": "variable", "doc": "Returns (a,n)
where n
is the smallest such\nthat this angle is an $n$-th root of unity\nand 0 <= a < n
such that this is $e^{i 2\\pi \\frac{a}{n}}$
The order of this angle as a root of unity.
\n", "annotation": ": int"}, {"fullname": "pauliopt.utils.Angle.is_zero_or_pi", "modulename": "pauliopt.utils", "qualname": "Angle.is_zero_or_pi", "kind": "variable", "doc": "Whether this angle is a multiple of pi.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle.is_zero", "modulename": "pauliopt.utils", "qualname": "Angle.is_zero", "kind": "variable", "doc": "Whether this angle is a multiple of 2pi.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle.is_pi", "modulename": "pauliopt.utils", "qualname": "Angle.is_pi", "kind": "variable", "doc": "Whether this angle is an odd multiple of pi.
\n", "annotation": ": bool"}, {"fullname": "pauliopt.utils.Angle.to_qiskit", "modulename": "pauliopt.utils", "qualname": "Angle.to_qiskit", "kind": "variable", "doc": "\n", "annotation": ": float"}, {"fullname": "pauliopt.utils.Angle.repr_latex", "modulename": "pauliopt.utils", "qualname": "Angle.repr_latex", "kind": "variable", "doc": "LaTeX math mode representation of this number.
\n", "annotation": ": str"}, {"fullname": "pauliopt.utils.Angle.random", "modulename": "pauliopt.utils", "qualname": "Angle.random", "kind": "function", "doc": "Generates a random angle with the given subdivision
:\nr * pi/subdivision
for random r in range(2*subdivision)
.
A constant for the angle 0.
\n", "annotation": ": Final[pauliopt.utils.Angle]", "default_value": "0"}, {"fullname": "pauliopt.utils.Angle.pi", "modulename": "pauliopt.utils", "qualname": "Angle.pi", "kind": "variable", "doc": "A constant for the angle pi.
\n", "annotation": ": Final[pauliopt.utils.Angle]", "default_value": "pi"}, {"fullname": "pauliopt.utils.pi", "modulename": "pauliopt.utils", "qualname": "pi", "kind": "variable", "doc": "Constant for Angle.pi
.
Constant for Angle.pi
.
A container class for angle expressions.
\n", "bases": "AngleExpr"}, {"fullname": "pauliopt.utils.AngleVar.__init__", "modulename": "pauliopt.utils", "qualname": "AngleVar.__init__", "kind": "function", "doc": "\n", "signature": "(label: str, latex_label: Optional[str] = None)"}, {"fullname": "pauliopt.utils.AngleVar.to_qiskit", "modulename": "pauliopt.utils", "qualname": "AngleVar.to_qiskit", "kind": "variable", "doc": "\n", "annotation": ": Any"}, {"fullname": "pauliopt.utils.AngleVar.repr_latex", "modulename": "pauliopt.utils", "qualname": "AngleVar.repr_latex", "kind": "variable", "doc": "LaTeX math mode representation of this number.
\n", "annotation": ": str"}, {"fullname": "pauliopt.utils.SVGBuilder", "modulename": "pauliopt.utils", "qualname": "SVGBuilder", "kind": "class", "doc": "Utility class for building certain SVG images.\nFollows the Fluent interface pattern.
\n"}, {"fullname": "pauliopt.utils.SVGBuilder.__init__", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.__init__", "kind": "function", "doc": "\n", "signature": "(width: int, height: int)"}, {"fullname": "pauliopt.utils.SVGBuilder.width", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.width", "kind": "variable", "doc": "The figure width.
\n", "annotation": ": int"}, {"fullname": "pauliopt.utils.SVGBuilder.height", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.height", "kind": "variable", "doc": "The figure height.
\n", "annotation": ": int"}, {"fullname": "pauliopt.utils.SVGBuilder.tags", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.tags", "kind": "variable", "doc": "The current sequence of tags.
\n", "annotation": ": Sequence[str]"}, {"fullname": "pauliopt.utils.SVGBuilder.line", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.line", "kind": "function", "doc": "Draws a line from given coordinates to given coordinates.
\n", "signature": "(\tself,\tfro: Tuple[int, int],\tto: Tuple[int, int]) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.line_bend", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.line_bend", "kind": "function", "doc": "\n", "signature": "(\tself,\tfro: Tuple[int, int],\tto: Tuple[int, int],\tleft=False,\tdegree=5):", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.add_diagonal_fill", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.add_diagonal_fill", "kind": "function", "doc": "\n", "signature": "(self, color_1: str, color_2: str, id: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.square", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.square", "kind": "function", "doc": "\n", "signature": "(\tself,\tcentre: Tuple[int, int],\twidth: int,\theight: int,\tfill) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.text_with_square", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.text_with_square", "kind": "function", "doc": "\n", "signature": "(\tself,\tcentre: Tuple[int, int],\twidth: int,\theight: int,\ttext: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.circle", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.circle", "kind": "function", "doc": "Draws a circle with given centre and radius.
\n", "signature": "(\tself,\tcentre: Tuple[int, int],\tr: int,\tfill: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.rect", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.rect", "kind": "function", "doc": "Draws a rectangle with given centre, width and height.
\n", "signature": "(\tself,\tcentre: Tuple[int, int],\twidth: int,\theight: int,\tfill: str) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.SVGBuilder.text", "modulename": "pauliopt.utils", "qualname": "SVGBuilder.text", "kind": "function", "doc": "Draws text at the given position (stroke/fill not used).
\n", "signature": "(\tself,\tpos: Tuple[int, int],\ttext: str,\t*,\tfont_size: int = 10,\tcenter=False) -> pauliopt.utils.SVGBuilder:", "funcdef": "def"}, {"fullname": "pauliopt.utils.TempSchedule", "modulename": "pauliopt.utils", "qualname": "TempSchedule", "kind": "class", "doc": "Protocol for a temperature schedule.\nThe temperature is a number (int or float) computed from the iteration\nnumber it
(starting from 0) and the total number of iterations num_iter
\n(passed as a keyword argument).
Protocol for a function constructing a temperature schedule\nfrom an initial and final temperatures.
\n", "bases": "typing.Protocol"}, {"fullname": "pauliopt.utils.TempScheduleProvider.__init__", "modulename": "pauliopt.utils", "qualname": "TempScheduleProvider.__init__", "kind": "function", "doc": "\n", "signature": "(*args, **kwargs)"}, {"fullname": "pauliopt.utils.linear_temp_schedule", "modulename": "pauliopt.utils", "qualname": "linear_temp_schedule", "kind": "function", "doc": "Returns a straight/linear temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.geometric_temp_schedule", "modulename": "pauliopt.utils", "qualname": "geometric_temp_schedule", "kind": "function", "doc": "Returns a geometric temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.reciprocal_temp_schedule", "modulename": "pauliopt.utils", "qualname": "reciprocal_temp_schedule", "kind": "function", "doc": "Returns a reciprocal temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.log_temp_schedule", "modulename": "pauliopt.utils", "qualname": "log_temp_schedule", "kind": "function", "doc": "Returns a logarithmic temperature schedule for given initial and final temperatures,\nfrom https://link.springer.com/article/10.1007/BF00143921
\n", "signature": "(\tt_init: Union[int, float],\tt_final: Union[int, float]) -> pauliopt.utils.TempSchedule:", "funcdef": "def"}, {"fullname": "pauliopt.utils.StandardTempScheduleName", "modulename": "pauliopt.utils", "qualname": "StandardTempScheduleName", "kind": "variable", "doc": "Names of the standard temperature schedules.
\n", "default_value": "typing.Literal['linear', 'geometric', 'reciprocal', 'log']"}, {"fullname": "pauliopt.utils.StandardTempSchedule", "modulename": "pauliopt.utils", "qualname": "StandardTempSchedule", "kind": "variable", "doc": "Type for standard temperature schedules.
\n", "default_value": "typing.Tuple[typing.Literal['linear', 'geometric', 'reciprocal', 'log'], typing.Union[int, float], typing.Union[int, float]]"}, {"fullname": "pauliopt.utils.StandardTempSchedules", "modulename": "pauliopt.utils", "qualname": "StandardTempSchedules", "kind": "variable", "doc": "Dictionary of standard temperature schedule providers.
\n", "annotation": ": Final[Mapping[Literal['linear', 'geometric', 'reciprocal', 'log'], pauliopt.utils.TempScheduleProvider]]", "default_value": "{'linear': <function linear_temp_schedule>, 'geometric': <function geometric_temp_schedule>, 'reciprocal': <function reciprocal_temp_schedule>, 'log': <function log_temp_schedule>}"}]; // mirrored in build-search-index.js (part 1) // Also split on html tags. this is a cheap heuristic, but good enough. diff --git a/notebooks/2. Circuits of Phase Gadgets.ipynb b/notebooks/2. Circuits of Phase Gadgets.ipynb index 8754c565..0a40121f 100644 --- a/notebooks/2. Circuits of Phase Gadgets.ipynb +++ b/notebooks/2. Circuits of Phase Gadgets.ipynb @@ -26,15 +26,6 @@ "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Current working directory: C:\\Users\\Stefa\\Documents\\git\\pauliopt\n" - ] - } - ], "source": [ "import os\n", "DEBUG = True\n", @@ -48,7 +39,8 @@ " original_wd = os.getcwd()\n", " os.chdir('../')\n", "print(\"Current working directory: %s\"%str(os.getcwd()))" - ] + ], + "outputs": [] }, { "cell_type": "markdown", @@ -65,23 +57,14 @@ "cell_type": "code", "execution_count": 2, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "⎯⎯cx(0,1)⟶\n", - "\n", - "
⎯⎯cx(0,1)⟶\", svg_after)" - ] + ], + "outputs": [] }, { "cell_type": "markdown", @@ -1337,61 +620,13 @@ "cell_type": "code", "execution_count": 23, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
⎯⎯cx(0,1)⎯⎯cx(1,2)⟶\n", - "\n", - "
⎯⎯cx(0,1)⎯⎯cx(1,2)⟶\", svg_after)" - ] + ], + "outputs": [] }, { "cell_type": "markdown", @@ -1408,143 +643,12 @@ "cell_type": "code", "execution_count": 24, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Original: \n" - ] - }, - { - "data": { - "image/svg+xml": [ - "\n", - "\n", - "" - ], - "text/plain": [ - "