Gray stone houses with slate roofs lay clustered along the few narrow streets of Jarra, clinging to a hillside above a little stream spanned by a low wooden bridge. The muddy streets were empty, and so was the sloping village green, except for one man sweeping the steps of the village’s only inn, standing beside its stone stable; but it looked as if there had been a good many people on the green not long before. Half a dozen arches, woven of green branches and dotted with such few flowers as could be found this early in the year, stood in a circle in the middle of the grass. The ground had a trampled look, and there were other signs of a gathering; a woman’s red scarf lying tangled at the foot of one of the arches, a child’s knitted cap, a pewter pitcher tumbled on its side, a few half-eaten scraps of food.
The aromas of sweet wine and spiced cakes clung about the green, mixed in with smoke from dozens of chimneys and evening meals cooking. For an instant Perrin’s nose caught another odor, one he could not identify, a faint trail that raised the hair on the back of his neck with its vileness. Then it was gone. But he was sure something had passed that way, something—wrong. He scrubbed at his nose as if to rub away the memory of it. That can’t be Rand. Light, even if he has gone mad, that can’t be him. Can it?
A painted sign hung above the inn door, a man standing on one foot with his arms thrown in the air: Hardin’s Leap. As they drew rein in front of the square stone building, the sweeper straightened, yawning fiercely. He gave a start at Perrin’s eyes, but his own already protruding eyes went wide when they fell on Loial. With his wide mouth and no chin to speak of, he looked something like a frog. There was an old smell of sour wine about him—to Perrin, at least. The fellow had certainly been part of the celebration.
The man gave himself a shake, and turned it into a bow with one hand resting on the double row of wooden buttons running down his coat. His eyes flickered from one to another of them, popping even more every time they rested on Loial. “Welcome, good mistress, and the Light illumine your way. Welcome, good masters. You wish food, rooms, baths? All to be had, here at the Leap. Master Harod, the innkeeper, keeps a good house. I am called Simion. If you wish anything, ask for Simion, and he will get it for you.” He yawned again, covering his mouth in embarrassment and bowing to hide it. “I beg your pardon, good mistress. You have come far? Have you word of the Great Hunt? The Hunt for the Horn of Valere? Or the false Dragon? It’s said there’s a false Dragon in Tarabon. Or maybe Arad Doman.”
“We have not come that far,” Lan said, swinging down from his saddle. “No doubt you know more than I.” They all began dismounting.
“You have had a wedding here?” Moiraine said.
“A wedding, good mistress? Why, we’ve had a lifetime of weddings. A plague of them. All in the last two days. There isn’t a woman old enough to speak the betrothal remains unmarried, not in the whole village, not for a mile in any direction. Why, even Widow Jorath dragged old Banas through the arches, and they’d both sworn they’d never marry again. It was like a whirlwind just snatched everybody up. Rilith, the weaver’s daughter, she started it, asking Jon the blacksmith to marry her, and him old enough to be her father and more. The old fool just took off his apron and said yes, and she demanded the arches be put up right then and there. Wouldn’t hear of a proper wait, and all the other women sided with her. Since then we’ve had marriages day and night. Why, nobody’s had any sleep at all hardly.”
“That’s very interesting,” Perrin said when Simion paused to yawn again, “but have you seen a young—”
“It is very interesting,” Moiraine said, cutting him off, “and I would hear more of it later, perhaps. For now, we would like rooms, and a meal.” Lan made a small gesture toward Perrin, down low, as if telling him to hold his tongue.
“Of course, good mistress. A meal. Rooms.” Simion hesitated, eyeing Loial. “We’ll have to push two beds together for—” He leaned closer to Moiraine and dropped his voice. “Pardon, good mistress, but—uh—what exactly—is he? Meaning no disrespect,” he added hastily.
He had not spoken softly enough, for Loial’s ears twitched irritably. “I am an Ogier! What did you think I was? A Trolloc?”
Simion took a step back at the booming voice. “Trolloc, good—uh—master? Why, I’m a grown man. I don’t believe in children’s tales. Uh, did you say Ogier? Why, Ogier are childr—I mean . . . that is . . . ” In desperation, he turned to bellow toward the stable next to the inn. “Nico! Patrim! Visitors! Come see to their horses!” After a moment two boys with hay in their hair tumbled out of the stable, yawning and rubbing their eyes. Simion gestured to the steps, bowing, as the boys gathered reins.
Perrin slung his saddlebags and blanketroll over his shoulder and carried his bow as he followed Moiraine and Lan inside, with Simion bowing and bobbing ahead of them. Loial had to duck low under the lintel, and the ceiling inside only cleared his head by a foot. He kept rumbling to himself about not understanding why so few humans remembered the Ogier. His voice was like distant thunder. Even Perrin, right in front of him, could only understand half of his words.
The inn smelled of ale and wine, cheese and weariness, and the aroma of roasting mutton drifted from somewhere in the back. The few men in the common room sagged over their mugs as if they would really like to lie down on the benches and go to sleep. One plump serving woman was drawing a mug of ale from one of the barrels at the end of the room. The innkeeper himself, in a long white apron, sat on a tall stool in the corner, leaning against the wall. As the newcomers entered, he lifted his head, bleary-eyed. His jaw dropped at the sight of Loial.
“Visitors, Master Harod,” Simion announced. “They want rooms. Master Harod? He’s an Ogier, Master Harod.” The serving woman turned and saw Loial, and dropped the mug with a clatter. None of the weary men at the tables even looked up. One had put his head down on the table and was snoring.
Loial’s ears twitched violently.
Master Harod got to his feet slowly, eyes fastened on Loial, smoothing his apron all the while. “At least he isn’t a Whitecloak,” he said at last, then gave a start as if surprised he had spoken aloud. “That is to say, welcome, good mistress. Good masters. Forgive my lack of manners. I can only plead tiredness, good mistress.” He darted another glance at Loial, and mouthed “Ogier?” with a look of disbelief.
Loial opened his mouth, but Moiraine forestalled him. “As your man said, good innkeeper, I wish rooms for my party for the night, and a meal.”
“Oh! Of course, good mistress. Of course. Simion, show these good people to my best rooms, so they can put down their belongings. I’ll have a fine meal laid out for you when you return, good mistress. A fine meal.”
“If it pleases you to follow me, good mistress,” Simion said. “Good masters.” He bowed the way to stairs at one side of the common room.
Behind them, one of the men at the tables suddenly exclaimed, “What in the name of the Light is that?” Master Harod began explaining about Ogier, making it sound as if he were quite familiar with them. Most of what Perrin heard before they left the voices behind was wrong. Loial’s ears twitched without stop.
On the second floor, the Ogier’s head came near to brushing along the ceiling. The narrow corridor was growing dark, with only the sharp light of sunset through a window next to the door at the far end.
“Candles in the rooms, good mistress,” Simion said. “I should have brought a lamp, but my head is still spinning from all those weddings. I’ll send someone up to light the fire, if you wish. And you’ll want wash water, of course.” He pushed open a door. “Our best room, good mistress. We don’t have many—not many strangers, you see—but this is our best.”
“I’ll take the one next to it,” Lan said. He had Moiraine’s blanketroll and saddlebags on his shoulder as well as his own, and the bundle containing the Dragon banner, too.
“Oh, good master, that’s not a very good room at all. Narrow bed. Cramped. Meant for a servant, I suspect, as if we’d ever have anybody here who had a servant. Begging your pardon, good mistress.”
“I will take it anyway,” Lan said firmly.
“Simion,” Moiraine said, “does Master Harod dislike the Children of the Light?”
“Well, he does, good mistress. He didn’t, but he does. It isn’t good policy, disliking the Children, not so close to the border as we are. They come through Jarra all the time, like there wasn’t any border at all. But there was trouble, yesterday. A fistful of trouble. And with the weddings going on, and all.”
“What happened, Simion?”
The man looked at her sharply before answering. Perrin did not think anyone else saw how sharply, in the dimness. “There was about twenty of them, come day before yesterday. No trouble then. But yesterday . . . Why, three of them up and announced they weren’t Children of the Light anymore. They took off their cloaks and just rode away.”
Lan grunted. “Whitecloaks swear for life. What did their commander do?”
“Why, he would have done something, you can be sure, good master, but another of them announced he was off to find the Horn of Valere. Anyway, still another said they should be hunting the Dragon. That one said he was going to Almoth Plain when he left. Then some of them started saying things to women in the streets, things they shouldn’t have, and grabbing at them. The women were screaming, and Children yelling at the ones bothering the women. I never saw such commotion.”
“Didn’t any of you try to stop them?” Perrin said.
“Good master, you carry that axe like you know how to use it, but it isn’t so easy to face up to men with swords and armor and all, when all you know how to use is a broom or a hoe. The rest of the Whitecloaks, those as hadn’t gone off, put an end to it. Almost came to drawing swords. And that wasn’t the worst. Two more just went mad—if the others weren’t. Those two started raving that Jarra was full of Darkfriends. They tried to burn the village down—said they would!—beginning with the Leap. You can see the burn marks out back, where they got it started. Fought the other Whitecloaks when they tried to stop them. The Whitecloaks that were left, they helped us put it out, tied those two up tight, and rode out of here, back toward Amadicia. Good riddance, I say, and if they never come back, it’ll be too soon.”
“Rough behavior,” Lan said, “even for Whitecloaks.”
Simion bobbed his head in agreement. “As you say, good master. They never acted like that before. Swagger around, yes. Look at you like you were dirt, and poke their noses in where they hadn’t any business. But they never caused trouble before. Not like that, anyway.”
“They are gone now,” Moiraine said, “and troubles with them. I am sure we will pass a quiet night.”
Perrin kept his mouth shut, but he was not quiet inside. All these weddings and Whitecloaks are all very well, but I’d sooner know if Rand stopped here, and which way he went when he left. That smell couldn’t have been him.
He let Simion guide him on down the hall to another room, with two beds and a washstand, a pair of stools and not much else. Loial stooped to put his head through the doorway. Only a little light came in by the narrow windows. The beds were big enough, with blankets and comforters folded at the foot, but the mattresses looked lumpy. Simion fumbled on the mantel above the fireplace until he found a candle, and a tinderbox to get it alight.
“I’ll see about getting some beds put together for you, good—uh—Ogier. Yes, just a moment, now.” He showed no sign of hurry to be about it, though, fussing with the candlestick as if he had to place it just right. Perrin thought he looked uneasy.
Well, I’d be more than uneasy if Whitecloaks had been acting like that in Emond’s Field. “Simion, has another stranger passed through here in the last day or two? A young man, tall, with gray eyes and reddish hair? He might have played the flute for a meal or a bed.”
“I remember him, good master,” Simion said, still shifting the candlestick. “Came yesterday morning, early. Looked hungry, he did. He played the flute for all the weddings, yesterday. Good-looking young fellow. Some of the women eyed him, at first, but . . . ” He paused, looking at Perrin sideways. “Is he a friend of yours, good master?”
“I know him,” Perrin said. “Why?”
Simion hesitated. “No reason, good master. He was an odd fellow, that’s all. He talked to himself, sometimes, and sometimes he laughed when nobody had said anything. Slept in this very room, last night, or part of it. Woke us all in the middle of the night, yelling. It was just a nightmare, but he wouldn’t stay any longer. Master Harod didn’t make much effort to talk him into it, after all that noise.” Simion paused again. “He said something strange when he left.”
“What?” Perrin demanded.
“He said somebody was after him. He said . . . ” The chinless man swallowed and went on more slowly. “Said they’d kill him if he didn’t go. ‘One of us has to die, and I mean it to be him.’ His very words.”
“He did not mean us,” Loial rumbled. “We are his friends.”
“Of course, good—uh—good Ogier. Of course, he didn’t mean you. I—uh—I don’t mean to say anything about a friend of yours, but I—uh—I—think he’s sick. In the head, you know.”
“We will take care of him,” Perrin said. “That’s why we’re following him. Which way did he go?”
“I knew it,” Simion said, bouncing on his toes. “I knew she could help as soon as I saw you. Which way? East, good master. East, like the Dark One himself was on his heels. Do you think she’ll help me? Help my brother, that is? Noam’s bad sick, and Mother Roon says she can’t do anything.”
Perrin kept his face expressionless, and bought a little time to think by propping his bow in the corner and setting his blanketroll and saddlebags on one of the beds. The problem was that thinking did not help much. He looked at Loial, but found no help there; consternation had the Ogier’s ears drooping and his long eyebrows hanging down on his cheeks. “What makes you think she can help your brother?”  The right question is, what does he mean to do about it?
“Why, I traveled to Jehannah, once, good master, and I saw two . . . two women like her. I couldn’t mistake her after that.” His voice dropped to a whisper. “It’s said they can raise the dead, good master.”
“Who else knows this?” Perrin asked sharply, and at the same time Loial said, “If your brother is dead, there is nothing anyone can do.”
The frog-faced man looked from one to the other of them anxiously, and his words came in a babble. “No one knows but me, good master. Noam isn’t dead, good Ogier, only sick. I swear nobody else could recognize her. Even Master Harod’s never been more than twenty miles from here in his life. He’s so bad sick. I’d ask her myself, only my knees’d be shaking so hard she couldn’t hear me talk. What if she took offense and called down lightning on me? And what if I’d been wrong? It isn’t the kind of thing you accuse a woman of without . . . I mean . . . ooh . . . ” He raised his hands, half in pleading, half as if to defend himself.
“I can make no promises,” Perrin said, “but I’ll speak to her. Loial, why don’t you keep Simion company till I’ve spoken to Moiraine?”
“Of course,” the Ogier boomed. Simion gave a start when Loial’s hand swallowed his shoulder. “He will show me my room, and we will talk. Tell me, Simion, what do you know of trees?”
“T-t-trees, g-good Ogier?”
Perrin did not wait any longer. He hurried back down the dark hall and knocked on Moiraine’s door, barely waiting for her peremptory “Come!” before pushing in.
Half a dozen candles showed that the Leap’s best room was none too good, though the one bed had four tall posts supporting a canopy, and the mattress looked less full of lumps than Perrin’s. There was a scrap of carpet on the floor, and two cushioned chairs instead of stools. Other than that, it looked no different from his room. Moiraine and Lan stood in front of the cold hearth as if they had been discussing something, and the Aes Sedai did not look pleased at being interrupted. The Warder’s face was as imperturbable as a carving.
“Rand’s been here, all right,” Perrin started off. “That fellow Simion remembers him.” Moiraine hissed through her teeth.

