{"payload":{"allShortcutsEnabled":false,"fileTree":{"qiskit/transpiler/passes/layout":{"items":[{"name":"__init__.py","path":"qiskit/transpiler/passes/layout/__init__.py","contentType":"file"},{"name":"_csp_custom_solver.py","path":"qiskit/transpiler/passes/layout/_csp_custom_solver.py","contentType":"file"},{"name":"apply_layout.py","path":"qiskit/transpiler/passes/layout/apply_layout.py","contentType":"file"},{"name":"csp_layout.py","path":"qiskit/transpiler/passes/layout/csp_layout.py","contentType":"file"},{"name":"dense_layout.py","path":"qiskit/transpiler/passes/layout/dense_layout.py","contentType":"file"},{"name":"disjoint_utils.py","path":"qiskit/transpiler/passes/layout/disjoint_utils.py","contentType":"file"},{"name":"enlarge_with_ancilla.py","path":"qiskit/transpiler/passes/layout/enlarge_with_ancilla.py","contentType":"file"},{"name":"full_ancilla_allocation.py","path":"qiskit/transpiler/passes/layout/full_ancilla_allocation.py","contentType":"file"},{"name":"layout_2q_distance.py","path":"qiskit/transpiler/passes/layout/layout_2q_distance.py","contentType":"file"},{"name":"sabre_layout.py","path":"qiskit/transpiler/passes/layout/sabre_layout.py","contentType":"file"},{"name":"sabre_pre_layout.py","path":"qiskit/transpiler/passes/layout/sabre_pre_layout.py","contentType":"file"},{"name":"set_layout.py","path":"qiskit/transpiler/passes/layout/set_layout.py","contentType":"file"},{"name":"trivial_layout.py","path":"qiskit/transpiler/passes/layout/trivial_layout.py","contentType":"file"},{"name":"vf2_layout.py","path":"qiskit/transpiler/passes/layout/vf2_layout.py","contentType":"file"},{"name":"vf2_post_layout.py","path":"qiskit/transpiler/passes/layout/vf2_post_layout.py","contentType":"file"},{"name":"vf2_utils.py","path":"qiskit/transpiler/passes/layout/vf2_utils.py","contentType":"file"}],"totalCount":16},"qiskit/transpiler/passes":{"items":[{"name":"analysis","path":"qiskit/transpiler/passes/analysis","contentType":"directory"},{"name":"basis","path":"qiskit/transpiler/passes/basis","contentType":"directory"},{"name":"calibration","path":"qiskit/transpiler/passes/calibration","contentType":"directory"},{"name":"layout","path":"qiskit/transpiler/passes/layout","contentType":"directory"},{"name":"optimization","path":"qiskit/transpiler/passes/optimization","contentType":"directory"},{"name":"routing","path":"qiskit/transpiler/passes/routing","contentType":"directory"},{"name":"scheduling","path":"qiskit/transpiler/passes/scheduling","contentType":"directory"},{"name":"synthesis","path":"qiskit/transpiler/passes/synthesis","contentType":"directory"},{"name":"utils","path":"qiskit/transpiler/passes/utils","contentType":"directory"},{"name":"__init__.py","path":"qiskit/transpiler/passes/__init__.py","contentType":"file"}],"totalCount":10},"qiskit/transpiler":{"items":[{"name":"passes","path":"qiskit/transpiler/passes","contentType":"directory"},{"name":"preset_passmanagers","path":"qiskit/transpiler/preset_passmanagers","contentType":"directory"},{"name":"__init__.py","path":"qiskit/transpiler/__init__.py","contentType":"file"},{"name":"basepasses.py","path":"qiskit/transpiler/basepasses.py","contentType":"file"},{"name":"coupling.py","path":"qiskit/transpiler/coupling.py","contentType":"file"},{"name":"exceptions.py","path":"qiskit/transpiler/exceptions.py","contentType":"file"},{"name":"instruction_durations.py","path":"qiskit/transpiler/instruction_durations.py","contentType":"file"},{"name":"layout.py","path":"qiskit/transpiler/layout.py","contentType":"file"},{"name":"passmanager.py","path":"qiskit/transpiler/passmanager.py","contentType":"file"},{"name":"passmanager_config.py","path":"qiskit/transpiler/passmanager_config.py","contentType":"file"},{"name":"target.py","path":"qiskit/transpiler/target.py","contentType":"file"},{"name":"timing_constraints.py","path":"qiskit/transpiler/timing_constraints.py","contentType":"file"}],"totalCount":12},"qiskit":{"items":[{"name":"assembler","path":"qiskit/assembler","contentType":"directory"},{"name":"circuit","path":"qiskit/circuit","contentType":"directory"},{"name":"compiler","path":"qiskit/compiler","contentType":"directory"},{"name":"converters","path":"qiskit/converters","contentType":"directory"},{"name":"dagcircuit","path":"qiskit/dagcircuit","contentType":"directory"},{"name":"passmanager","path":"qiskit/passmanager","contentType":"directory"},{"name":"primitives","path":"qiskit/primitives","contentType":"directory"},{"name":"providers","path":"qiskit/providers","contentType":"directory"},{"name":"pulse","path":"qiskit/pulse","contentType":"directory"},{"name":"qasm","path":"qiskit/qasm","contentType":"directory"},{"name":"qasm2","path":"qiskit/qasm2","contentType":"directory"},{"name":"qasm3","path":"qiskit/qasm3","contentType":"directory"},{"name":"qobj","path":"qiskit/qobj","contentType":"directory"},{"name":"qpy","path":"qiskit/qpy","contentType":"directory"},{"name":"quantum_info","path":"qiskit/quantum_info","contentType":"directory"},{"name":"result","path":"qiskit/result","contentType":"directory"},{"name":"scheduler","path":"qiskit/scheduler","contentType":"directory"},{"name":"synthesis","path":"qiskit/synthesis","contentType":"directory"},{"name":"transpiler","path":"qiskit/transpiler","contentType":"directory"},{"name":"utils","path":"qiskit/utils","contentType":"directory"},{"name":"visualization","path":"qiskit/visualization","contentType":"directory"},{"name":"VERSION.txt","path":"qiskit/VERSION.txt","contentType":"file"},{"name":"__init__.py","path":"qiskit/__init__.py","contentType":"file"},{"name":"exceptions.py","path":"qiskit/exceptions.py","contentType":"file"},{"name":"user_config.py","path":"qiskit/user_config.py","contentType":"file"},{"name":"version.py","path":"qiskit/version.py","contentType":"file"}],"totalCount":26},"":{"items":[{"name":".azure","path":".azure","contentType":"directory"},{"name":".binder","path":".binder","contentType":"directory"},{"name":".cargo","path":".cargo","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":"crates","path":"crates","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"examples","path":"examples","contentType":"directory"},{"name":"qiskit","path":"qiskit","contentType":"directory"},{"name":"releasenotes","path":"releasenotes","contentType":"directory"},{"name":"test","path":"test","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".git-blame-ignore-revs","path":".git-blame-ignore-revs","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".local-spellings","path":".local-spellings","contentType":"file"},{"name":".mailmap","path":".mailmap","contentType":"file"},{"name":".mergify.yml","path":".mergify.yml","contentType":"file"},{"name":".stestr.conf","path":".stestr.conf","contentType":"file"},{"name":"CITATION.bib","path":"CITATION.bib","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"Cargo.lock","path":"Cargo.lock","contentType":"file"},{"name":"Cargo.toml","path":"Cargo.toml","contentType":"file"},{"name":"DEPRECATION.md","path":"DEPRECATION.md","contentType":"file"},{"name":"LICENSE.txt","path":"LICENSE.txt","contentType":"file"},{"name":"MAINTAINING.md","path":"MAINTAINING.md","contentType":"file"},{"name":"MANIFEST.in","path":"MANIFEST.in","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"SECURITY.md","path":"SECURITY.md","contentType":"file"},{"name":"asv.conf.json","path":"asv.conf.json","contentType":"file"},{"name":"azure-pipelines.yml","path":"azure-pipelines.yml","contentType":"file"},{"name":"constraints.txt","path":"constraints.txt","contentType":"file"},{"name":"pyproject.toml","path":"pyproject.toml","contentType":"file"},{"name":"qiskit_bot.yaml","path":"qiskit_bot.yaml","contentType":"file"},{"name":"requirements-dev.txt","path":"requirements-dev.txt","contentType":"file"},{"name":"requirements-optional.txt","path":"requirements-optional.txt","contentType":"file"},{"name":"requirements.txt","path":"requirements.txt","contentType":"file"},{"name":"rust-toolchain.toml","path":"rust-toolchain.toml","contentType":"file"},{"name":"setup.py","path":"setup.py","contentType":"file"},{"name":"tox.ini","path":"tox.ini","contentType":"file"}],"totalCount":41}},"fileTreeProcessingTime":17.013251,"foldersToFetch":[],"repo":{"id":83821669,"defaultBranch":"main","name":"qiskit","ownerLogin":"Qiskit","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2017-03-03T17:02:42.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/30696987?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"main","listCacheKey":"v0:1710785011.0","canEdit":false,"refType":"branch","currentOid":"43381ae1b159c01b55159d2dc1e8a65970b72746"},"path":"qiskit/transpiler/passes/layout/full_ancilla_allocation.py","currentUser":null,"blob":{"rawLines":["# This code is part of Qiskit.","#","# (C) Copyright IBM 2017, 2023.","#","# This code is licensed under the Apache License, Version 2.0. You may","# obtain a copy of this license in the LICENSE.txt file in the root directory","# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.","#","# Any modifications or derivative works of this code must retain this","# copyright notice, and modified files need to carry a notice indicating","# that they have been altered from the originals.","","\"\"\"Allocate all idle nodes from the coupling map as ancilla on the layout.\"\"\"","","from qiskit.circuit import QuantumRegister","from qiskit.transpiler.basepasses import AnalysisPass","from qiskit.transpiler.exceptions import TranspilerError","from qiskit.transpiler.target import Target","","","class FullAncillaAllocation(AnalysisPass):"," \"\"\"Allocate all idle nodes from the coupling map or target as ancilla on the layout.",""," A pass for allocating all idle physical qubits (those that exist in coupling"," map or target but not the dag circuit) as ancilla. It will also choose new"," virtual qubits to correspond to those physical ancilla.",""," Note:"," This is an analysis pass, and only responsible for choosing physical"," ancilla locations and their corresponding virtual qubits."," A separate transformation pass must add those virtual qubits to the"," circuit."," \"\"\"",""," def __init__(self, coupling_map):"," \"\"\"FullAncillaAllocation initializer.",""," Args:"," coupling_map (Union[CouplingMap, Target]): directed graph representing a coupling map."," \"\"\""," super().__init__()"," if isinstance(coupling_map, Target):"," self.target = coupling_map"," self.coupling_map = self.target.build_coupling_map()"," else:"," self.target = None"," self.coupling_map = coupling_map"," self.ancilla_name = \"ancilla\"",""," def run(self, dag):"," \"\"\"Run the FullAncillaAllocation pass on `dag`.",""," Extend the layout with new (physical qubit, virtual qubit) pairs."," The dag signals which virtual qubits are already in the circuit."," This pass will allocate new virtual qubits such that no collision occurs"," (i.e. Layout bijectivity is preserved)",""," The coupling_map and layout together determine which physical qubits are free.",""," Args:"," dag (DAGCircuit): circuit to analyze",""," Returns:"," DAGCircuit: returns the same dag circuit, unmodified",""," Raises:"," TranspilerError: If there is not layout in the property set or not set at init time."," \"\"\""," layout = self.property_set.get(\"layout\")",""," if layout is None:"," raise TranspilerError('FullAncillaAllocation pass requires property_set[\"layout\"].')",""," virtual_bits = layout.get_virtual_bits()"," physical_bits = layout.get_physical_bits()"," if layout:"," FullAncillaAllocation.validate_layout(virtual_bits, set(dag.qubits))"," layout_physical_qubits = list(range(max(physical_bits) + 1))"," else:"," layout_physical_qubits = []",""," idle_physical_qubits = [q for q in layout_physical_qubits if q not in physical_bits]",""," if self.target is not None and self.target.num_qubits is not None:"," idle_physical_qubits = ["," q for q in range(self.target.num_qubits) if q not in physical_bits"," ]"," elif self.coupling_map:"," idle_physical_qubits = ["," q for q in self.coupling_map.physical_qubits if q not in physical_bits"," ]",""," if idle_physical_qubits:"," if self.ancilla_name in dag.qregs:"," save_prefix = QuantumRegister.prefix"," QuantumRegister.prefix = self.ancilla_name"," qreg = QuantumRegister(len(idle_physical_qubits))"," QuantumRegister.prefix = save_prefix"," else:"," qreg = QuantumRegister(len(idle_physical_qubits), name=self.ancilla_name)",""," for idx, idle_q in enumerate(idle_physical_qubits):"," self.property_set[\"layout\"][idle_q] = qreg[idx]"," self.property_set[\"layout\"].add_register(qreg)"," return dag",""," @staticmethod"," def validate_layout(layout_qubits, dag_qubits):"," \"\"\""," Checks if all the qregs in ``layout_qregs`` already exist in ``dag_qregs``. Otherwise, raise."," \"\"\""," for qreg in layout_qubits:"," if qreg not in dag_qubits:"," raise TranspilerError("," \"FullAncillaAllocation: The layout refers to a qubit \""," \"that does not exist in circuit.\""," )"],"stylingDirectives":[[{"start":0,"end":30,"cssClass":"pl-c"}],[{"start":0,"end":1,"cssClass":"pl-c"}],[{"start":0,"end":31,"cssClass":"pl-c"}],[{"start":0,"end":1,"cssClass":"pl-c"}],[{"start":0,"end":70,"cssClass":"pl-c"}],[{"start":0,"end":77,"cssClass":"pl-c"}],[{"start":0,"end":71,"cssClass":"pl-c"}],[{"start":0,"end":1,"cssClass":"pl-c"}],[{"start":0,"end":69,"cssClass":"pl-c"}],[{"start":0,"end":72,"cssClass":"pl-c"}],[{"start":0,"end":49,"cssClass":"pl-c"}],[],[{"start":0,"end":77,"cssClass":"pl-s"}],[],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":11,"cssClass":"pl-s1"},{"start":12,"end":19,"cssClass":"pl-s1"},{"start":20,"end":26,"cssClass":"pl-k"},{"start":27,"end":42,"cssClass":"pl-v"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":11,"cssClass":"pl-s1"},{"start":12,"end":22,"cssClass":"pl-s1"},{"start":23,"end":33,"cssClass":"pl-s1"},{"start":34,"end":40,"cssClass":"pl-k"},{"start":41,"end":53,"cssClass":"pl-v"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":11,"cssClass":"pl-s1"},{"start":12,"end":22,"cssClass":"pl-s1"},{"start":23,"end":33,"cssClass":"pl-s1"},{"start":34,"end":40,"cssClass":"pl-k"},{"start":41,"end":56,"cssClass":"pl-v"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":11,"cssClass":"pl-s1"},{"start":12,"end":22,"cssClass":"pl-s1"},{"start":23,"end":29,"cssClass":"pl-s1"},{"start":30,"end":36,"cssClass":"pl-k"},{"start":37,"end":43,"cssClass":"pl-v"}],[],[],[{"start":0,"end":5,"cssClass":"pl-k"},{"start":6,"end":27,"cssClass":"pl-v"},{"start":28,"end":40,"cssClass":"pl-v"}],[{"start":4,"end":88,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":80,"cssClass":"pl-s"}],[{"start":0,"end":78,"cssClass":"pl-s"}],[{"start":0,"end":59,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":9,"cssClass":"pl-s"}],[{"start":0,"end":76,"cssClass":"pl-s"}],[{"start":0,"end":65,"cssClass":"pl-s"}],[{"start":0,"end":75,"cssClass":"pl-s"}],[{"start":0,"end":16,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"}],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":16,"cssClass":"pl-en"},{"start":17,"end":21,"cssClass":"pl-s1"},{"start":23,"end":35,"cssClass":"pl-s1"}],[{"start":8,"end":45,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"}],[{"start":0,"end":98,"cssClass":"pl-s"}],[{"start":0,"end":11,"cssClass":"pl-s"}],[{"start":8,"end":13,"cssClass":"pl-en"},{"start":16,"end":24,"cssClass":"pl-en"}],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":21,"cssClass":"pl-en"},{"start":22,"end":34,"cssClass":"pl-s1"},{"start":36,"end":42,"cssClass":"pl-v"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":23,"cssClass":"pl-s1"},{"start":24,"end":25,"cssClass":"pl-c1"},{"start":26,"end":38,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":29,"cssClass":"pl-s1"},{"start":30,"end":31,"cssClass":"pl-c1"},{"start":32,"end":36,"cssClass":"pl-s1"},{"start":37,"end":43,"cssClass":"pl-s1"},{"start":44,"end":62,"cssClass":"pl-en"}],[{"start":8,"end":12,"cssClass":"pl-k"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":23,"cssClass":"pl-s1"},{"start":24,"end":25,"cssClass":"pl-c1"},{"start":26,"end":30,"cssClass":"pl-c1"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":29,"cssClass":"pl-s1"},{"start":30,"end":31,"cssClass":"pl-c1"},{"start":32,"end":44,"cssClass":"pl-s1"}],[{"start":8,"end":12,"cssClass":"pl-s1"},{"start":13,"end":25,"cssClass":"pl-s1"},{"start":26,"end":27,"cssClass":"pl-c1"},{"start":28,"end":37,"cssClass":"pl-s"}],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":11,"cssClass":"pl-en"},{"start":12,"end":16,"cssClass":"pl-s1"},{"start":18,"end":21,"cssClass":"pl-s1"}],[{"start":8,"end":55,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":73,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":80,"cssClass":"pl-s"}],[{"start":0,"end":46,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":86,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"}],[{"start":0,"end":48,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":16,"cssClass":"pl-s"}],[{"start":0,"end":64,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":15,"cssClass":"pl-s"}],[{"start":0,"end":96,"cssClass":"pl-s"}],[{"start":0,"end":11,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-s1"},{"start":15,"end":16,"cssClass":"pl-c1"},{"start":17,"end":21,"cssClass":"pl-s1"},{"start":22,"end":34,"cssClass":"pl-s1"},{"start":35,"end":38,"cssClass":"pl-en"},{"start":39,"end":47,"cssClass":"pl-s"}],[],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":17,"cssClass":"pl-s1"},{"start":18,"end":20,"cssClass":"pl-c1"},{"start":21,"end":25,"cssClass":"pl-c1"}],[{"start":12,"end":17,"cssClass":"pl-k"},{"start":18,"end":33,"cssClass":"pl-v"},{"start":34,"end":95,"cssClass":"pl-s"}],[],[{"start":8,"end":20,"cssClass":"pl-s1"},{"start":21,"end":22,"cssClass":"pl-c1"},{"start":23,"end":29,"cssClass":"pl-s1"},{"start":30,"end":46,"cssClass":"pl-en"}],[{"start":8,"end":21,"cssClass":"pl-s1"},{"start":22,"end":23,"cssClass":"pl-c1"},{"start":24,"end":30,"cssClass":"pl-s1"},{"start":31,"end":48,"cssClass":"pl-en"}],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":17,"cssClass":"pl-s1"}],[{"start":12,"end":33,"cssClass":"pl-v"},{"start":34,"end":49,"cssClass":"pl-en"},{"start":50,"end":62,"cssClass":"pl-s1"},{"start":64,"end":67,"cssClass":"pl-en"},{"start":68,"end":71,"cssClass":"pl-s1"},{"start":72,"end":78,"cssClass":"pl-s1"}],[{"start":12,"end":34,"cssClass":"pl-s1"},{"start":35,"end":36,"cssClass":"pl-c1"},{"start":37,"end":41,"cssClass":"pl-en"},{"start":42,"end":47,"cssClass":"pl-en"},{"start":48,"end":51,"cssClass":"pl-en"},{"start":52,"end":65,"cssClass":"pl-s1"},{"start":67,"end":68,"cssClass":"pl-c1"},{"start":69,"end":70,"cssClass":"pl-c1"}],[{"start":8,"end":12,"cssClass":"pl-k"}],[{"start":12,"end":34,"cssClass":"pl-s1"},{"start":35,"end":36,"cssClass":"pl-c1"}],[],[{"start":8,"end":28,"cssClass":"pl-s1"},{"start":29,"end":30,"cssClass":"pl-c1"},{"start":32,"end":33,"cssClass":"pl-s1"},{"start":34,"end":37,"cssClass":"pl-k"},{"start":38,"end":39,"cssClass":"pl-s1"},{"start":40,"end":42,"cssClass":"pl-c1"},{"start":43,"end":65,"cssClass":"pl-s1"},{"start":66,"end":68,"cssClass":"pl-k"},{"start":69,"end":70,"cssClass":"pl-s1"},{"start":71,"end":74,"cssClass":"pl-c1"},{"start":75,"end":77,"cssClass":"pl-c1"},{"start":78,"end":91,"cssClass":"pl-s1"}],[],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":15,"cssClass":"pl-s1"},{"start":16,"end":22,"cssClass":"pl-s1"},{"start":23,"end":25,"cssClass":"pl-c1"},{"start":26,"end":29,"cssClass":"pl-c1"},{"start":30,"end":34,"cssClass":"pl-c1"},{"start":35,"end":38,"cssClass":"pl-c1"},{"start":39,"end":43,"cssClass":"pl-s1"},{"start":44,"end":50,"cssClass":"pl-s1"},{"start":51,"end":61,"cssClass":"pl-s1"},{"start":62,"end":64,"cssClass":"pl-c1"},{"start":65,"end":68,"cssClass":"pl-c1"},{"start":69,"end":73,"cssClass":"pl-c1"}],[{"start":12,"end":32,"cssClass":"pl-s1"},{"start":33,"end":34,"cssClass":"pl-c1"}],[{"start":16,"end":17,"cssClass":"pl-s1"},{"start":18,"end":21,"cssClass":"pl-k"},{"start":22,"end":23,"cssClass":"pl-s1"},{"start":24,"end":26,"cssClass":"pl-c1"},{"start":27,"end":32,"cssClass":"pl-en"},{"start":33,"end":37,"cssClass":"pl-s1"},{"start":38,"end":44,"cssClass":"pl-s1"},{"start":45,"end":55,"cssClass":"pl-s1"},{"start":57,"end":59,"cssClass":"pl-k"},{"start":60,"end":61,"cssClass":"pl-s1"},{"start":62,"end":65,"cssClass":"pl-c1"},{"start":66,"end":68,"cssClass":"pl-c1"},{"start":69,"end":82,"cssClass":"pl-s1"}],[],[{"start":8,"end":12,"cssClass":"pl-k"},{"start":13,"end":17,"cssClass":"pl-s1"},{"start":18,"end":30,"cssClass":"pl-s1"}],[{"start":12,"end":32,"cssClass":"pl-s1"},{"start":33,"end":34,"cssClass":"pl-c1"}],[{"start":16,"end":17,"cssClass":"pl-s1"},{"start":18,"end":21,"cssClass":"pl-k"},{"start":22,"end":23,"cssClass":"pl-s1"},{"start":24,"end":26,"cssClass":"pl-c1"},{"start":27,"end":31,"cssClass":"pl-s1"},{"start":32,"end":44,"cssClass":"pl-s1"},{"start":45,"end":60,"cssClass":"pl-s1"},{"start":61,"end":63,"cssClass":"pl-k"},{"start":64,"end":65,"cssClass":"pl-s1"},{"start":66,"end":69,"cssClass":"pl-c1"},{"start":70,"end":72,"cssClass":"pl-c1"},{"start":73,"end":86,"cssClass":"pl-s1"}],[],[],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":31,"cssClass":"pl-s1"}],[{"start":12,"end":14,"cssClass":"pl-k"},{"start":15,"end":19,"cssClass":"pl-s1"},{"start":20,"end":32,"cssClass":"pl-s1"},{"start":33,"end":35,"cssClass":"pl-c1"},{"start":36,"end":39,"cssClass":"pl-s1"},{"start":40,"end":45,"cssClass":"pl-s1"}],[{"start":16,"end":27,"cssClass":"pl-s1"},{"start":28,"end":29,"cssClass":"pl-c1"},{"start":30,"end":45,"cssClass":"pl-v"},{"start":46,"end":52,"cssClass":"pl-s1"}],[{"start":16,"end":31,"cssClass":"pl-v"},{"start":32,"end":38,"cssClass":"pl-s1"},{"start":39,"end":40,"cssClass":"pl-c1"},{"start":41,"end":45,"cssClass":"pl-s1"},{"start":46,"end":58,"cssClass":"pl-s1"}],[{"start":16,"end":20,"cssClass":"pl-s1"},{"start":21,"end":22,"cssClass":"pl-c1"},{"start":23,"end":38,"cssClass":"pl-v"},{"start":39,"end":42,"cssClass":"pl-en"},{"start":43,"end":63,"cssClass":"pl-s1"}],[{"start":16,"end":31,"cssClass":"pl-v"},{"start":32,"end":38,"cssClass":"pl-s1"},{"start":39,"end":40,"cssClass":"pl-c1"},{"start":41,"end":52,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-k"}],[{"start":16,"end":20,"cssClass":"pl-s1"},{"start":21,"end":22,"cssClass":"pl-c1"},{"start":23,"end":38,"cssClass":"pl-v"},{"start":39,"end":42,"cssClass":"pl-en"},{"start":43,"end":63,"cssClass":"pl-s1"},{"start":66,"end":70,"cssClass":"pl-s1"},{"start":70,"end":71,"cssClass":"pl-c1"},{"start":71,"end":75,"cssClass":"pl-s1"},{"start":76,"end":88,"cssClass":"pl-s1"}],[],[{"start":12,"end":15,"cssClass":"pl-k"},{"start":16,"end":19,"cssClass":"pl-s1"},{"start":21,"end":27,"cssClass":"pl-s1"},{"start":28,"end":30,"cssClass":"pl-c1"},{"start":31,"end":40,"cssClass":"pl-en"},{"start":41,"end":61,"cssClass":"pl-s1"}],[{"start":16,"end":20,"cssClass":"pl-s1"},{"start":21,"end":33,"cssClass":"pl-s1"},{"start":34,"end":42,"cssClass":"pl-s"},{"start":44,"end":50,"cssClass":"pl-s1"},{"start":52,"end":53,"cssClass":"pl-c1"},{"start":54,"end":58,"cssClass":"pl-s1"},{"start":59,"end":62,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":29,"cssClass":"pl-s1"},{"start":30,"end":38,"cssClass":"pl-s"},{"start":40,"end":52,"cssClass":"pl-en"},{"start":53,"end":57,"cssClass":"pl-s1"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":18,"cssClass":"pl-s1"}],[],[{"start":4,"end":17,"cssClass":"pl-en"},{"start":5,"end":17,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":23,"cssClass":"pl-en"},{"start":24,"end":37,"cssClass":"pl-s1"},{"start":39,"end":49,"cssClass":"pl-s1"}],[{"start":8,"end":11,"cssClass":"pl-s"}],[{"start":0,"end":101,"cssClass":"pl-s"}],[{"start":0,"end":11,"cssClass":"pl-s"}],[{"start":8,"end":11,"cssClass":"pl-k"},{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":19,"cssClass":"pl-c1"},{"start":20,"end":33,"cssClass":"pl-s1"}],[{"start":12,"end":14,"cssClass":"pl-k"},{"start":15,"end":19,"cssClass":"pl-s1"},{"start":20,"end":23,"cssClass":"pl-c1"},{"start":24,"end":26,"cssClass":"pl-c1"},{"start":27,"end":37,"cssClass":"pl-s1"}],[{"start":16,"end":21,"cssClass":"pl-k"},{"start":22,"end":37,"cssClass":"pl-v"}],[{"start":20,"end":74,"cssClass":"pl-s"}],[{"start":20,"end":53,"cssClass":"pl-s"}],[]],"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/Qiskit/qiskit/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"full_ancilla_allocation.py","displayUrl":"https://github.com/Qiskit/qiskit/blob/main/qiskit/transpiler/passes/layout/full_ancilla_allocation.py?raw=true","headerInfo":{"blobSize":"4.55 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"bdfced0","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FQiskit%2Fqiskit%2Fblob%2Fmain%2Fqiskit%2Ftranspiler%2Fpasses%2Flayout%2Ffull_ancilla_allocation.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"117","truncatedSloc":"96"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Python","languageID":303,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/Qiskit/qiskit/blob/main/qiskit/transpiler/passes/layout/full_ancilla_allocation.py","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/Qiskit/qiskit/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/Qiskit/qiskit/raw/main/qiskit/transpiler/passes/layout/full_ancilla_allocation.py","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":4,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"FullAncillaAllocation","kind":"class","ident_start":769,"ident_end":790,"extent_start":763,"extent_end":4663,"fully_qualified_name":"FullAncillaAllocation","ident_utf16":{"start":{"line_number":20,"utf16_col":6},"end":{"line_number":20,"utf16_col":27}},"extent_utf16":{"start":{"line_number":20,"utf16_col":0},"end":{"line_number":116,"utf16_col":17}}},{"name":"__init__","kind":"function","ident_start":1380,"ident_end":1388,"extent_start":1376,"extent_end":1885,"fully_qualified_name":"FullAncillaAllocation.__init__","ident_utf16":{"start":{"line_number":34,"utf16_col":8},"end":{"line_number":34,"utf16_col":16}},"extent_utf16":{"start":{"line_number":34,"utf16_col":4},"end":{"line_number":47,"utf16_col":37}}},{"name":"run","kind":"function","ident_start":1895,"ident_end":1898,"extent_start":1891,"extent_end":4206,"fully_qualified_name":"FullAncillaAllocation.run","ident_utf16":{"start":{"line_number":49,"utf16_col":8},"end":{"line_number":49,"utf16_col":11}},"extent_utf16":{"start":{"line_number":49,"utf16_col":4},"end":{"line_number":104,"utf16_col":18}}},{"name":"validate_layout","kind":"function","ident_start":4234,"ident_end":4249,"extent_start":4230,"extent_end":4663,"fully_qualified_name":"FullAncillaAllocation.validate_layout","ident_utf16":{"start":{"line_number":107,"utf16_col":8},"end":{"line_number":107,"utf16_col":23}},"extent_utf16":{"start":{"line_number":107,"utf16_col":4},"end":{"line_number":116,"utf16_col":17}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/Qiskit/qiskit/branches":{"post":"8fYCylUxDErXleqbCtDgTuCHjwO3qo5u-WXJEhyOhWdzPLNYprc0VdPrJ6ddmzM32LqMEVIwyGLiuu7y1fxD_Q"},"/repos/preferences":{"post":"BRmL09hSB0PgXRmazPfkX8WqxwVYCKhcDqlI1sqpVxhwHo2cANsH8tpu_5fRggPT0fmjtIoDVHyO0JnGLEdPMw"}}},"title":"qiskit/qiskit/transpiler/passes/layout/full_ancilla_allocation.py at main ยท Qiskit/qiskit"}