-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinternal_qubit_label_builder.hpp
More file actions
30 lines (26 loc) · 1.12 KB
/
internal_qubit_label_builder.hpp
File metadata and controls
30 lines (26 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
* Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
* Copyright (c) 2025 Munich Quantum Software Company GmbH
* All rights reserved.
*
* SPDX-License-Identifier: MIT
*
* Licensed under the MIT License
*/
#pragma once
#include <cstddef>
#include <string>
#include <string_view>
namespace syrec {
class InternalQubitLabelBuilder {
public:
static constexpr std::string_view INTERNAL_QUBIT_LABEL_PREFIX = "__q";
static constexpr std::string_view INTERNAL_ANCILLARY_QUBIT_LABEL_POSTFIX = "_anc";
[[maybe_unused]] static std::string buildNonAncillaryQubitLabel(const std::size_t currNumQuantumRegistersInQuantumComputation) {
return std::string(INTERNAL_QUBIT_LABEL_PREFIX) + std::to_string(currNumQuantumRegistersInQuantumComputation);
}
[[maybe_unused]] static std::string buildAncillaryQubitLabel(const std::size_t currNumQuantumRegistersInQuantumComputation) {
return buildNonAncillaryQubitLabel(currNumQuantumRegistersInQuantumComputation) + std::string(INTERNAL_ANCILLARY_QUBIT_LABEL_POSTFIX);
}
};
} // namespace syrec