Perrin squared his feet to face the Warder. That was easier than facing Moiraine’s glare. “How could we find out whether he had been here without asking questions? Tell me that. He left last night, if you are interested, heading east. And he was carrying on about somebody following him, trying to kill him.”
“East.” Moiraine nodded. The utter calm of her voice was at odds with her disapproving eyes. “That is good to know, though it had to be so if he is going to Tear. But I was fairly certain he had been here even before I heard about the Whitecloaks, and they made it a certainty. Rand is almost surely right about one thing, Perrin. I cannot believe we are the only ones trying to find him. And if they find out about us, they may well try to stop us. We have enough to contend with trying to catch up to Rand without that. You must learn to hold your tongue until I tell you to speak.”
“The Whitecloaks?” Perrin said incredulously. Hold my tongue? Burn me, if I will! “How could they tell you—? Rand’s madness. It is catching?”
“Not his madness,” Moiraine said, “if he is far enough gone yet to be called mad. Perrin, he is more strongly ta’veren than anyone since the Age of Legends. Yesterday, in this village, the Pattern . . . moved, shaped itself around him like clay shaped on a mold. The weddings, the Whitecloaks, these were enough to say Rand had been here, for anyone who knew to listen.”
Perrin drew a long breath. “And this is what we’ll find everywhere he’s been? Light, if there are Shadowspawn after him, they can track him as easily as we can.”
“Perhaps,” Moiraine said. “Perhaps not. No one knows anything about ta’veren as strong as Rand.” For just a moment she sounded vexed at not knowing. “Artur Hawkwing was the most strongly ta’veren of whom any writings remain. And Hawkwing was in no way as strong as Rand.”
“It is said,” Lan put in, “that there were times when people in the same room with Hawkwing spoke truth when they meant to lie, made decisions they had not even known they were contemplating. Times when every toss of the dice, every turn of the cards, went his way. But only times.”
“You mean you don’t know,” Perrin said. “He could leave a trail of weddings and Whitecloaks gone mad all the way to Tear.”
“I mean I know as much as there is to know,” Moiraine said sharply. Her dark-eyed gaze chastised Perrin like a whip. “The Pattern weaves finely around ta’veren, and others can follow the shape of those threads if they know where to look. Be careful your tongue does not unravel more than you can know.”
In spite of himself Perrin hunched his shoulders as if she were delivering real blows. “Well, you had better be glad I opened my mouth this time. Simion knows you’re Aes Sedai. He wants you to Heal his brother Noam of some sickness. If I hadn’t talked to him, he would never have worked up nerve enough to ask, but he might have started talking among his friends.”
Lan caught Moiraine’s eye, and for a moment they stared at one another. The Warder had the air about him of a wolf about to leap. Finally, Moiraine shook her head. “No,” she said.
“As you wish. It is your decision.” Lan sounded as if he thought she had made the wrong one, but the tension left him.
Perrin stared at them. “You were thinking of . . . Simion couldn’t tell anyone if he were dead, could he?”
“He will not die by my actions,” Moiraine said. “But I cannot, and will not, promise that it will always be so. We must find Rand, and I will not fail in that. Is that spoken plainly enough for you?” Caught in her gaze, Perrin could make no answer. She nodded as if his silence were answer enough. “Now take me to Simion.”
The door to Loial’s room stood open, spilling a pool of candlelight into the hall. The two beds inside had been pushed together, and Loial and Simion were seated on the edge of one. The chinless man was staring up at Loial with his mouth open and an expression of wonder on his face.
“Oh, yes, the stedding are wonderful,” Loial was saying. “There is such peace there, under the Great Trees. You humans may have your wars and strife, but nothing ever troubles the stedding. We tend the trees and live in harmony . . . ” He trailed off when he saw Moiraine, with Lan and Perrin behind her.
Simion scrambled to his feet, bowing and backing away until he came up against the far wall. “Uh . . . good mistress . . . Uh . . . uh . . . ” Even then, he continued bobbing like a toy on a string.
“Show me to your brother,” Moiraine commanded, “and I will do what I can. Perrin, you will come, too, since this good man spoke to you first.” Lan lifted an eyebrow, and she shook her head. “If we all go, we might attract attention. Perrin can give me what protection I need.”
Lan nodded reluctantly, then gave Perrin a hard look. “See that you do, blacksmith. If any harm befalls her . . . ” His cold blue eyes finished the promise.
Simion snatched one of the candles and scurried into the hallway, still bowing so the candlelight made their shadows dance. “This way—uh—good mistress. This way.”
Beyond the door at the end of the hall, outside stairs led down to a cramped alleyway between inn and stable. Night shrank the candle to a flickering pinpoint. The half moon was up in a star-flecked sky, giving more than enough light for Perrin’s eyes. He wondered when Moiraine would tell Simion he did not have to keep bowing, but she never did. The Aes Sedai glided along, clutching her skirts to keep them out of the mud, as though the dark passage were a palace hall and she a queen. The air was already cooling; nights still carried echoes of winter.
“This way.” Simion led them back to a small shed behind the stable and hurriedly unbarred the door. “This way.” Simion pointed. “There, good mistress. There. My brother. Noam.”
The far end of the shed had been barred off with slats of wood; hastily, by the rough look of it.  Behind those bars, a man lay sprawled on his stomach on the straw-covered floor. He was barefoot, his shirt and breeches ripped as if he had torn at them without knowing how to take them off. There was an odor of unwashed flesh that Perrin thought even Simion and Moiraine must smell.
Noam lifted his head and stared at them silently, without expression. There was nothing at all about him to suggest he was Simion’s brother—he had a chin, for one thing, and he was a big man, with heavy shoulders—but that was not what staggered Perrin. Noam stared at them with burnished golden eyes.
“He’d been talking crazy almost a year, good mistress, saying he could . . . could talk with wolves.  ” Simion darted a glance at Perrin. “Well, he’d talk about it when he’d drunk too much. Everybody laughed at him. Then a month or so ago, he didn’t come to town. I went out to see what was the matter, and I found him—like this.”
Cautiously, unwillingly, Perrin reached out toward Noam as he would have toward a wolf. Running through the woods with the cold wind in his nose. Quick dash from cover, teeth snapping at hamstrings. Taste of blood, rich on the tongue. Kill. Perrin jerked back as he would have from a fire, sealed himself off. They were not thoughts at all, really, just a chaotic jumble of desires and images, part memory, part yearning. But there was more wolf there than anything else. He put a hand to the wall to steady himself; his knees felt weak. Light help me!
Moiraine put a hand on the lock.
“Master Harod has the key, good mistress. I don’t know if he’ll—”
She gave a tug, and the lock sprang open. Simion gaped at her. She lifted the lock free of the hasp, and the chinless man turned to Perrin.
“Is that safe, good master? He’s my brother, but he bit Mother Roon when she tried to help, and he . . . he killed a cow. With his teeth,” he finished faintly.
“Moiraine,” Perrin said, “the man is dangerous.”
“All men are dangerous,” she replied in a cool voice. “Now be quiet.” She opened the door and went in. Perrin held his breath.
At her first step, Noam’s lips peeled back from his teeth, and he began to growl, a rumble that deepened till his whole body quivered. Moiraine ignored it. Still growling, Noam wriggled backwards in the straw as she came closer to him, until he had backed himself into a corner. Or she had backed him.
Slowly, calmly, the Aes Sedai knelt and took his head between her hands. Noam’s growl heightened to a snarl, then tailed off in a whimper before Perrin could move. For a long moment Moiraine held Noam’s head, then just as calmly released it and rose. Perrin’s throat tightened as she turned her back on Noam and walked out of the cage, but the man only stared after her. She pushed the slatted door to, slipped the lock back through the hasp, not bothering to snap it shut—and Noam hurled himself snarling against the wooden bars. He bit at them, and battered them with his shoulders, tried to force his head between them, all the while snarling and snapping.
Moiraine brushed straw from her skirt with a steady hand and no expression.
“You do take chances,” Perrin breathed. She looked at him—a steady, knowing gaze—and he dropped his eyes. His yellow eyes.
Simion was staring at his brother. “Can you help him, good mistress?” he asked hoarsely.
“I am sorry, Simion,” she said.
“Can’t you do anything, good mistress? Something? One of those—” his voice fell to a whisper—“Aes Sedai things?”
“Healing is not a simple matter, Simion, and it comes from within as much as from the Healer. There is nothing here that remembers being Noam, nothing that remembers being a man. There are no maps remaining to show him the path back, and nothing left to take that path. Noam is gone, Simion.”
“He—he just used to talk funny, good mistress, when he’d had too much to drink. He just . . .  “Thank you, good mistress. I know you’d have done something if you could.” She put a hand on his shoulder, murmured comforting words, and then she was gone from the shed.
Perrin knew he should follow her, but the man—what had once been a man—snapping at the wooden bars, held him. He took a quick step and surprised himself by removing the dangling lock from the hasp. The lock was a good one, the work of a master smith.
“Good master?”
Perrin stared at the lock in his hand, at the man behind in the cage. Noam had stopped biting at the slats; he stared back at Perrin warily, panting. Some of his teeth had broken off jaggedly.
 Out there, at least he’ll be free, and as happy as he can be. He is not your brother anymore, but you’re the one who has to decide. You can leave him in here for people to stare at, leave him to stare at the bars of his cage until he pines away. You cannot cage a wolf, Simion, not and expect it to be happy. Or live long.”
