{"payload":{"allShortcutsEnabled":false,"fileTree":{"qiskit/pulse/library":{"items":[{"name":"samplers","path":"qiskit/pulse/library/samplers","contentType":"directory"},{"name":"__init__.py","path":"qiskit/pulse/library/__init__.py","contentType":"file"},{"name":"continuous.py","path":"qiskit/pulse/library/continuous.py","contentType":"file"},{"name":"pulse.py","path":"qiskit/pulse/library/pulse.py","contentType":"file"},{"name":"symbolic_pulses.py","path":"qiskit/pulse/library/symbolic_pulses.py","contentType":"file"},{"name":"waveform.py","path":"qiskit/pulse/library/waveform.py","contentType":"file"}],"totalCount":6},"qiskit/pulse":{"items":[{"name":"instructions","path":"qiskit/pulse/instructions","contentType":"directory"},{"name":"library","path":"qiskit/pulse/library","contentType":"directory"},{"name":"transforms","path":"qiskit/pulse/transforms","contentType":"directory"},{"name":"__init__.py","path":"qiskit/pulse/__init__.py","contentType":"file"},{"name":"builder.py","path":"qiskit/pulse/builder.py","contentType":"file"},{"name":"calibration_entries.py","path":"qiskit/pulse/calibration_entries.py","contentType":"file"},{"name":"channels.py","path":"qiskit/pulse/channels.py","contentType":"file"},{"name":"configuration.py","path":"qiskit/pulse/configuration.py","contentType":"file"},{"name":"exceptions.py","path":"qiskit/pulse/exceptions.py","contentType":"file"},{"name":"filters.py","path":"qiskit/pulse/filters.py","contentType":"file"},{"name":"instruction_schedule_map.py","path":"qiskit/pulse/instruction_schedule_map.py","contentType":"file"},{"name":"macros.py","path":"qiskit/pulse/macros.py","contentType":"file"},{"name":"parameter_manager.py","path":"qiskit/pulse/parameter_manager.py","contentType":"file"},{"name":"parser.py","path":"qiskit/pulse/parser.py","contentType":"file"},{"name":"reference_manager.py","path":"qiskit/pulse/reference_manager.py","contentType":"file"},{"name":"schedule.py","path":"qiskit/pulse/schedule.py","contentType":"file"},{"name":"utils.py","path":"qiskit/pulse/utils.py","contentType":"file"}],"totalCount":17},"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":23.043808,"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/pulse/library/waveform.py","currentUser":null,"blob":{"rawLines":["# This code is part of Qiskit.","#","# (C) Copyright IBM 2020.","#","# 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.","","\"\"\"A pulse that is described by complex-valued sample points.\"\"\"","from __future__ import annotations","from typing import Any","","import numpy as np","","from qiskit.pulse.exceptions import PulseError","from qiskit.pulse.library.pulse import Pulse","","","class Waveform(Pulse):"," \"\"\"A pulse specified completely by complex-valued samples; each sample is played for the"," duration of the backend cycle-time, dt."," \"\"\"",""," def __init__("," self,"," samples: np.ndarray | list[complex],"," name: str | None = None,"," epsilon: float = 1e-7,"," limit_amplitude: bool | None = None,"," ):"," \"\"\"Create new sample pulse command.",""," Args:"," samples: Complex array of the samples in the pulse envelope."," name: Unique name to identify the pulse."," epsilon: Pulse sample norm tolerance for clipping."," If any sample's norm exceeds unity by less than or equal to epsilon"," it will be clipped to unit norm. If the sample"," norm is greater than 1+epsilon an error will be raised."," limit_amplitude: Passed to parent Pulse"," \"\"\"",""," super().__init__(duration=len(samples), name=name, limit_amplitude=limit_amplitude)"," samples = np.asarray(samples, dtype=np.complex128)"," self.epsilon = epsilon"," self._samples = self._clip(samples, epsilon=epsilon)",""," @property"," def samples(self) -> np.ndarray:"," \"\"\"Return sample values.\"\"\""," return self._samples",""," def _clip(self, samples: np.ndarray, epsilon: float = 1e-7) -> np.ndarray:"," \"\"\"If samples are within epsilon of unit norm, clip sample by reducing norm by (1-epsilon).",""," If difference is greater than epsilon error is raised.",""," Args:"," samples: Complex array of the samples in the pulse envelope."," epsilon: Pulse sample norm tolerance for clipping."," If any sample's norm exceeds unity by less than or equal to epsilon"," it will be clipped to unit norm. If the sample"," norm is greater than 1+epsilon an error will be raised.",""," Returns:"," Clipped pulse samples.",""," Raises:"," PulseError: If there exists a pulse sample with a norm greater than 1+epsilon."," \"\"\""," samples_norm = np.abs(samples)"," to_clip = (samples_norm > 1.0) & (samples_norm <= 1.0 + epsilon)",""," if np.any(to_clip):"," # first try normalizing by the abs value"," clip_where = np.argwhere(to_clip)"," clip_angle = np.angle(samples[clip_where])"," clipped_samples = np.exp(1j * clip_angle, dtype=np.complex128)",""," # if norm still exceed one subtract epsilon"," # required for some platforms"," clipped_sample_norms = np.abs(clipped_samples)"," to_clip_epsilon = clipped_sample_norms > 1.0"," if np.any(to_clip_epsilon):"," clip_where_epsilon = np.argwhere(to_clip_epsilon)"," clipped_samples_epsilon = (1 - epsilon) * np.exp("," 1j * clip_angle[clip_where_epsilon], dtype=np.complex128"," )"," clipped_samples[clip_where_epsilon] = clipped_samples_epsilon",""," # update samples with clipped values"," samples[clip_where] = clipped_samples"," samples_norm[clip_where] = np.abs(clipped_samples)",""," if np.any(samples_norm > 1.0) and self._limit_amplitude:"," amp = np.max(samples_norm)"," raise PulseError("," f\"Pulse contains sample with norm {amp} greater than 1+epsilon.\""," \" This can be overruled by setting Pulse.limit_amplitude.\""," )",""," return samples",""," def is_parameterized(self) -> bool:"," \"\"\"Return True iff the instruction is parameterized.\"\"\""," return False",""," @property"," def parameters(self) -> dict[str, Any]:"," \"\"\"Return a dictionary containing the pulse's parameters.\"\"\""," return {}",""," def __eq__(self, other: object) -> bool:"," if not isinstance(other, Waveform):"," return NotImplemented"," return ("," super().__eq__(other)"," and self.samples.shape == other.samples.shape"," and np.allclose(self.samples, other.samples, rtol=0, atol=self.epsilon)"," )",""," def __hash__(self) -> int:"," return hash(self.samples.tobytes())",""," def __repr__(self) -> str:"," opt = np.get_printoptions()"," np.set_printoptions(threshold=50)"," np.set_printoptions(**opt)"," return \"{}({}{})\".format("," self.__class__.__name__,"," repr(self.samples),"," f\", name='{self.name}'\" if self.name is not None else \"\","," )"],"stylingDirectives":[[{"start":0,"end":30,"cssClass":"pl-c"}],[{"start":0,"end":1,"cssClass":"pl-c"}],[{"start":0,"end":25,"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":64,"cssClass":"pl-s"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":16,"end":22,"cssClass":"pl-k"},{"start":23,"end":34,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":11,"cssClass":"pl-s1"},{"start":12,"end":18,"cssClass":"pl-k"},{"start":19,"end":22,"cssClass":"pl-v"}],[],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":12,"cssClass":"pl-s1"},{"start":13,"end":15,"cssClass":"pl-k"},{"start":16,"end":18,"cssClass":"pl-s1"}],[],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":11,"cssClass":"pl-s1"},{"start":12,"end":17,"cssClass":"pl-s1"},{"start":18,"end":28,"cssClass":"pl-s1"},{"start":29,"end":35,"cssClass":"pl-k"},{"start":36,"end":46,"cssClass":"pl-v"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":11,"cssClass":"pl-s1"},{"start":12,"end":17,"cssClass":"pl-s1"},{"start":18,"end":25,"cssClass":"pl-s1"},{"start":26,"end":31,"cssClass":"pl-s1"},{"start":32,"end":38,"cssClass":"pl-k"},{"start":39,"end":44,"cssClass":"pl-v"}],[],[],[{"start":0,"end":5,"cssClass":"pl-k"},{"start":6,"end":14,"cssClass":"pl-v"},{"start":15,"end":20,"cssClass":"pl-v"}],[{"start":4,"end":92,"cssClass":"pl-s"}],[{"start":0,"end":43,"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":8,"end":12,"cssClass":"pl-s1"}],[{"start":8,"end":15,"cssClass":"pl-s1"},{"start":17,"end":19,"cssClass":"pl-s1"},{"start":20,"end":27,"cssClass":"pl-s1"},{"start":28,"end":29,"cssClass":"pl-c1"},{"start":30,"end":34,"cssClass":"pl-s1"},{"start":35,"end":42,"cssClass":"pl-s1"}],[{"start":8,"end":12,"cssClass":"pl-s1"},{"start":14,"end":17,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-c1"},{"start":20,"end":24,"cssClass":"pl-c1"},{"start":25,"end":26,"cssClass":"pl-c1"},{"start":27,"end":31,"cssClass":"pl-c1"}],[{"start":8,"end":15,"cssClass":"pl-s1"},{"start":17,"end":22,"cssClass":"pl-s1"},{"start":23,"end":24,"cssClass":"pl-c1"},{"start":25,"end":29,"cssClass":"pl-c1"}],[{"start":8,"end":23,"cssClass":"pl-s1"},{"start":25,"end":29,"cssClass":"pl-s1"},{"start":30,"end":31,"cssClass":"pl-c1"},{"start":32,"end":36,"cssClass":"pl-c1"},{"start":37,"end":38,"cssClass":"pl-c1"},{"start":39,"end":43,"cssClass":"pl-c1"}],[],[{"start":8,"end":43,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":52,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":83,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":51,"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":25,"end":33,"cssClass":"pl-s1"},{"start":33,"end":34,"cssClass":"pl-c1"},{"start":34,"end":37,"cssClass":"pl-en"},{"start":38,"end":45,"cssClass":"pl-s1"},{"start":48,"end":52,"cssClass":"pl-s1"},{"start":52,"end":53,"cssClass":"pl-c1"},{"start":53,"end":57,"cssClass":"pl-s1"},{"start":59,"end":74,"cssClass":"pl-s1"},{"start":74,"end":75,"cssClass":"pl-c1"},{"start":75,"end":90,"cssClass":"pl-s1"}],[{"start":8,"end":15,"cssClass":"pl-s1"},{"start":16,"end":17,"cssClass":"pl-c1"},{"start":18,"end":20,"cssClass":"pl-s1"},{"start":21,"end":28,"cssClass":"pl-en"},{"start":29,"end":36,"cssClass":"pl-s1"},{"start":38,"end":43,"cssClass":"pl-s1"},{"start":43,"end":44,"cssClass":"pl-c1"},{"start":44,"end":46,"cssClass":"pl-s1"},{"start":47,"end":57,"cssClass":"pl-s1"}],[{"start":8,"end":12,"cssClass":"pl-s1"},{"start":13,"end":20,"cssClass":"pl-s1"},{"start":21,"end":22,"cssClass":"pl-c1"},{"start":23,"end":30,"cssClass":"pl-s1"}],[{"start":8,"end":12,"cssClass":"pl-s1"},{"start":13,"end":21,"cssClass":"pl-s1"},{"start":22,"end":23,"cssClass":"pl-c1"},{"start":24,"end":28,"cssClass":"pl-s1"},{"start":29,"end":34,"cssClass":"pl-en"},{"start":35,"end":42,"cssClass":"pl-s1"},{"start":44,"end":51,"cssClass":"pl-s1"},{"start":51,"end":52,"cssClass":"pl-c1"},{"start":52,"end":59,"cssClass":"pl-s1"}],[],[{"start":4,"end":13,"cssClass":"pl-en"},{"start":5,"end":13,"cssClass":"pl-s1"}],[{"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":27,"cssClass":"pl-s1"},{"start":28,"end":35,"cssClass":"pl-s1"}],[{"start":8,"end":35,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":19,"cssClass":"pl-s1"},{"start":20,"end":28,"cssClass":"pl-s1"}],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":18,"cssClass":"pl-s1"},{"start":20,"end":27,"cssClass":"pl-s1"},{"start":29,"end":31,"cssClass":"pl-s1"},{"start":32,"end":39,"cssClass":"pl-s1"},{"start":41,"end":48,"cssClass":"pl-s1"},{"start":50,"end":55,"cssClass":"pl-s1"},{"start":56,"end":57,"cssClass":"pl-c1"},{"start":58,"end":62,"cssClass":"pl-c1"},{"start":64,"end":66,"cssClass":"pl-c1"},{"start":67,"end":69,"cssClass":"pl-s1"},{"start":70,"end":77,"cssClass":"pl-s1"}],[{"start":8,"end":99,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":13,"cssClass":"pl-s"}],[{"start":0,"end":72,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":83,"cssClass":"pl-s"}],[{"start":0,"end":62,"cssClass":"pl-s"}],[{"start":0,"end":71,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":16,"cssClass":"pl-s"}],[{"start":0,"end":34,"cssClass":"pl-s"}],[{"start":0,"end":0,"cssClass":"pl-s"}],[{"start":0,"end":15,"cssClass":"pl-s"}],[{"start":0,"end":90,"cssClass":"pl-s"}],[{"start":0,"end":11,"cssClass":"pl-s"}],[{"start":8,"end":20,"cssClass":"pl-s1"},{"start":21,"end":22,"cssClass":"pl-c1"},{"start":23,"end":25,"cssClass":"pl-s1"},{"start":26,"end":29,"cssClass":"pl-en"},{"start":30,"end":37,"cssClass":"pl-s1"}],[{"start":8,"end":15,"cssClass":"pl-s1"},{"start":16,"end":17,"cssClass":"pl-c1"},{"start":19,"end":31,"cssClass":"pl-s1"},{"start":32,"end":33,"cssClass":"pl-c1"},{"start":34,"end":37,"cssClass":"pl-c1"},{"start":39,"end":40,"cssClass":"pl-c1"},{"start":42,"end":54,"cssClass":"pl-s1"},{"start":55,"end":57,"cssClass":"pl-c1"},{"start":58,"end":61,"cssClass":"pl-c1"},{"start":62,"end":63,"cssClass":"pl-c1"},{"start":64,"end":71,"cssClass":"pl-s1"}],[],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":13,"cssClass":"pl-s1"},{"start":14,"end":17,"cssClass":"pl-en"},{"start":18,"end":25,"cssClass":"pl-s1"}],[{"start":12,"end":52,"cssClass":"pl-c"}],[{"start":12,"end":22,"cssClass":"pl-s1"},{"start":23,"end":24,"cssClass":"pl-c1"},{"start":25,"end":27,"cssClass":"pl-s1"},{"start":28,"end":36,"cssClass":"pl-en"},{"start":37,"end":44,"cssClass":"pl-s1"}],[{"start":12,"end":22,"cssClass":"pl-s1"},{"start":23,"end":24,"cssClass":"pl-c1"},{"start":25,"end":27,"cssClass":"pl-s1"},{"start":28,"end":33,"cssClass":"pl-en"},{"start":34,"end":41,"cssClass":"pl-s1"},{"start":42,"end":52,"cssClass":"pl-s1"}],[{"start":12,"end":27,"cssClass":"pl-s1"},{"start":28,"end":29,"cssClass":"pl-c1"},{"start":30,"end":32,"cssClass":"pl-s1"},{"start":33,"end":36,"cssClass":"pl-en"},{"start":37,"end":39,"cssClass":"pl-c1"},{"start":40,"end":41,"cssClass":"pl-c1"},{"start":42,"end":52,"cssClass":"pl-s1"},{"start":54,"end":59,"cssClass":"pl-s1"},{"start":59,"end":60,"cssClass":"pl-c1"},{"start":60,"end":62,"cssClass":"pl-s1"},{"start":63,"end":73,"cssClass":"pl-s1"}],[],[{"start":12,"end":55,"cssClass":"pl-c"}],[{"start":12,"end":41,"cssClass":"pl-c"}],[{"start":12,"end":32,"cssClass":"pl-s1"},{"start":33,"end":34,"cssClass":"pl-c1"},{"start":35,"end":37,"cssClass":"pl-s1"},{"start":38,"end":41,"cssClass":"pl-en"},{"start":42,"end":57,"cssClass":"pl-s1"}],[{"start":12,"end":27,"cssClass":"pl-s1"},{"start":28,"end":29,"cssClass":"pl-c1"},{"start":30,"end":50,"cssClass":"pl-s1"},{"start":51,"end":52,"cssClass":"pl-c1"},{"start":53,"end":56,"cssClass":"pl-c1"}],[{"start":12,"end":14,"cssClass":"pl-k"},{"start":15,"end":17,"cssClass":"pl-s1"},{"start":18,"end":21,"cssClass":"pl-en"},{"start":22,"end":37,"cssClass":"pl-s1"}],[{"start":16,"end":34,"cssClass":"pl-s1"},{"start":35,"end":36,"cssClass":"pl-c1"},{"start":37,"end":39,"cssClass":"pl-s1"},{"start":40,"end":48,"cssClass":"pl-en"},{"start":49,"end":64,"cssClass":"pl-s1"}],[{"start":16,"end":39,"cssClass":"pl-s1"},{"start":40,"end":41,"cssClass":"pl-c1"},{"start":43,"end":44,"cssClass":"pl-c1"},{"start":45,"end":46,"cssClass":"pl-c1"},{"start":47,"end":54,"cssClass":"pl-s1"},{"start":56,"end":57,"cssClass":"pl-c1"},{"start":58,"end":60,"cssClass":"pl-s1"},{"start":61,"end":64,"cssClass":"pl-en"}],[{"start":20,"end":22,"cssClass":"pl-c1"},{"start":23,"end":24,"cssClass":"pl-c1"},{"start":25,"end":35,"cssClass":"pl-s1"},{"start":36,"end":54,"cssClass":"pl-s1"},{"start":57,"end":62,"cssClass":"pl-s1"},{"start":62,"end":63,"cssClass":"pl-c1"},{"start":63,"end":65,"cssClass":"pl-s1"},{"start":66,"end":76,"cssClass":"pl-s1"}],[],[{"start":16,"end":31,"cssClass":"pl-s1"},{"start":32,"end":50,"cssClass":"pl-s1"},{"start":52,"end":53,"cssClass":"pl-c1"},{"start":54,"end":77,"cssClass":"pl-s1"}],[],[{"start":12,"end":48,"cssClass":"pl-c"}],[{"start":12,"end":19,"cssClass":"pl-s1"},{"start":20,"end":30,"cssClass":"pl-s1"},{"start":32,"end":33,"cssClass":"pl-c1"},{"start":34,"end":49,"cssClass":"pl-s1"}],[{"start":12,"end":24,"cssClass":"pl-s1"},{"start":25,"end":35,"cssClass":"pl-s1"},{"start":37,"end":38,"cssClass":"pl-c1"},{"start":39,"end":41,"cssClass":"pl-s1"},{"start":42,"end":45,"cssClass":"pl-en"},{"start":46,"end":61,"cssClass":"pl-s1"}],[],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":13,"cssClass":"pl-s1"},{"start":14,"end":17,"cssClass":"pl-en"},{"start":18,"end":30,"cssClass":"pl-s1"},{"start":31,"end":32,"cssClass":"pl-c1"},{"start":33,"end":36,"cssClass":"pl-c1"},{"start":38,"end":41,"cssClass":"pl-c1"},{"start":42,"end":46,"cssClass":"pl-s1"},{"start":47,"end":63,"cssClass":"pl-s1"}],[{"start":12,"end":15,"cssClass":"pl-s1"},{"start":16,"end":17,"cssClass":"pl-c1"},{"start":18,"end":20,"cssClass":"pl-s1"},{"start":21,"end":24,"cssClass":"pl-en"},{"start":25,"end":37,"cssClass":"pl-s1"}],[{"start":12,"end":17,"cssClass":"pl-k"},{"start":18,"end":28,"cssClass":"pl-v"}],[{"start":16,"end":80,"cssClass":"pl-s"},{"start":50,"end":55,"cssClass":"pl-s1"},{"start":50,"end":51,"cssClass":"pl-kos"},{"start":51,"end":54,"cssClass":"pl-s1"},{"start":54,"end":55,"cssClass":"pl-kos"}],[{"start":16,"end":74,"cssClass":"pl-s"}],[],[],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":22,"cssClass":"pl-s1"}],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":24,"cssClass":"pl-en"},{"start":25,"end":29,"cssClass":"pl-s1"},{"start":31,"end":33,"cssClass":"pl-c1"},{"start":34,"end":38,"cssClass":"pl-s1"}],[{"start":8,"end":63,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":20,"cssClass":"pl-c1"}],[],[{"start":4,"end":13,"cssClass":"pl-en"},{"start":5,"end":13,"cssClass":"pl-s1"}],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":18,"cssClass":"pl-en"},{"start":19,"end":23,"cssClass":"pl-s1"},{"start":25,"end":27,"cssClass":"pl-c1"},{"start":28,"end":32,"cssClass":"pl-s1"},{"start":33,"end":36,"cssClass":"pl-s1"},{"start":38,"end":41,"cssClass":"pl-v"}],[{"start":8,"end":68,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-k"}],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":14,"cssClass":"pl-en"},{"start":15,"end":19,"cssClass":"pl-s1"},{"start":21,"end":26,"cssClass":"pl-s1"},{"start":28,"end":34,"cssClass":"pl-s1"},{"start":36,"end":38,"cssClass":"pl-c1"},{"start":39,"end":43,"cssClass":"pl-s1"}],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":14,"cssClass":"pl-c1"},{"start":15,"end":25,"cssClass":"pl-en"},{"start":26,"end":31,"cssClass":"pl-s1"},{"start":33,"end":41,"cssClass":"pl-v"}],[{"start":12,"end":18,"cssClass":"pl-k"},{"start":19,"end":33,"cssClass":"pl-v"}],[{"start":8,"end":14,"cssClass":"pl-k"}],[{"start":12,"end":17,"cssClass":"pl-en"},{"start":20,"end":26,"cssClass":"pl-en"},{"start":27,"end":32,"cssClass":"pl-s1"}],[{"start":12,"end":15,"cssClass":"pl-c1"},{"start":16,"end":20,"cssClass":"pl-s1"},{"start":21,"end":28,"cssClass":"pl-s1"},{"start":29,"end":34,"cssClass":"pl-s1"},{"start":35,"end":37,"cssClass":"pl-c1"},{"start":38,"end":43,"cssClass":"pl-s1"},{"start":44,"end":51,"cssClass":"pl-s1"},{"start":52,"end":57,"cssClass":"pl-s1"}],[{"start":12,"end":15,"cssClass":"pl-c1"},{"start":16,"end":18,"cssClass":"pl-s1"},{"start":19,"end":27,"cssClass":"pl-en"},{"start":28,"end":32,"cssClass":"pl-s1"},{"start":33,"end":40,"cssClass":"pl-s1"},{"start":42,"end":47,"cssClass":"pl-s1"},{"start":48,"end":55,"cssClass":"pl-s1"},{"start":57,"end":61,"cssClass":"pl-s1"},{"start":61,"end":62,"cssClass":"pl-c1"},{"start":62,"end":63,"cssClass":"pl-c1"},{"start":65,"end":69,"cssClass":"pl-s1"},{"start":69,"end":70,"cssClass":"pl-c1"},{"start":70,"end":74,"cssClass":"pl-s1"},{"start":75,"end":82,"cssClass":"pl-s1"}],[],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":16,"cssClass":"pl-en"},{"start":17,"end":21,"cssClass":"pl-s1"},{"start":23,"end":25,"cssClass":"pl-c1"},{"start":26,"end":29,"cssClass":"pl-s1"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":19,"cssClass":"pl-en"},{"start":20,"end":24,"cssClass":"pl-s1"},{"start":25,"end":32,"cssClass":"pl-s1"},{"start":33,"end":40,"cssClass":"pl-en"}],[],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":16,"cssClass":"pl-en"},{"start":17,"end":21,"cssClass":"pl-s1"},{"start":23,"end":25,"cssClass":"pl-c1"},{"start":26,"end":29,"cssClass":"pl-s1"}],[{"start":8,"end":11,"cssClass":"pl-s1"},{"start":12,"end":13,"cssClass":"pl-c1"},{"start":14,"end":16,"cssClass":"pl-s1"},{"start":17,"end":33,"cssClass":"pl-en"}],[{"start":8,"end":10,"cssClass":"pl-s1"},{"start":11,"end":27,"cssClass":"pl-en"},{"start":28,"end":37,"cssClass":"pl-s1"},{"start":37,"end":38,"cssClass":"pl-c1"},{"start":38,"end":40,"cssClass":"pl-c1"}],[{"start":8,"end":10,"cssClass":"pl-s1"},{"start":11,"end":27,"cssClass":"pl-en"},{"start":28,"end":30,"cssClass":"pl-c1"},{"start":30,"end":33,"cssClass":"pl-s1"}],[{"start":8,"end":14,"cssClass":"pl-k"},{"start":15,"end":25,"cssClass":"pl-s"},{"start":26,"end":32,"cssClass":"pl-en"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":26,"cssClass":"pl-s1"},{"start":27,"end":35,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-en"},{"start":17,"end":21,"cssClass":"pl-s1"},{"start":22,"end":29,"cssClass":"pl-s1"}],[{"start":12,"end":35,"cssClass":"pl-s"},{"start":22,"end":33,"cssClass":"pl-s1"},{"start":22,"end":23,"cssClass":"pl-kos"},{"start":23,"end":27,"cssClass":"pl-s1"},{"start":28,"end":32,"cssClass":"pl-s1"},{"start":32,"end":33,"cssClass":"pl-kos"},{"start":36,"end":38,"cssClass":"pl-k"},{"start":39,"end":43,"cssClass":"pl-s1"},{"start":44,"end":48,"cssClass":"pl-s1"},{"start":49,"end":51,"cssClass":"pl-c1"},{"start":52,"end":55,"cssClass":"pl-c1"},{"start":56,"end":60,"cssClass":"pl-c1"},{"start":61,"end":65,"cssClass":"pl-k"},{"start":66,"end":68,"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":"waveform.py","displayUrl":"https://github.com/Qiskit/qiskit/blob/main/qiskit/pulse/library/waveform.py?raw=true","headerInfo":{"blobSize":"5.06 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":"e9ad9bc","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2FQiskit%2Fqiskit%2Fblob%2Fmain%2Fqiskit%2Fpulse%2Flibrary%2Fwaveform.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"137","truncatedSloc":"113"},"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/pulse/library/waveform.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/pulse/library/waveform.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":"Waveform","kind":"class","ident_start":722,"ident_end":730,"extent_start":716,"extent_end":5181,"fully_qualified_name":"Waveform","ident_utf16":{"start":{"line_number":22,"utf16_col":6},"end":{"line_number":22,"utf16_col":14}},"extent_utf16":{"start":{"line_number":22,"utf16_col":0},"end":{"line_number":136,"utf16_col":9}}},{"name":"__init__","kind":"function","ident_start":893,"ident_end":901,"extent_start":889,"extent_end":1852,"fully_qualified_name":"Waveform.__init__","ident_utf16":{"start":{"line_number":27,"utf16_col":8},"end":{"line_number":27,"utf16_col":16}},"extent_utf16":{"start":{"line_number":27,"utf16_col":4},"end":{"line_number":49,"utf16_col":60}}},{"name":"samples","kind":"function","ident_start":1876,"ident_end":1883,"extent_start":1872,"extent_end":1969,"fully_qualified_name":"Waveform.samples","ident_utf16":{"start":{"line_number":52,"utf16_col":8},"end":{"line_number":52,"utf16_col":15}},"extent_utf16":{"start":{"line_number":52,"utf16_col":4},"end":{"line_number":54,"utf16_col":28}}},{"name":"_clip","kind":"function","ident_start":1979,"ident_end":1984,"extent_start":1975,"extent_end":4178,"fully_qualified_name":"Waveform._clip","ident_utf16":{"start":{"line_number":56,"utf16_col":8},"end":{"line_number":56,"utf16_col":13}},"extent_utf16":{"start":{"line_number":56,"utf16_col":4},"end":{"line_number":105,"utf16_col":22}}},{"name":"is_parameterized","kind":"function","ident_start":4188,"ident_end":4204,"extent_start":4184,"extent_end":4304,"fully_qualified_name":"Waveform.is_parameterized","ident_utf16":{"start":{"line_number":107,"utf16_col":8},"end":{"line_number":107,"utf16_col":24}},"extent_utf16":{"start":{"line_number":107,"utf16_col":4},"end":{"line_number":109,"utf16_col":20}}},{"name":"parameters","kind":"function","ident_start":4328,"ident_end":4338,"extent_start":4324,"extent_end":4450,"fully_qualified_name":"Waveform.parameters","ident_utf16":{"start":{"line_number":112,"utf16_col":8},"end":{"line_number":112,"utf16_col":18}},"extent_utf16":{"start":{"line_number":112,"utf16_col":4},"end":{"line_number":114,"utf16_col":17}}},{"name":"__eq__","kind":"function","ident_start":4460,"ident_end":4466,"extent_start":4456,"extent_end":4777,"fully_qualified_name":"Waveform.__eq__","ident_utf16":{"start":{"line_number":116,"utf16_col":8},"end":{"line_number":116,"utf16_col":14}},"extent_utf16":{"start":{"line_number":116,"utf16_col":4},"end":{"line_number":123,"utf16_col":9}}},{"name":"__hash__","kind":"function","ident_start":4787,"ident_end":4795,"extent_start":4783,"extent_end":4853,"fully_qualified_name":"Waveform.__hash__","ident_utf16":{"start":{"line_number":125,"utf16_col":8},"end":{"line_number":125,"utf16_col":16}},"extent_utf16":{"start":{"line_number":125,"utf16_col":4},"end":{"line_number":126,"utf16_col":43}}},{"name":"__repr__","kind":"function","ident_start":4863,"ident_end":4871,"extent_start":4859,"extent_end":5181,"fully_qualified_name":"Waveform.__repr__","ident_utf16":{"start":{"line_number":128,"utf16_col":8},"end":{"line_number":128,"utf16_col":16}},"extent_utf16":{"start":{"line_number":128,"utf16_col":4},"end":{"line_number":136,"utf16_col":9}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"csrf_tokens":{"/Qiskit/qiskit/branches":{"post":"AoJa-NcogcXid0lr6SSLuVImn0HzjPr-YRD0zEyk_822nbpq01obDLql8x6KMcJjiKXW1iP4lxsw9UG6zdwkrw"},"/repos/preferences":{"post":"4s915do7FeQisTjJCwwGysVmcESXKjVxJqBK9fFs-jqXtSwmzmzpfrLhU12gXJOmbCGx-_vCq6pYRVpNwRaACg"}}},"title":"qiskit/qiskit/pulse/library/waveform.py at main ยท Qiskit/qiskit"}