{"payload":{"allShortcutsEnabled":false,"fileTree":{"qiskit/quantum_info/operators/mixins":{"items":[{"name":"__init__.py","path":"qiskit/quantum_info/operators/mixins/__init__.py","contentType":"file"},{"name":"adjoint.py","path":"qiskit/quantum_info/operators/mixins/adjoint.py","contentType":"file"},{"name":"group.py","path":"qiskit/quantum_info/operators/mixins/group.py","contentType":"file"},{"name":"linear.py","path":"qiskit/quantum_info/operators/mixins/linear.py","contentType":"file"},{"name":"multiply.py","path":"qiskit/quantum_info/operators/mixins/multiply.py","contentType":"file"},{"name":"tolerances.py","path":"qiskit/quantum_info/operators/mixins/tolerances.py","contentType":"file"}],"totalCount":6},"qiskit/quantum_info/operators":{"items":[{"name":"channel","path":"qiskit/quantum_info/operators/channel","contentType":"directory"},{"name":"dihedral","path":"qiskit/quantum_info/operators/dihedral","contentType":"directory"},{"name":"mixins","path":"qiskit/quantum_info/operators/mixins","contentType":"directory"},{"name":"symplectic","path":"qiskit/quantum_info/operators/symplectic","contentType":"directory"},{"name":"utils","path":"qiskit/quantum_info/operators/utils","contentType":"directory"},{"name":"__init__.py","path":"qiskit/quantum_info/operators/__init__.py","contentType":"file"},{"name":"base_operator.py","path":"qiskit/quantum_info/operators/base_operator.py","contentType":"file"},{"name":"custom_iterator.py","path":"qiskit/quantum_info/operators/custom_iterator.py","contentType":"file"},{"name":"linear_op.py","path":"qiskit/quantum_info/operators/linear_op.py","contentType":"file"},{"name":"measures.py","path":"qiskit/quantum_info/operators/measures.py","contentType":"file"},{"name":"op_shape.py","path":"qiskit/quantum_info/operators/op_shape.py","contentType":"file"},{"name":"operator.py","path":"qiskit/quantum_info/operators/operator.py","contentType":"file"},{"name":"predicates.py","path":"qiskit/quantum_info/operators/predicates.py","contentType":"file"},{"name":"random.py","path":"qiskit/quantum_info/operators/random.py","contentType":"file"},{"name":"scalar_op.py","path":"qiskit/quantum_info/operators/scalar_op.py","contentType":"file"}],"totalCount":15},"qiskit/quantum_info":{"items":[{"name":"analysis","path":"qiskit/quantum_info/analysis","contentType":"directory"},{"name":"operators","path":"qiskit/quantum_info/operators","contentType":"directory"},{"name":"states","path":"qiskit/quantum_info/states","contentType":"directory"},{"name":"__init__.py","path":"qiskit/quantum_info/__init__.py","contentType":"file"},{"name":"quaternion.py","path":"qiskit/quantum_info/quaternion.py","contentType":"file"},{"name":"random.py","path":"qiskit/quantum_info/random.py","contentType":"file"}],"totalCount":6},"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":38.685810000000004,"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/quantum_info/operators/mixins/adjoint.py","currentUser":null,"blob":{"rawLines":["# This code is part of Qiskit.","#","# (C) Copyright IBM 2017, 2021.","#","# 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.","","\"\"\"","Mixin for gate operator interface.","\"\"\"","","import sys","from abc import ABC, abstractmethod","","if sys.version_info >= (3, 11):"," from typing import Self","else:"," from typing_extensions import Self","","","class AdjointMixin(ABC):"," \"\"\"Abstract Mixin for operator adjoint and transpose operations.",""," This class defines the following methods",""," - :meth:`transpose`"," - :meth:`conjugate`"," - :meth:`adjoint`",""," The following abstract methods must be implemented by subclasses"," using this mixin",""," - ``conjugate(self)``"," - ``transpose(self)``"," \"\"\"",""," def adjoint(self) -> Self:"," \"\"\"Return the adjoint of the CLASS.\"\"\""," return self.conjugate().transpose()",""," @abstractmethod"," def conjugate(self) -> Self:"," \"\"\"Return the conjugate of the CLASS.\"\"\"",""," @abstractmethod"," def transpose(self) -> Self:"," \"\"\"Return the transpose of the CLASS.\"\"\""],"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":3,"cssClass":"pl-s"}],[{"start":0,"end":34,"cssClass":"pl-s"}],[{"start":0,"end":3,"cssClass":"pl-s"}],[],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":8,"cssClass":"pl-s1"},{"start":9,"end":15,"cssClass":"pl-k"},{"start":16,"end":19,"cssClass":"pl-v"},{"start":21,"end":35,"cssClass":"pl-s1"}],[],[{"start":0,"end":2,"cssClass":"pl-k"},{"start":3,"end":6,"cssClass":"pl-s1"},{"start":7,"end":19,"cssClass":"pl-s1"},{"start":20,"end":22,"cssClass":"pl-c1"},{"start":24,"end":25,"cssClass":"pl-c1"},{"start":27,"end":29,"cssClass":"pl-c1"}],[{"start":4,"end":8,"cssClass":"pl-k"},{"start":9,"end":15,"cssClass":"pl-s1"},{"start":16,"end":22,"cssClass":"pl-k"},{"start":23,"end":27,"cssClass":"pl-v"}],[{"start":0,"end":4,"cssClass":"pl-k"}],[{"start":4,"end":8,"cssClass":"pl-k"},{"start":9,"end":26,"cssClass":"pl-s1"},{"start":27,"end":33,"cssClass":"pl-k"},{"start":34,"end":38,"cssClass":"pl-v"}],[],[],[{"start":0,"end":5,"cssClass":"pl-k"},{"start":6,"end":18,"cssClass":"pl-v"},{"start":19,"end":22,"cssClass":"pl-v"}],[{"start":4,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":44,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":27,"cssClass":"pl-s"}],[{"start":0,"end":27,"cssClass":"pl-s"}],[{"start":0,"end":25,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":68,"cssClass":"pl-s"}],[{"start":0,"end":20,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":29,"cssClass":"pl-s"}],[{"start":0,"end":29,"cssClass":"pl-s"}],[{"start":0,"end":7,"cssClass":"pl-s"}],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":15,"cssClass":"pl-en"},{"start":16,"end":20,"cssClass":"pl-s1"},{"start":22,"end":24,"cssClass":"pl-c1"},{"start":25,"end":29,"cssClass":"pl-v"}],[{"start":8,"end":46,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":19,"cssClass":"pl-s1"},{"start":20,"end":29,"cssClass":"pl-en"},{"start":32,"end":41,"cssClass":"pl-en"}],[],[{"start":4,"end":19,"cssClass":"pl-en"},{"start":5,"end":19,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":17,"cssClass":"pl-en"},{"start":18,"end":22,"cssClass":"pl-s1"},{"start":24,"end":26,"cssClass":"pl-c1"},{"start":27,"end":31,"cssClass":"pl-v"}],[{"start":8,"end":48,"cssClass":"pl-s"}],[],[{"start":4,"end":19,"cssClass":"pl-en"},{"start":5,"end":19,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":17,"cssClass":"pl-en"},{"start":18,"end":22,"cssClass":"pl-s1"},{"start":24,"end":26,"cssClass":"pl-c1"},{"start":27,"end":31,"cssClass":"pl-v"}],[{"start":8,"end":48,"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":"adjoint.py","displayUrl":"https://github.com/Qiskit/qiskit/blob/main/qiskit/quantum_info/operators/mixins/adjoint.py?raw=true","headerInfo":{"blobSize":"1.36 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":"9505323","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FQiskit%2Fqiskit%2Fblob%2Fmain%2Fqiskit%2Fquantum_info%2Foperators%2Fmixins%2Fadjoint.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"52","truncatedSloc":"40"},"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/quantum_info/operators/mixins/adjoint.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/quantum_info/operators/mixins/adjoint.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":"AdjointMixin","kind":"class","ident_start":689,"ident_end":701,"extent_start":683,"extent_end":1394,"fully_qualified_name":"AdjointMixin","ident_utf16":{"start":{"line_number":25,"utf16_col":6},"end":{"line_number":25,"utf16_col":18}},"extent_utf16":{"start":{"line_number":25,"utf16_col":0},"end":{"line_number":51,"utf16_col":48}}},{"name":"adjoint","kind":"function","ident_start":1075,"ident_end":1082,"extent_start":1071,"extent_end":1188,"fully_qualified_name":"AdjointMixin.adjoint","ident_utf16":{"start":{"line_number":41,"utf16_col":8},"end":{"line_number":41,"utf16_col":15}},"extent_utf16":{"start":{"line_number":41,"utf16_col":4},"end":{"line_number":43,"utf16_col":43}}},{"name":"conjugate","kind":"function","ident_start":1218,"ident_end":1227,"extent_start":1214,"extent_end":1291,"fully_qualified_name":"AdjointMixin.conjugate","ident_utf16":{"start":{"line_number":46,"utf16_col":8},"end":{"line_number":46,"utf16_col":17}},"extent_utf16":{"start":{"line_number":46,"utf16_col":4},"end":{"line_number":47,"utf16_col":48}}},{"name":"transpose","kind":"function","ident_start":1321,"ident_end":1330,"extent_start":1317,"extent_end":1394,"fully_qualified_name":"AdjointMixin.transpose","ident_utf16":{"start":{"line_number":50,"utf16_col":8},"end":{"line_number":50,"utf16_col":17}},"extent_utf16":{"start":{"line_number":50,"utf16_col":4},"end":{"line_number":51,"utf16_col":48}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/Qiskit/qiskit/branches":{"post":"xm6gkpVLWe5r908zbUzZxbQFoU6d7HXkQ16MSWhlxpHnV2nHKnqeyWVuRCFd9IEgKjqnRVsl0lCsDKcUrgsdLA"},"/repos/preferences":{"post":"MF2g9uSTddO3p-uGkejBoWUKmMMf2hYK6u3V_Vf3seID7MVdVVlRTwYUff51g5NXWAONXNXDPT42Bk8eYjgqpQ"}}},"title":"qiskit/qiskit/quantum_info/operators/mixins/adjoint.py at main ยท Qiskit/qiskit"}