“Yes,” Simion said slowly. “Yes, I see.” He hesitated, then nodded, and jerked his head toward the shed door.
That was all the answer Perrin needed. He swung back the slatted door and stood aside.
For a moment Noam stared at the opening. Abruptly he darted out of the cage, running on all fours, but with surprising agility. Out of the cage, out of the shed, and into the night. The Light help us both, Perrin thought.
“I suppose it’s better for him to be free.” Simion gave himself a shake. “But I don’t know what Master Harod will say when he finds that door standing open and Noam gone.”
 “Let him puzzle that out.”
Simion barked a quick laugh, abruptly cut off. “He’ll make something out of it. They all will. Some of them say Noam turned into a wolf—fur and all!—when he bit Mother Roon. It’s not true, but they say it.”
Shivering, Perrin leaned his head against the cage door. He may not have fur, but he’s a wolf. He’s wolf, not man. Light, help me.
“We didn’t keep him here always,” Simion said suddenly. “He was at Mother Roon’s house, but she and I got Master Harod to move him here after the Whitecloaks came. They always have a list of names, Darkfriends they’re looking for. It was Noam’s eyes, you see. One of the names the Whitecloaks had was a fellow named Perrin Aybara, a blacksmith. They said he has yellow eyes, and runs with wolves. You can see why I didn’t want them to know about Noam.”
  I suppose she found you soon after it happened. In time to help. I wish she’d come to Jarra a few months ago.”
Perrin was ashamed that he had ever compared the man to a frog. “And I wish she could have done something for him.” Burn me, I wish she could. Suddenly it burst on him that the whole village must know about Noam. About his eyes. “Simion, would you bring me something to eat in my room?” Master Harod and the rest might have been too taken with staring at Loial to notice his eyes before, but they surely would if he ate in the common room.
“Of course. And in the morning, too.  A good man.” Simion looked so pleased that Perrin felt ashamed all over again.


There are 4 scripts on this page that write to the console. Only one of them should run - with the attribute allow-execution.
So, you should see only message in the log: 'Only this message should get logged!'


#include <proAudio.h>
Inheritance diagram for DeviceAudio:
Public Member Functions | |
| void | volume (float left, float right) |
| void | volume (float leftAndRight) |
| bool | loaderRegister (AudioSample *(*loadFunc)(const std::string &), const std::string &suffix) |
| bool | loaderAvailable (const std::string &suffix) const |
| virtual unsigned int | sampleFromFile (const std::string &filename, float volume=1.0f) |
| virtual unsigned int | sampleFromMemory (const AudioSample &sample, float volume=1.0f)=0 |
| virtual bool | sampleDestroy (unsigned int sample)=0 |
| virtual const AudioSample * | sample (unsigned int handle) const |
| virtual unsigned int | soundPlay (unsigned int sample, float volumeL=1.0f, float volumeR=1.0f, float disparity=0.0f, float pitch=1.0f)=0 |
| virtual unsigned int | soundLoop (unsigned int sample, float volumeL=1.0f, float volumeR=1.0f, float disparity=0.0f, float pitch=1.0f)=0 |
| virtual bool | soundUpdate (unsigned int sound, float volumeL, float volumeR, float disparity=0.0f, float pitch=1.0f)=0 |
| virtual bool | soundStop (unsigned int sound)=0 |
| virtual void | soundStop ()=0 |
| virtual unsigned int | soundActive () const =0 |
Static Public Member Functions | |
| static DeviceAudio & | singleton () |
| static void | destroy () |
Protected Member Functions | |
| DeviceAudio () | |
| virtual | ~DeviceAudio () |
Protected Attributes | |
| unsigned int | m_freqOut |
| float | m_volL |
| float | m_volR |
| std::map< std::string, AudioSample *(*)(const std::string &)> | mm_loader |
Static Protected Attributes | |
| static DeviceAudio * | s_instance |
|
|
constructor
|
|
|
destructor
|
|
|
calls the destructor of the singleton object
|
|
|
returns true in case a loader for this file type is available
|
|
|
registers an audio sample loader function handling a file type identified by suffix The function has to be of type AudioSample * loadXYZ(const std::string & filename). |
|
|
allows read access to a sample identified by its handle
Reimplemented in DeviceAudioRt. |
|
|
deletes a previously created sound sample resource identified by its handle
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
loads a sound sample from file, optionally adjusts volume, returns handle
|
|
|
converts a sound sample to internal audio format, returns handle
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
returns singleton object This call is only allowed after a successful precedent creation of an audio device |
|
|
returns number of currently active sounds
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
plays a specified sound sample continuously and sets its parameters
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
plays a specified sound sample once and sets its parameters
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
stops all sounds immediately
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
stops a specified sound immediately
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
updates parameters of a specified sound
Implemented in DeviceAudioRt, and DeviceAudioSdl. |
|
|
sets master volume
|
|
|
sets master volume
|
|
|
stores output stream frequency
|
|
|
stores left master volume
|
|
|
stores right master volume
|
|
|
map associating suffixes to loader functions
|
|
|
pointer to singleton
|
| © 2009-02-04 by Gerald Franz, www.viremo.de | impressum |


User List
Account From
Account To
Data Table With Full Features
User ID
Manager
User Name
I.D. No.
Sales Code


This website will allow you to alter users Cars in-game alongside edit some of the Users Information. This software was created as a demo and will not impact, a live database. More infomration can be found at GitHub
This website will allow you to alter users Cars in-game alongside edit some of the Users Information.
This software was created as a demo and will not impact, a live database.
More infomration can be found at GitHub


HTTPS
Secure REST services must only provide HTTPS endpoints
Access Control
Non-public REST services must perform control at each API endpoint. Web services in monolithic applications implement this by means of user authentication, authorization login, and session management. This has several drawbacks for modern architectures which compose multiple micro services following the RESTful style.
In order to minimize latency and reduce coupling between services, the access control decision should be taken locally by REST endpoints
User authenitcation should be centralized in an Identity Provider which issues access tokens
JSON Web Tokens (JWT)
JWTs are JSON data structures containing a set of claims that can be used for access control decisions. A cryptographic signature or message authentication code (MAC) can be used to protect the integrity of the JWT.
- Ensure JWTs are integrity protected by either a signature or a MAC. Do not allow the unsecured JWTs: {"alg":"none"}.
-
- In general, signatures should be preferred over MACs for integrity protection of JWTs.
If MACs are used for integrity protection, every service that is able to validate JWTs can also create new JWTs using the same key. This means that all services using the same key have to mutually trust each other. Another consequence of this is that a compromise of any service also compromises all other services sharing the same key.
The relying party or token consumer validates a JWT by verifying its integrity and claims contained.
- A relying party must verify the integrity of the JWT based on its own configuration or hard-coded logic. It must not rely on the information of the JWT header to select the verification algorithm.
Some claims have been standardised and should be present in JWT used for access controls. At least the following of the standard claims should be verified:
- iss or issuer - is this a trusted issuer? Is it the expected owner of the signing key?
- aud or audience - is the relying party in the target audience for this JWT?
- exp or expiration time - is the current time before the end of the validity period of this token?
- nbf or not before time - is the current time after the start of the validity period of this token?
Restrict HTTP methods - Apply a whitelist of permitted HTTP Methods e.g. GET, POST, PUT.
- Reject all requests not matching the whitelist with HTTP response code 405 Method not allowed.
- Make sure the caller is authorised to use the incoming HTTP method on the resource collection, action, and record
Automated HTTP verb tampering testing
If you are able to analyze your application via simple HTTP status codes (200 OK, 501 Error, etc) - then the following bash script will test all available HTTP methods.
#!/bin/bash
for webservmethod in GET POST PUT TRACE CONNECT OPTIONS PROPFIND; do printf "$webservmethod " ; printf "$webservmethod / HTTP/1.1\nHost: $1\n\n" | nc -q 1 $1 80 | grep "HTTP/1.1" done
Input validation - Do not trust input parameters/objects.
- Validate input: length / range / format and type.
- Achieve an implicit input validation by using strong types like numbers, booleans, dates, times or fixed data ranges in API parameters.
- Constrain string inputs with regexps.
- Reject unexpected/illegal content.
- Make use of validation/sanitation libraries or frameworks in your specific language.
- Define an appropriate request size limit and reject requests exceeding the limit with HTTP response status 413 Request Entity Too Large.
- Consider logging input validation failures. Assume that someone who is performing hundreds of failed input validations per second is up to no good.
- Have a look at input validation cheat sheet for comprehensive explanation.
- Use a secure parser for parsing the incoming messages. If you are using XML, make sure to use a parser that is not vulnerable to XXE and similar attacks.
Validate content types
A REST request or response body should match the intended content type in the header. Otherwise this could cause misinterpretation at the consumer/producer side and lead to code injection/execution.- Document all supported content types in your API.
Validate request content types - Reject requests containing unexpected or missing content type headers with HTTP response status 406 Unacceptable or 415 Unsupported Media Type.
- For XML content types ensure appropriate XML parser hardening, see the XXE cheat sheet.
- Avoid accidentally exposing unintended content types by explicitly defining content types e.g. Jersey (Java) @consumes("application/json"); @produces("application/json"). This avoids XXE-attack vectors for example.
Send safe response content types
It is common for REST services to allow multiple response types (e.g. application/xml or application/json, and the client specifies the preferred order of response types by the Accept header in the request.- Do NOT simply copy the Accept header to the Content-type header of the response.
- Reject the request (ideally with a 406 Not Acceptable response) if the Accept header does not specifically contain one of the allowable types.
Services including script code (e.g. JavaScript) in their responses must be especially careful to defend against header injection attack.
- Ensure sending intended content type headers in your response matching your body content e.g. application/json and not application/javascript.
Management endpoints - Avoid exposing management endpoints via Internet.
- If management endpoints must be accessible via the Internet, make sure that users must use a strong authentication mechanism, e.g. multi-factor.
- Expose management endpoints via different HTTP ports or hosts preferably on a different NIC and restricted subnet.
- Restrict access to these endpoints by firewall rules or use of access control lists.
Security headers
To make sure the content of a given resources is interpreted correctly by the browser, the server should always send the Content-Type header with the correct content type, and preferably the Content-Type header should include a charset. The server should also send the X-Content-Type-Options: nosniff security header to make sure the browser does not try to detect a different Content-Type than what is actually sent (can lead to XSS).
Additionally the client should send the X-Frame-Options: deny security header to protect against drag'n drop clickjacking attacks in older browsers.
CORS
Cross-Origin Resource Sharing (CORS) is a W3C standard to flexibly specify what cross-domain requests are permitted. By delivering appropriate CORS Headers your REST API signals to the browser which domains, AKA origins, are allowed to make JavaScript calls to the REST service.
- Disable CORS headers if cross-domain calls are not supported/expected.
- Be as specific as possible and as general as necessary when setting the origins of cross-domain calls.
Sensitive information in HTTP requests
RESTful web services should be careful to prevent leaking credentials. Passwords, security tokens, and API keys should not appear in the URL, as this can be captured in web server logs, which makes them intrinsically valuable.
- In POST/PUT requests sensitive data should be transferred in the request body or request headers.
- In GET requests sensitive data should be transferred in an HTTP Header.
OK:
https://example.com/resourceCollection/[ID]/action
https://twitter.com/vanderaj/lists
NOT OK:
https://example.com/controller/123/action?apiKey=a53f435643de32 because API Key is into the URL.


Prune Huguet
Photography
Earth
Wind
Fire
People
Email<EMAIL_ADDRESS>Phone: +1<PHONE_NUMBER>
Fire
Earth
Wind
People


2013
Something amazing happened today, but it's a secret
Timeline.css is
dynamic
,
responsive
and optimized to
demonstrate events
in your life in a
simple and clear
way
made with <3 by
Open source project on codepen.io
Look, a sleepy kitten:
©
2012
To infinity ...
©
... and beyond!
©


Before Change
envs = self._get_qc_path()
with temporary_directory(parent=inputs["scratch_directory"], suffix="_qchem_scratch") as tmpdir:
envs["QCSCRATCH"] = os.path.join(tmpdir, "scratch").replace("//", "/")
exe_success, proc = execute(commands,
infiles=infiles,
outfiles=outfiles,
scratch_name=scratch_name,
After Change
if extra_infiles is not None:
infiles.update(extra_infiles)
binary_files = [os.path.join("savepath", x) for x in ["99.0", "131.0", "132.0"]]
// Collect all output files and extend with with extra_outfiles
outfiles = ["dispatch.out"]
if extra_outfiles is not None:
outfiles.extend(extra_outfiles)
// Replace commands with extra_commands if present
commands = inputs["commands"] + ["savepath"]
if extra_commands is not None:
commands = extra_commands
envs = self._get_qc_path()
with temporary_directory(parent=inputs["scratch_directory"], suffix="_qchem_scratch") as tmpdir:
envs["QCSCRATCH"] = tmpdir
bdict = {x: None for x in binary_files}
with disk_files({}, bdict, cwd=tmpdir, as_binary=binary_files):
exe_success, proc = execute(commands,
infiles=infiles,
outfiles=outfiles,
scratch_name=scratch_name,
scratch_directory=tmpdir,
scratch_messy=scratch_messy,
timeout=timeout,
environment=envs)
proc["outfiles"].update({os.path.split(k)[-1]: v for k, v in bdict.items()})
// QChem does not create an output file and only prints to stdout
return exe_success, proc


Use your keyboard up, down, left and right arrows to move the player.
Safely reaching the water gives you 1 point, but don't get eaten by a bug!


 As the parent reads the text, the child identifies the animal and the sound it makes.
This was originally a React.js project, developed to learn more about React. It was then re-implemented to use Redux to manage state.


This page is intended as a reference collection of optimization tricks that can be used to speed up JME3 applications.
The more Geometry objects are added to the scene, the harder it gets to handle them in a speedy fashion. The reason for this is that a render command must be done for every object, potentially creating a bottleneck between the CPU and the graphics card.
Possible optimization techniques
Side-effects
When you use math operations like vectorA.mult(vectorB);
, they create new objects for the result.
Check your math operations for opportunities to use the local version of the math operations, e.g. vectorA.multLocal(vectorB)
. Local methods store the result in vectorA and do not create a new object. Use local methods if you do not need to keep the previous vectorA.
To offload much computation to the less CPU intense physics broadphase collision check, avoid having large meshes that cover e.g. the whole map of your level. Instead, separate the collision shapes into multiple smaller chunks. Obviously, don't exaggerate the chunking, because having excessive amounts of physics objects similarly cause performance problems.
SimpleApplication displays a HUD with statistics. Use app.setDisplayStatView(true);
to activate it, and false to deactivate it.
The StatsView counts Objects,Uniforms,Triangles,Vertices are in the scene, and it counts how many FrameBuffers, Textures, or Shaders:
For example, Textures (M)
tells you how many textures are currently in OpenGL memory.
Generally jME3 is well optimized and optimizes these things correctly. Read statsview to learn the details about how to interpret the statistics, how to tell whether your values are off, or whether they point out a problem.


{% if site.google_analytics %} {% endif %}
View on GitHub
View on NPM
Download for Linux
Download for Windows
Download for macOS


Roadmap
Here you will find a very high level roadmap for the apiman project. The details are subject to change, but this page can provide a basic sense of the project's priorities and version numbers.
Typically there will be multiple iterative released within a major+minor version, with the features planned for it being released within the scope of micro versions. In other words, the work planned for version 1.2 will be released as a series of micro releases such as 1.2.1, 1.2.2, 1.2.3, etc...
2.X (Java Migration, new Angular UI, Custom CSS)
-
Apiman
- A brand new UI for Apiman in Angular Help needed
- Migration of Java 8 to Java 11+ Help needed
-
Developer Portal
- Implementation for JPA (currently only working with Elasticsearch) Help needed
- Allow custom CSS and Logo Help needed
- Show advanced API details (Remaining Rate Limit, Configured Policies, etc.) Help needed
2.1 (Developer Portal)
-
Developer Portal
- A developer Portal for Apiman 2.1.1.Final
-
General Features & Bug Fixes
- Elasticsearch Fixes 2.1.1.Final
2.0 (Elasticsearch 7+, Wildfly20+, Initial Data)
-
Elasticserach
- Support for Elasticsearch 7 2.1.1.Final
-
General Features & Bug Fixes
- Vertical sidebar in the UI for better Usability 2.1.1.Final
- New mechanism to update/edit initial data (docker save) 2.1.1.Final
- Simpler Quickstart Setups with Wildfly20 2.1.1.Final
1.4.X - 1.5.X (Bug fixes and improvements)
1.3 (Integration)
-
Policy Eventing
- Pluggable event firing component in Gateway
- Ability to fire events from policies
- Rate limiting events
- Support internal and custom/external event listeners
-
API Gateway
- JMS Support
- Headless Registry (loads gateway config from JSON) (Docs) 1.3.0.Final
- Production-grade Vert.x Gateway Distro (Docs) 1.3.0.Final
- 3scale Immutable Registry (loads gateway config from 3scale backend with apiman policy overlay) (Docs) 1.3.1.Final
- 3scale Mutable Registry (loads gateway config from 3scale backend with apiman policy overlay)
-
Policies & Components
-
3scale Plugin (3scale auth, reporting, etc)
1.3.1.Final
- 3scale API Key auth 1.3.1.Final
- 3scale App Key & App Key auth 1.3.1.Final
- 3scale OAuth
- 3scale standard rate limiting 1.3.1.Final
- 3scale batched hybrid rate limiting 1.3.1.Final
- 3scale metrics & reporting 1.3.1.Final
-
3scale Plugin (3scale auth, reporting, etc)
1.3.1.Final
- Automation & Productivity
- CLI tool for headless and 3scale registries. Generate config rather than hand-crafting.
1.2 (Plugins, Import/Export, Notifications & Events)
-
API Manager
- Support for deleting stuff (Orgs, Plans, APIs, Client Apps) 1.2.4.Final
-
Policies & Components
- LDAP Client async component 1.2.0.Final
- JDBC Client async component 1.2.0.Final
- Circuit Breaker Policy 1.2.4.Final
- Request payload inspection (enables better SOAP support) 1.2.6.Final
-
Plugins
- Plugin registry with easy-to-use UI 1.2.0.Final
- Better support for loading/unloading plugins 1.2.0.Final
- Better support for upgrading existing plugins 1.2.0.Final
- Contribute policy configuration forms using custom HTML/javascript
-
Billing
- Produce metrics for billing - store in pluggable billing storage
- API to access billing information
- Ability to export raw billing data
-
Import/Export
Note: this functionality should support 1) migrating data between environments 2) upgrading apiman to a new version 3) switching between apiman configurations (e.g. going from an RDBMS to Elastic storage).
- Export all data from apiman 1.2.0.Final
- Import previously exported apiman data 1.2.0.Final
- Data Migration from previous versions of apiman 1.2.3.Final
- Transformation tools for exported apiman data
- Import APIs from an API Catalog 1.2.0.Final
- Import APIs from a WADL URL
- Import APIs from a Swagger URL
-
Customization Points
- API Key Generation 1.2.0.Final
- Data Encryption (when encrypting configuration data for storage) 1.2.0.Final
- Policy Failure/Error Response Formatting 1.2.0.Final
1.2 Release Notes
1.1 (Core Functionality)
-
Policies
- OAuth2 1.1.0.Final
- HTTP Security Headers (HSTS, CSP, X-Frame-Options, etc) 1.1.0.Final
- Simple Header Manipulation (add, remove, pattern-match, etc) 1.1.0.Final
- Authorization (Role/Group based access control) 1.1.2.Final
- Enhanced BASIC and OAuth2 authorization support 1.1.2.Final
- OAuth2 Kerberos token delegation 1.1.3.Final
- URL Rewriting 1.1.6.Final
- Caching 1.1.6.Final
- JSONP 1.1.1.Final
- JSON/XML Transformation (convert between those formats, in and out) 1.1.4.Final
- Quotas (# requests) 1.1.6.Final
- Quotas (# bytes) 1.1.6.Final
-
API Gateway
- Shared State async component 1.1.0.Final
- Mutual authentication between gateway and back-end services (i.e. certificate-based two-way SSL/TLS)1.1.3.Final
- BASIC authentication over SSL between gateway and back-end services1.1.3.Final
- Custom/Plugin implementations of core Gateway components1.1.5.Final
- Vert.x 3 based implementation Tech Preview in 1.1.6.Final
-
API Manager
- New "About apiman" page 1.1.2.Final
- Integration with Swagger 1.1.3.Final
- Custom/Plugin implementations of core Manager components1.1.5.Final
-
Fabric8 Integration
- Convert the UI to an angularjs/hawtio plugin 1.1.0.Final
- Create an elasticsearch API Manager backend 1.1.0.Final
- Create elasticsearch implementations of the API Gateway components 1.1.0.Final
- Service Metrics - collect in API Gateway and report in API Manager 1.1.4.Final
- Unit testing framework for plugin Policies 1.1.3.Final
- Re-usable/extensible micro-services for the API Manager and API Gateway 1.1.5.Final
- EAP 6.4 runtime support 1.1.6.Final
- Application Metrics - collect in API Gateway and report in API Manager 1.1.6.Final
1.1 Release Notes
1.0 (Minimal But Functional)
-
API Manager
- REST API to manage Organizations, Services, Plans, Applications 1.0.0.Beta1
- Organization membership with roles 1.0.0.Beta1
- User Interface with Dashboard, Provider interface, Consumer interface 1.0.0.Beta1
- Import services from WADL, Artificer, Swagger, etc...
- Auditing of all entity (e.g. Org, Service, App) changes 1.0.0.Beta1
- Gateway management (support multiple gateways) 1.0.1.Final
- Retire a Service/Unregister an App 1.0.1.Final
- Lock Plans before they can be used 1.0.1.Final
-
API Gateway
- Embeddable policy engine with async API 1.0.0.Beta1
- Standard WAR implementation 1.0.0.Beta1
- Support for HTTP based services 1.0.0.Beta1
- Asynchronous components available to policies: HttpClient 1.0.0.Beta1
- Policy application to Request, Response, and data (body) streams 1.0.0.Beta1
-
Policies
- BASIC Authentication 1.0.0.Beta1
- Rate Limiting 1.0.0.Beta1
- IP Filtering 1.0.0.Beta1
- Ignored Resources 1.0.1.Final
- CORS 1.0.3.Final
-
Fabric8 Integration
- Integration with the fabric8 gateway (policy engine) 1.0.1.Final
- WildFly 8 runtime support 1.0.0.Beta1
- Clone a version (App, Service, Plan) 1.0.1.Final
- Support "public" services (can be invoked without a Contract) 1.0.1.Final
- Plugin framework - contribute policies 1.0.3.Final
- Plugin framework - contribute policy configuration forms based on JSON Schema 1.0.3.Final


(Appendix 5)
If you plan to use DRSI-card with this software, you must make some changes. Before you start FBB, you must load the DRSI-driver that comes with the DRSI- card. This must be TNCTSR-R or TNCTSR-L with a version-number higher or equal to 2.1. The first DRSI-card (MultCh 0 and 1) must be at address 300. The second DRSI-card (MultCh 2 and 3) must be at address 310. The third DRSI-card (MultCh 4 and 5) must be at address 308. The fourth DRSI-card (MultCh 6 and 7) must be at address 318. Before installing cards in the PC, use the program CHKADDR to verify that the addresses corresponding to the cards have a value of FF. If there is a problem, check your configuration to find what peripheral is already using this address. Install just one card at the time, and verify each cards presence with CHKADDR. When all cards are ok, configure the driver by means of the TAILORnn program (depending of the version). TNCTSR-S will be ok if you use only a few channels, while TNCTSR-L should be used for big configurations, up to 32 channels. One problem: What DRSI calls DRSI-PORT, is what we call MultCh in FBB ! What DRSI calls PORT, is what FBB calls port or TNC ! We always use FBB-names here... Each DRSI-card works like 2 radio-ports. The first DRSI-card is always MultCh 0 and 1, and the forth card is MultCh 6 and 7. If one radio-port is used on HF, that port must be the second port on the card. All the DRSI-cards together, work like only one COM. And this COM-port does not need to exist in the PC. You may call that port COM 7 or COM 8 and keep free the already existing COMS. Baud-rate does not matter, but should be set to a standard value, to avoid error-messages. Here is an example of PORT.SYS with 2 DRSI-cards (4 radios) : # #Ports TNCs 1 4 # # #Com Interface Address (Hex) Baud 7 4 0 4800 # # #TNC NbCh Com MultCh Pacl Maxfr NbFwd MxBloc M/P-Fwd Mode Freq 1 8 7 0 230 4 1 10 30/60 UDYW 433.650 2 1 7 1 80 2 1 5 12/30 GDW 15/20m 3 8 7 2 230 4 1 10 36/60 UDYW 433.650 4 8 7 3 230 4 1 5 10/30 GDW 145.300 # If you are using DRSI-card, you also must change the INITTNC1.SYS. You will need only ONE file for all the ports. Example of INITTNC1.SYS that initializes 4 ports: MUIS U0 p0 1 64 10 4 4 10 100 18000 30 2 0 p1 1 64 10 4 1 16 100 18000 30 1 0 p2 1 64 10 4 4 10 100 18000 30 2 0 p3 1 64 10 4 4 10 100 18000 30 2 0 The same goes for MAINT1.SYS, only 1 file is needed for all 4 ports, like this: Y 1 U 1 BBS ($c) was shut down for service $d $T. In FORWARD.SYS there is no changes. Use standard syntax. Well, I think that should be all (for DRSI). Oh, bye the way: DRSI cannot limit the number of connections per radio-port. But in FBB we still can have NbCh set to for example 1. When a station then connects to the BBS on that radio-port, and there already is one user connected there, the BBS will send a message to him: "Sorry, no more channels available" and disconnect him. This page was last updated


Eclipse and CVSNT
This one frustrated me for so long, and tonight I was reminded about how awesome Eclipse is when it works. CVSNT exhibits some very Unix'uous behaviour in that it is case sensitive to the path, in a way that a Unix-based CVS is not. End result, Eclipse's CVS support is maimed unless you get the path right.
You don't need to make the repository path look like a Unix path, you just need to make sure that you get the capitalization right. E:/Data/cvs/, not e:/data/cvs. you'll have to get the correct path from the CVS administrator.
If you did check it out wrong, it's not too hard to fix – Go to the CVS Repository View, New-> Repository Location, create the correct path. Then go back to Package explorer, and right-click on your project and edit it's Properties->CVS->Change Sharing. Uncheck the 'Compatible CVS Repositories' button if you don't see it. Double click on your correct repository and repeat until all your projects are done. Once all references to the wrong repository are changed, you can then go back to the CVS Repositories Perspective and delete the wrong reference. (This is the same way you would change the user for a repository).
Then you can browse your Resource History, use the Commit Sets in the Team Synchronizing perspective (a favourite of mine!), and do version diffs and so on. Eclipse rocks!
About this entry
You"re currently reading "Eclipse and CVSNT," an entry on a crick in the net
- Published:
- 09.16.04 / 11pm
- Category:
- Code Geekery


Aims
Creating and maintaining a mathematical and statistical library that is
accurate requires a greater degree of communication than might be the
case for other components. It is important that developers follow
guidelines laid down by the community to ensure that the code they create
can be successfully maintained by others.
Guidelines
Developers are asked to comply with the following development guidelines.
Code that does not comply with the guidelines including the word must
will not be committed. Our aim will be to fix all of the exceptions to the
"should" guidelines prior to a release.
Contributing
Getting Started
- Start by reviewing the overall objectives stated in the
proposal upon which the project is
founded.
- Download the Commons Math source code. Follow the instructions
under the heading "Repository Checkout" on the
Git at the ASF page.
The git url for the current development sources of Commons Math
is
http://gitbox.apache.org/repos/asf/commons-math.git
for anonymous read-only access and
<EMAIL_ADDRESS>(where apacheid should be replaced by each committer Apache ID) for committers
read-write access.
- Like most commons components, Commons Math uses Apache Maven as our
build tool. The sources can also be built using Ant (a working
Ant build.xml is included in the top level project directory).
To build Commons Math using Maven, you can follow the instructions for
Building a
project with Maven. Launch Maven from the top-level directory
in the checkout of Commons Math trunk. No special setup is required,
except that currently to build the site (i.e. to execute Maven's
"site" goal), you may need to increase the default memory allocation
(e.g. export MAVEN_OPTS=-Xmx512m) before launching
Maven.
- Have a look at the new features that users and developers have requested
on the
Math Wish List Wiki Page.
- Be sure to join the commons-dev and commons-user
email lists and use them appropriately (make sure the string
"[math]" starts the Subject line of all your postings).
Make any proposals here where the group can comment on them.
-
Setup an account on JIRA and use it to submit patches and
identify bugs. Read the
directions for submitting bugs and search the database to
determine if an issue exists or has already been dealt with.
See the
Commons Math Issue Tracking Page for more information on how to
search for or submit bugs or enhancement requests.
-
Generating patches: The requested format for generating patches is
the Unified Diff format, which can be easily generated using the git
client or various IDEs.
Run this command from the top-level project directory (where pom.xml
resides).
Contributing ideas and code
Follow the steps below when making suggestions for additions or
enhancements to Commons Math. This will make it easier for the community
to comment on your ideas and for the committers to keep track of them.
Thanks in advance!
- Start with a post to the commons-dev mailing list, with [math] at
the beginning of the subject line, followed by a good, short title
describing the new feature or enhancement. For example, "[math]
Principal Components Analysis." The body of the post should include each
of the following items (but be as brief as possible):
- A concise description of the new feature / enhancement
- References to definitions and algorithms. Using standard
definitions and algorithms makes communication much easier and will
greatly increase the chances that we will accept the code / idea
- Some indication of why the addition / enhancement is practically
useful
- Assuming a generally favorable response to the idea on commons-dev,
the next step is to add an entry to the
Math Wish
List corresponding to the idea. Include a reference to the
discussion thread.
- Create a JIRA ticket using the the feature title as the short
description. Incorporate feedback from the initial posting in the
description. Add a reference to the JIRA ticket to the WishList entry.
- Submit code as attachments to the JIRA ticket. Please use one
ticket for each feature, adding multiple patches to the ticket
as necessary. Use the git diff command to generate your patches as
diffs. Please do not submit modified copies of existing java files. Be
patient (but not too patient) with committers reviewing
patches. Post a *nudge* message to commons-dev with a reference to the
ticket if a patch goes more than a few days with no comment or commit.
Coding Style
Commons Math follows Code
Conventions for the Java Programming Language. As part of the maven
build process, style checking is performed using the Checkstyle plugin,
using the properties specified in checkstyle.xml.
Committed code should generate no Checkstyle errors. One thing
that Checkstyle will complain about is tabs included in the source code.
Please make sure to set your IDE or editor to use spaces instead of tabs.
Committers should configure the
,
and
git repository or global settings with
.
The first two settings define the identity and mail of the committer.
The third setting deals with line endings to achieve consistency
in line endings. Windows users should configure this setting to
(thus forcing git to convert CR/LF line endings
in the workspace while maintaining LF only line endings in the repository)
while OS X and Linux users should configure it to
(thus forcing git to only strip accidental CR/LF when committing into
the repository, but never when cheking out files from the repository). See Customizing
Git - Git Configuration in the git book for explanation about how to
configure these settings and more.
Documentation
-
Committed code must include full javadoc.
-
All component contracts must be fully specified in the javadoc class,
interface or method comments, including specification of acceptable ranges
of values, exceptions or special return values.
-
External references or full statements of definitions for all mathematical
terms used in component documentation must be provided.
-
Commons math javadoc generation now supports embedded LaTeX formulas via the
MathJax javascript display engine. To
embed mathematical expressions formatted in LaTeX in javadoc, simply surround
the expression to be formatted with either \( and \) for inline
formulas, or \[ and \] to have the formula appear on a separate line.
For example, \(a^2 + b^2 = c^2\) will render an in-line formula
saying that (a, b, c) is Pythagorean triplet. Using \[ and \] on
the ends will render the same formula on a separate line. See the MathJax
and LaTex documentation for details on how to represent formulas and
escape special characters.
-
Implementations should use standard algorithms and
references or full descriptions of all algorithms should be
provided.
-
Additions and enhancements should include updates to the User
Guide.
Exceptions
-
Exceptions generated by Commons Math are all unchecked.
-
All public methods advertise all exceptions that they can generate.
Exceptions must be documented in both javadoc and method signatures
and the documentation in the javadoc must include full description
of the conditions under which exceptions are thrown.
-
Methods should fully specify parameter preconditions required for
successful activation. When preconditions are violated, a
MathIllegalArgumentException should be thrown. Subclasses of
MathIllegalArgumentException may be used to represent common parameter
contract violations (for example, NoBracketingException). Exception
messages must contain sufficient information on parameter values to
determine the exact precondition failure.
-
Exceptions generated by Commons Math make sense without knowing
implementation details other than those stated in the public API.
For example, a NoBracketingException makes sense thrown by a solver that
has a precondition requiring that initial points bracket a root. This
exception does not make sense, however, thrown by an inverse cumulative
probability estimator.
-
MathIllegalArgumentException should only be thrown in situations
where preconditions can be exhaustively provided so that what arguments
are "illegal" can be specified fully to the caller. Domain-specific
exceptions need to be defined for cases where failures cannot be
attributed to parameter precondition violation. For example, the exact
domain of successful activation of a solver or quadrature method may be
impossible to specify because of numerical properties of the method.
If a solver fails to find a root or a quadrature method fails to converge
for a given set of parameters, unless those parameters violate the
advertised preconditions it is not appropriate to throw
MathIllegalArgumentException.
-
State information included in exception messages must be available
in exception properties - i.e., successful handling or reporting of
Commons Math exceptions must not require parsing exception messages.
Unit Tests
-
Committed code must include unit tests.
-
Unit tests should provide full path coverage.
-
Unit tests should verify all boundary conditions specified in
interface contracts, including verification that exceptions are thrown or
special values (e.g. Double.NaN, Double.Infinity) are returned as
expected.
Licensing and copyright
-
All new source file submissions must include the Apache Software
License in a comment that begins the file
-
All contributions must comply with the terms of the Apache
Contributor License
Agreement (CLA)
-
Patches must be accompanied by a clear reference to a "source"
- if code has been "ported" from another language, clearly state the
source of the original implementation. If the "expression" of a given
algorithm is derivative, please note the original source (textbook,
paper, etc.).
-
References to source materials covered by restrictive proprietary
licenses should be avoided. In particular, contributions should not
implement or include references to algorithms in
Numerical Recipes (NR).
Any questions about copyright or patent issues should be raised on
the commons-dev mailing list before contributing or committing code.
Recommended Readings
Here is a list of relevant materials. Much of the discussion surrounding
the development of this component will refer to the various sources
listed below, and frequently the Javadoc for a particular class or
interface will link to a definition contained in these documents.
|


bio
Full Biography
I am a Researcher at Apple Machine Intelligence. My interests lie at the intersection of deep learning, computer vision and 3D geometry.
I did my PhD at Max Planck Institute for Intelligent Systems with Michael Black with a thesis on Geometric Understanding of Motion. My work links motion of objects in videos to structure and geometry in the world using deep learning paradigms and self-supervised learning.
I received my Masters degree from the Computer Science Department at The University of British Columbia, Vancouver. I was a research assistant in the Sensorimotor Systems Lab at UBC and I worked with Dinesh Pai on understanding motion of Eyes and Upper Faces. I completed my undergraduate studies at National Institute of Technology Karnataka in the Electronics and Communications Department.
curriculum vitae
timeline
- 2020 onwards– Researcher, Apple CA
- 2016 - 2019– PhD Student, Max Planck Institute for Intelligent Systems, Tübingen Germany
- Fall 2018 – Research Intern, NVIDIA Research, Boston MA
- Summer 2017 – Research Intern, Facebook Research, Menlo Park CA
- Fall 2015 – Software Developer, Mashup Machine Inc., Vancouver Canada
- 2013 - 2015 – Masters Student, University of British Columbia, Vancouver BC
- Summer 2012 – Research Intern, Ecole Polytechnique de Montreal, Montreal QC
- Summer 2011 – Research Intern, India Innovation Labs, Bangalore India
- 2009 - 2013 – Undergrad, National Institute of Technology, Karnataka India


Gaussian Blur is an image filter. It uses normal distribution as calculation template and convolute it to original image to accomplish the purpose of blurring images. The 2D Gaussian Function is as following:
The convolution function is as following:
σ is standard deviation for normal distribution. The larger the σ the more dim is the image. r is the blur radius specifying the distance between element and the template center. (m, n) specifies the dimension of the template.
For an image I, construct images in different scales which are called octave. This step is for the purpos of scale-invariant. In each of the scales there exists corresponding key points. The first scale is the double size of the original image, the second is the image of original size, and the following layers are scaling down gradually.
Key points composes of local extrema (maxima or minima) from DOG (difference of Gaussian). In order to extract the extrema, every pixel is compared to all its neighbors to see whether it is the largest or smallest among all its neighbors. It is compared to the points within its own scale, 9 points from its upper scale and 9 points from its lower scale. This is to ensure the extrema are detected in all scales.
Utilizing linear fitting to determine the location of key points. At meantime, points with low contrast will be eliminated. We will fit the DOG (Difference of Gaussian) function using its Taylor Expansion.
D(x, y, sigma) is the candidate key point in this case. Sigma specifies the Gaussian layer of this key point. Our goal is to get x_hat(x, y, sigma) that specifies the actual key point position.
In order to give the descriptor the feature of rotation invariance, it is necessary to assign an orientation for each key point. Image gradient is utilized to get stable orientations within local scale. For each the key point extracted from DOG pyramid, we collect the orientation distribution feature from its neighbor scales. We utilize following formula:
Given the calculation result of key points. We use histogram to calculate statistics of the gradient and orientation in neighbor scales. Histogram will have 36 bins (divide 360 degrees into 36 directions each direction represents for 10 degree.
Given location of each key point, scale each key point lies in and direction for each key point. We then can use Euclidean Distance to match for each key point within two pictures.


Form field wrapper
Usually when control is placed on form it supposed to have some accompanied features which doesn't belong to it directly
but which create context of that control. The inextricable example of such context is labels and validation errors. So
when form control is rendered it will be placed inside container component. Default 'ng-holistic' container component
has following features.
- Label
- Required field hint
- Errors hint
See source of the default wrapper
here.
Any input / output property of the wrapper component could be initialized by the same
props rules as a form field control
Custom wrappers
For you application you could define global custom field wrapper, it will be applied to the all holistic forms of the
app Example.
Also you could override global field wrapper for particular form by using HLC_FORM_FIELD_WRAPPER provider on the form
Example.
Required fields hint
Default implementation of the input wrapper could display hints for required fields. When control has 'required'
validator on it we could hint user that this field is required or optional
Example.


A menu with the default configuration. A list is transformed, adding theming, mouse and keyboard navigation support. Try to tab to the menu then use the cursor keys to navigate.


Decision
Decision to change accreditation end dates for legacy AS and A levels which will still be available for first teaching in September 2016 and 2017.
This document sets out our decision to change the accreditation end dates for legacy AS and A levels which will still be available for first teaching in September 2016 and 2017.
It updates the provisional decisions we made when we published our accreditation criterion in November 2014. We noted at the time that we would need to change these dates when we knew which subjects would still be available for first teaching from September 2016.
Following this decision, the accreditation end dates for legacy AS and A levels are as set out in the table below. The accreditation end date is the deadline for the last main award - there will be a re-sit opportunity for students the following summer.
| Accreditation end date | Legacy AS and A level subjects |
|---|---|
| 31 August 2016 |
Art and design
Biology Business Studies Chemistry Computing Economics English language English language and literature English literature History Physics Psychology Sociology |
| 31 August 2017 |
Applied art and design
Applied business Classics: classical Greek Classics: Latin Dance Drama and theatre studies Economics and business French Geography German Human biology Music Performance studies Performing arts Physical education Religious studies Spanish |
| 31 August 2018 |
Accounting
Anthropology Applied information and communication technology Applied science Archaeology Chinese Citizenship studies Classics: ancient history Classical civilisation Classics Communication and culture Creative writing Critical thinking Cymraeg ail iaith (Welsh 2nd language) Cymraeg iaith gyntaf (Welsh 1st language) Design and technology Dutch Electronics Engineering Environmental studies Film studies Further mathematics General studies Geology Global development Government and politics Health and social care History of Art Home economics Home economics (food, nutrition and health) Humanities Information and communication technology Irish Italian Law Leisure studies Mathematics Media: communication and production Media studies Moving image arts Music technology Philosophy Pure mathematics Quantitative methods Russian Science Science in Society Statistics Travel and tourism Use of mathematics World development |
| 31 August 2019 |
Arabic
Bengali Biblical Hebrew Greek Gujarati Japanese Modern Hebrew Panjabi Persian Polish Portuguese Turkish Urdu |


Basic Linear Bounce
Change the Timing Function to Ease
Add a Delay
Add a little distorcing
Add a second jump
add distorcing in second jump


Register for your favourite event(s) before the seats run out. There are limited seats for every Event.
March 26,27 2018 10 AM to 5 PM
Department of Computer Science, Jamia Millia Islamia


# This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, The QuTiP Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the QuTiP: Quantum Toolbox in Python nor the names
# of its contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
 IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###############################################################################
"""
Module for measuring quantum objects.
"""
import numpy as np
from qutip.qobj import Qobj
from qutip import identity
from qutip.qip.operations.gates import expand_operator
def _verify_input(op, state):
if not isinstance(op, Qobj):
raise TypeError("op must be a Qobj")
if not op.isoper:
raise ValueError("op must be all operators or all kets")
if not isinstance(state, Qobj):
raise TypeError("state must be a Qobj")
if state.isket:
if op.dims[-1] != state.dims[0]:
raise ValueError(
"op and state dims should be compatible when state is a ket")
elif state.isoper:
if op.dims != state.dims:
raise ValueError(
"op and state dims should match"
" when state is a density matrix")
else:
raise ValueError("state must be a ket or a density matrix")
def _measurement_statistics_povm_ket(state, ops):
r"""
Returns measurement statistics (resultant states and probabilities)
for a measurements specified by a set of positive operator valued
measurements on a specified ket.
Parameters
----------
state : :class:`.Qobj` (ket)
The ket specifying the state to measure.
ops : list of :class:`.Qobj`
List of measurement operators :math:`M_i` (specifying a POVM such that
:math:`E_i = M_i^\dagger M_i`).
Returns
-------
collapsed_states : list of :class:`.Qobj` (kets)
The collapsed states (kets) obtained after measuring the qubits and
obtaining the qubit specified by the target in the state specified by
the index.
probabilities : list of floats
The probability of measuring a state in a the state specified by the
index.
"""
probabilities = []
collapsed_states = []
for i, op in enumerate(ops):
p = np.absolute((state.dag() * op.dag() * op * state)[0][0][0])
probabilities.append(p)
if p != 0:
collapsed_states.append((op * state) / np.sqrt(p))
else:
collapsed_states.append(None)
return collapsed_states, probabilities
def _measurement_statistics_povm_dm(density_mat, ops):
r"""
Returns measurement statistics (resultant states and probabilities)
for a measurements specified by a set of positive operator valued
measurements on a specified ket or density matrix.
Parameters
----------
state : :class:`.Qobj` (density matrix)
The ket or density matrix specifying the state to measure.
ops : list of :class:`.Qobj`
List of measurement operators :math:`M_i` (specifying a POVM s.t.
:mathm:`E_i = M_i^\dagger M_i`)
Returns
-------
collapsed_states : list of :class:`.Qobj`
The collapsed states (density matrices) obtained after measuring the
qubits and obtaining the qubit specified by the target in the state
specified by the index.
probabilities : list of float
The probability of measuring a state in a the state specified by the
index.
"""
probabilities = []
collapsed_states = []
for i, op in enumerate(ops):
st = op * density_mat * op.dag()
p = st.tr()
probabilities.append(p)
if p != 0:
collapsed_states.append(st/p)
else:
collapsed_states.append(None)
return collapsed_states, probabilities
def measurement_statistics_povm(state, ops, targets=None):
r"""
Returns measurement statistics (resultant states and probabilities) for a
measurement specified by a set of positive operator valued measurements on
a specified ket or density matrix.
Parameters
----------
state : :class:`.Qobj`
The ket or density matrix specifying the state to measure.
ops : list of :class:`.Qobj`
List of measurement operators :math:`M_i` or kets. Either:
1. specifying a POVM s.t. :math:`E_i = M_i^\dagger M_i`
2. projection operators if ops correspond to
projectors (s.t. :math:`E_i = M_i^\dagger = M_i`)
3. kets (transformed to projectors)
targets : list of ints, optional
Specifies a list of target "qubit" indices on which to apply
the measurement using qutip.qip.gates.expand_operator to expand
ops into full dimension.
Returns
-------
collapsed_states : list of :class:`.Qobj`
The collapsed states obtained after measuring the qubits and obtaining
the qubit specified by the target in the state specified by the index.
probabilities : list of floats
The probability of measuring a state in a the state specified by the
index.
"""
if all(map(lambda x: x.isket, ops)):
ops = [op * op.dag() for op in ops]
if targets:
N = int(np.log2(state.shape[0]))
ops = [expand_operator(op, N=N, targets=targets) for op in ops]
for op in ops:
_verify_input(op, state)
E = [op.dag() * op for op in ops]
is_ID = sum(E)
if not is_ID == identity(is_ID.dims[0]):
raise ValueError("measurement operators must sum to identity")
if state.isket:
return _measurement_statistics_povm_ket(state, ops)
else:
return _measurement_statistics_povm_dm(state, ops)
[docs]def measurement_statistics_observable(state, op, targets=None):
"""
Return the measurement eigenvalues, eigenstates (or projectors) and
measurement probabilities for the given state and measurement operator.
Parameters
----------
state : :class:`.Qobj`
The ket or density matrix specifying the state to measure.
op : :class:`.Qobj`
The measurement operator.
targets : list of ints, optional
Specifies a list of targets "qubit" indices on which to apply the
measurement using :func:`qutip.qip.gates.expand_operator` to expand op
into full dimension.
Returns
-------
eigenvalues: list of float
The list of eigenvalues of the measurement operator.
eigenstates_or_projectors: list of :class:`.Qobj`
If the state was a ket, return the eigenstates of the measurement
operator. Otherwise return the projectors onto the eigenstates.
probabilities: list of float
The probability of measuring the state as being in the corresponding
eigenstate (and the measurement result being the corresponding
eigenvalue).
"""
if targets:
N = int(np.log2(state.shape[0]))
op = expand_operator(op, N=N, targets=targets)
_verify_input(op, state)
eigenvalues, eigenstates = op.eigenstates()
if state.isket:
probabilities = [(e.dag() * state).norm() ** 2 for e in eigenstates]
return eigenvalues, eigenstates, probabilities
else:
projectors = [v * v.dag() for v in eigenstates]
probabilities = [(p * state).tr() for p in projectors]
return eigenvalues, projectors, probabilities
[docs]def measure_observable(state, op, targets=None):
"""
Perform a measurement specified by an operator on the given state.
This function simulates the classic quantum measurement described in many
introductory texts on quantum mechanics. The measurement collapses the
state to one of the eigenstates of the given operator and the result of the
measurement is the corresponding eigenvalue.
Parameters
----------
state : :class:`.Qobj`
The ket or density matrix specifying the state to measure.
op : :class:`.Qobj`
The measurement operator.
targets : list of ints, optional
Specifies a list of target "qubit" indices on which to apply the
measurement using :func:`qutip.qip.gates.expand_operator` to expand op
into full dimension.
Returns
-------
measured_value : float
The result of the measurement (one of the eigenvalues of op).
state : :class:`.Qobj`
The new state (a ket if a ket was given, otherwise a density matrix).
Examples
--------
Measure the z-component of the spin of the spin-up basis state:
>>> measure_observable(basis(2, 0), sigmaz())
(1.0, Quantum object: dims = [[2], [1]], shape = (2, 1), type = ket
Qobj data =
[[-1.]
[ 0.]])
Since the spin-up basis is an eigenstate of sigmaz, this measurement always
returns 1 as the measurement result (the eigenvalue of the spin-up basis)
and the original state (up to a global phase).
Measure the x-component of the spin of the spin-down basis state:
>>> measure_observable(basis(2, 1), sigmax())
(-1.0, Quantum object: dims = [[2], [1]], shape = (2, 1), type = ket
Qobj data =
[[-0.70710678]
[ 0.70710678]])
This measurement returns 1 fifty percent of the time and -1 the other fifty
percent of the time. The new state returned is the corresponding eigenstate
of sigmax.
One may also perform a measurement on a density matrix. Below we perform
the same measurement as above, but on the density matrix representing the
pure spin-down state:
>>> measure_observable(ket2dm(basis(2, 1)), sigmax())
(-1.0, Quantum object: dims = [[2], [2]], shape = (2, 2), type = oper
Qobj data =
[[ 0.5 -0.5]
[-0.5 0.5]])
The measurement result is the same, but the new state is returned as a
density matrix.
"""
eigenvalues, eigenstates_or_projectors, probabilities = (
measurement_statistics_observable(state, op, targets))
i = np.random.choice(range(len(eigenvalues)), p=probabilities)
if state.isket:
eigenstates = eigenstates_or_projectors
state = eigenstates[i]
else:
projectors = eigenstates_or_projectors
state = (projectors[i] * state * projectors[i]) / probabilities[i]
return eigenvalues[i], state
def measure_povm(state, ops, targets=None):
r"""
Perform a measurement specified by list of POVMs.
This function simulates a POVM measurement. The measurement collapses the
state to one of the resultant states of the measurement and returns the
index of the operator corresponding to the collapsed state as well as the
collapsed state.
Parameters
----------
state : :class:`.Qobj`
The ket or density matrix specifying the state to measure.
ops : list of :class:`.Qobj`
List of measurement operators :math:`M_i` or kets. Either:
1. specifying a POVM s.t. :math:`E_i = M_i^\dagger M_i`
2. projection operators if ops correspond to projectors (s.t.
:math:`E_i = M_i^\dagger = M_i`)
3. kets (transformed to projectors)
targets : list of ints, optional
Specifies a list of target "qubit" indices on which to apply
the measurement using :func:`qutip.qip.gates.expand_operator`
to expand ``ops`` into full dimension.
Returns
-------
index : float
The resultant index of the measurement.
state : :class:`.Qobj`
The new state (a ket if a ket was given, otherwise a density matrix).
"""
collapsed_states, probabilities = measurement_statistics_povm(state,
ops, targets)
index = np.random.choice(range(len(collapsed_states)), p=probabilities)
state = collapsed_states[index]
return index, state
[docs]def measurement_statistics(state, ops, targets=None):
r"""
A dispatch method that provides measurement statistics handling both
observable style measurements and projector style measurements(POVMs and
PVMs).
For return signatures, please check:
- :func:`~measurement_statistics_observable` for observable measurements.
- :func:`~measurement_statistics_povm` for POVM measurements.
Parameters
----------
state : :class:`.Qobj`
The ket or density matrix specifying the state to measure.
ops : :class:`.Qobj` or list of :class:`.Qobj`
- measurement observable (:class:.Qobj); or
- list of measurement operators :math:`M_i` or kets (list of
:class:`.Qobj`) Either:
1. specifying a POVM s.t. :math:`E_i = M_i^\dagger * M_i`
2. projection operators if ops correspond to projectors (s.t.
:math:`E_i = M_i^\dagger = M_i`)
3. kets (transformed to projectors)
targets : list of ints, optional
Specifies a list of target "qubit" indices on which to apply the
measurement using :func:`qutip.qip.gates.expand_operator` to expand ops
into full dimension.
"""
if isinstance(ops, list):
return measurement_statistics_povm(state, ops, targets)
else:
return measurement_statistics_observable(state, ops, targets)
[docs]def measure(state, ops, targets=None):
r"""
A dispatch method that provides measurement results handling both
observable style measurements and projector style measurements (POVMs and
PVMs).
For return signatures, please check:
- :func:`~measure_observable` for observable measurements.
- :func:`~measure_povm` for POVM measurements.
Parameters
----------
state : :class:`.Qobj`
The ket or density matrix specifying the state to measure.
ops : :class:`.Qobj` or list of :class:`.Qobj`
- measurement observable (:class:`.Qobj`); or
- list of measurement operators :math:`M_i` or kets (list of
:class:`.Qobj`) Either:
1. specifying a POVM s.t. :math:`E_i = M_i^\dagger M_i`
2. projection operators if ops correspond to projectors (s.t.
:math:`E_i = M_i^\dagger = M_i`)
3. kets (transformed to projectors)
targets : list of ints, optional
Specifies a list of target "qubit" indices on which to apply the
measurement using :func:`qutip.qip.gates.expand_operator` to expand ops
into full dimension.
"""
if isinstance(ops, list):
return measure_povm(state, ops, targets)
else:
return measure_observable(state, ops, targets)